From b37903cddd1dbdd568684b71b6eb6c4732ba5164 Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Sun, 20 Jan 2019 21:39:58 +0000 Subject: [PATCH] Fix tempest cleanup AttributeError It seems cleanup_service still uses deprecated tenant_id variable, the patch fixes that. Closes-Bug: #1812587 Change-Id: I294a2c04e70b980e0f42a29efa7f7448c31d1dc4 --- tempest/cmd/cleanup_service.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py index 1a0824619d..2fca6c870f 100644 --- a/tempest/cmd/cleanup_service.py +++ b/tempest/cmd/cleanup_service.py @@ -101,7 +101,7 @@ class BaseService(object): self.tenant_filter = {} if hasattr(self, 'tenant_id'): - self.tenant_filter['tenant_id'] = self.tenant_id + self.tenant_filter['project_id'] = self.tenant_id def _filter_by_tenant_id(self, item_list): if (item_list is None or @@ -320,13 +320,13 @@ class VolumeQuotaService(BaseService): def delete(self): client = self.client try: - client.delete_quota_set(self.tenant_id) + client.delete_quota_set(self.project_id) except Exception: LOG.exception("Delete Volume Quotas exception.") def dry_run(self): quotas = self.client.show_quota_set( - self.tenant_id, params={'usage': True})['quota_set'] + self.project_id, params={'usage': True})['quota_set'] self.data['volume_quotas'] = quotas @@ -339,7 +339,7 @@ class NovaQuotaService(BaseService): def delete(self): client = self.client try: - client.delete_quota_set(self.tenant_id) + client.delete_quota_set(self.project_id) except Exception: LOG.exception("Delete Quotas exception.")