def __init__(self, *args, **kwargs): super(FalconstorBaseDriver, self).__init__(*args, **kwargs) if self.configuration: self.configuration.append_config_values(FSS_OPTS) self.proxy = rest_proxy.RESTProxy(self.configuration) self._backend_name = ( self.configuration.safe_get('volume_backend_name') or 'FalconStor') self._storage_protocol = ''
def setUp(self): super(TestRESTProxy, self).setUp() configuration = mock.Mock(conf.Configuration) configuration.san_ip = FAKE configuration.san_login = FAKE configuration.san_password = FAKE configuration.fss_pool = FAKE_ID configuration.fss_debug = False configuration.additional_retry_list = None self.proxy = proxy.RESTProxy(configuration) self.FSS_MOCK = mock.MagicMock() self.proxy.FSS = self.FSS_MOCK self.FSS_MOCK._fss_request.return_value = API_RESPONSE self.mock_object(time, 'sleep', Fake_sleep)
def __init__(self, *args, **kwargs): super(FalconstorBaseDriver, self).__init__(*args, **kwargs) if self.configuration: self.configuration.append_config_values(FSS_OPTS) if self.configuration.fss_pool: self.configuration.fss_pools = {'A': str( self.configuration.fss_pool)} LOG.warning("'fss_pool=<pool-id>' is deprecated. Using the " "fss_pools=A:<pool-id> for single pool or " "fss_pools=P:<pool-id>,O:<other-pool-id> instead " "as old format will be removed once Queens development" " opens up.") self.proxy = rest_proxy.RESTProxy(self.configuration) self._backend_name = ( self.configuration.safe_get('volume_backend_name') or 'FalconStor') self._storage_protocol = ''