Esempio n. 1
0
 def __init__(self, *args, **kwargs):
     super(StorPoolDriver, self).__init__(*args, **kwargs)
     self.configuration.append_config_values(storpool_opts)
     self._sp_config = None
     self._ourId = None
     self._ourIdInt = None
     self._attach = spopenstack.AttachDB(log=LOG)
Esempio n. 2
0
    def check_for_setup_error(self):
        if storpool is None:
            msg = _('storpool libraries not found')
            raise exception.VolumeBackendAPIException(data=msg)

        self._attach = spopenstack.AttachDB(log=LOG)
        try:
            self._attach.api()
        except Exception as e:
            LOG.error("StorPoolDriver API initialization failed: %s", e)
            raise
Esempio n. 3
0
 def __init__(self, root_helper, driver=None, execute=putils.execute,
              *args, **kwargs):
     self._execute = execute
     self._root_helper = root_helper
     try:
         from storpool import spopenstack
     except ImportError:
         raise exception.BrickException(_LE(
             'Could not import the StorPool API bindings'))
     try:
         self._attach = spopenstack.AttachDB(log=LOG)
         self._attach.api().attachmentsList()
     except Exception as e:
         raise exception.BrickException(_LE(
             'Could not initialize the StorPool API bindings: %s') % (e))
    def __init__(self, root_helper, driver=None, *args, **kwargs):

        super(StorPoolConnector, self).__init__(root_helper,
                                                driver=driver,
                                                *args,
                                                **kwargs)

        if storpool is None:
            raise exception.BrickException(
                'Could not import the StorPool API bindings')

        try:
            self._attach = spopenstack.AttachDB(log=LOG)
            self._attach.api()
        except Exception as e:
            raise exception.BrickException(
                'Could not initialize the StorPool API bindings: %s' % (e))