def test_resources_by_user_tenant(self): """Verifying ceilometer resources - user tenant""" tenant_id = self.auth.get_project_id('default_domain', self.inputs.project_name) tenant_id = "".join(tenant_id.split('-')) q = ceilometer_client.make_query(tenant_id = tenant_id) result = None result = ceilometer_client.resource_list(self.cclient,query=q) if not result: self.logger.error("Ceilometer resource list did not work...") assert False if result: self.logger.info("Ceilometer resource list did work...") assert True r1 = None for resource in result: if (resource.resource_id == self.res.vm1_fixture.vm_id): self.logger.info("VM shown as resource list ") r1 = True else: continue if not r1: self.logger.error("VM NOT shown as resource list ") assert False return True
def test_resources_by_user_tenant(self): """Verifying ceilometer resources - user tenant""" tenant_id = self.auth.get_project_id('default_domain', self.inputs.project_name) tenant_id = "".join(tenant_id.split('-')) q = ceilometer_client.make_query(tenant_id=tenant_id) result = None result = ceilometer_client.resource_list(self.cclient, query=q) if not result: self.logger.error("Ceilometer resource list did not work...") assert False if result: self.logger.info("Ceilometer resource list did work...") assert True r1 = None for resource in result: if (resource.resource_id == self.res.vm1_fixture.vm_id): self.logger.info("VM shown as resource list ") r1 = True else: continue if not r1: self.logger.error("VM NOT shown as resource list ") assert False return True
def test_resources_by_admin_tenant(self): """Verifying ceilometer resources - admin tenant""" tenant_id = self.auth.get_project_id('admin') tenant_id = "".join(tenant_id.split('-')) q = ceilometer_client.make_query(tenant_id=tenant_id) result = None result = ceilometer_client.resource_list(self.cclient, query=q) if not result: self.logger.error("Ceilometer resource list did not work...") assert False if result: self.logger.info("Ceilometer resource list did work...") assert True return True
def test_resources_by_admin_tenant(self): """Verifying ceilometer resources - admin tenant""" tenant_id = self.auth.get_project_id('admin') tenant_id = "".join(tenant_id.split('-')) q = ceilometer_client.make_query(tenant_id = tenant_id) result = None result = ceilometer_client.resource_list(self.cclient,query=q) if not result: self.logger.error("Ceilometer resource list did not work...") assert False if result: self.logger.info("Ceilometer resource list did work...") assert True return True