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