コード例 #1
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
コード例 #2
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