コード例 #1
0
 def forget_sr(self, sr_uuid):
     sr_ref = VolumeHelper.find_sr_by_uuid(self._session, sr_uuid)
     if sr_ref is None:
         LOG.INFO(_('SR %s not found in the xapi database') % sr_uuid)
         return
     try:
         VolumeHelper.forget_sr(self._session, sr_uuid)
     except StorageError, exc:
         LOG.exception(exc)
         raise exception.Error(_('Could not forget SR'))
コード例 #2
0
ファイル: volumeops.py プロジェクト: wendy-king/x7_venv
 def forget_sr(self, sr_uuid):
     sr_ref = VolumeHelper.find_sr_by_uuid(self._session, sr_uuid)
     if sr_ref is None:
         LOG.INFO(_('SR %s not found in the xapi database') % sr_uuid)
         return
     try:
         VolumeHelper.forget_sr(self._session, sr_uuid)
     except StorageError, exc:
         LOG.exception(exc)
         raise exception.Error(_('Could not forget SR'))
コード例 #3
0
 def introduce_sr(self, sr_uuid, label, params):
     LOG.debug(_("Introducing SR %s") % label)
     sr_ref = VolumeHelper.find_sr_by_uuid(self._session, sr_uuid)
     if sr_ref:
         LOG.debug(_('SR found in xapi database. No need to introduce'))
         return sr_ref
     sr_ref = VolumeHelper.introduce_sr(self._session, sr_uuid, label,
                                        params)
     if sr_ref is None:
         raise exception.Error(_('Could not introduce SR'))
     return sr_ref
コード例 #4
0
ファイル: volumeops.py プロジェクト: wendy-king/x7_venv
 def introduce_sr(self, sr_uuid, label, params):
     LOG.debug(_("Introducing SR %s") % label)
     sr_ref = VolumeHelper.find_sr_by_uuid(self._session, sr_uuid)
     if sr_ref:
         LOG.debug(_('SR found in xapi database. No need to introduce'))
         return sr_ref
     sr_ref = VolumeHelper.introduce_sr(self._session, sr_uuid, label,
                                        params)
     if sr_ref is None:
         raise exception.Error(_('Could not introduce SR'))
     return sr_ref
コード例 #5
0
 def is_sr_on_host(self, sr_uuid):
     LOG.debug(_('Checking for SR %s') % sr_uuid)
     sr_ref = VolumeHelper.find_sr_by_uuid(self._session, sr_uuid)
     if sr_ref:
         return True
     return False
コード例 #6
0
ファイル: volumeops.py プロジェクト: wendy-king/x7_venv
 def is_sr_on_host(self, sr_uuid):
     LOG.debug(_('Checking for SR %s') % sr_uuid)
     sr_ref = VolumeHelper.find_sr_by_uuid(self._session, sr_uuid)
     if sr_ref:
         return True
     return False