def setUpClass(cls): super(BaseTopologyTest, cls).setUpClass() cls.conf = service.prepare_service([]) cls.conf.register_opts(list(OPTS), group='keystone_authtoken') cls.vitrage_client = \ v_client.Client('1', session=keystone_client.get_session(cls.conf)) cls.nova_client = clients.nova_client(cls.conf) cls.cinder_client = clients.cinder_client(cls.conf)
def setUpClass(cls): super(BaseApiTest, cls).setUpClass() cls.conf = utils.get_conf() cls.conf.register_opts(list(OPTS), group='keystone_authtoken') cls.vitrage_client = \ v_client.Client('1', session=keystone_client.get_session(cls.conf)) cls.nova_client = clients.nova_client(cls.conf) cls.cinder_client = clients.cinder_client(cls.conf)
def setUpClass(cls): super(BaseApiTest, cls).setUpClass() cls.conf = service.prepare_service([]) cls.conf.register_opts(list(OPTS), group='keystone_authtoken') cls.vitrage_client = \ v_client.Client('1', session=keystone_client.get_session(cls.conf)) cls.nova_client = clients.nova_client(cls.conf) cls.cinder_client = clients.cinder_client(cls.conf)
def __init__(self, conf): super(CinderVolumeDriver, self).__init__() self.client = clients.cinder_client(conf) self.conf = conf
def client(self): if not self._client: self._client = clients.cinder_client(self.conf) return self._client