def cinder(cls): """cinder client :rtype: cinderclient.v2.client.Client """ if not cls._cinder: cls._cinder = os_clients.cinder_client(cls._conf) return cls._cinder
def setUpClass(cls): super(BaseApiTest, cls).setUpClass() cls.conf = service.prepare_service([]) cls.vitrage_client = \ v_client.Client('1', session=keystone_client.get_session(cls.conf)) cls.nova_client = os_clients.nova_client(cls.conf) cls.cinder_client = os_clients.cinder_client(cls.conf) cls.neutron_client = os_clients.neutron_client(cls.conf) cls.heat_client = os_clients.heat_client(cls.conf) cls.num_default_networks = \ len(cls.neutron_client.list_networks()['networks']) cls.num_default_ports = \ len(cls.neutron_client.list_ports()['ports']) cls.num_default_entities = 3 cls.num_default_edges = 2
def client(self): if not self._client: self._client = os_clients.cinder_client() return self._client
def client(self): if not self._client: self._client = os_clients.cinder_client(self.conf) return self._client