def heat(cls): """heat client :rtype: heatclient.v1.client.Client """ if not cls._heat: cls._heat = os_clients.heat_client(cls._conf) return cls._heat
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(): if not HeatStackDriver._client: HeatStackDriver._client = os_clients.heat_client( HeatStackDriver.conf) return HeatStackDriver._client
def client(self): if not self._client: self._client = os_clients.heat_client() return self._client