diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-07-30 15:50:44 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-07-30 16:20:41 +0200 |
commit | 28a706149ede8c644f63c7b5a4f3b02a9806e548 (patch) | |
tree | c38d866389b7bfe760aff2a3109a35b98fba9061 | |
parent | cfb241ab63898eb4a550fc571d34952d33996e9c (diff) |
Delete alt images before removing the account
Else it could raise unauthorized exceptions [1].
[1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/188/console
Change-Id: Ia9b857069f775e2c8ecc5e07cf39b3a1fb7e3540
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r-- | functest/opnfv_tests/openstack/rally/rally.py | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/epc/juju_epc.py | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/ims/cloudify_ims.py | 3 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/router/cloudify_vrouter.py | 3 |
5 files changed, 5 insertions, 7 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index 1a2115ccd..efee15aee 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -473,9 +473,9 @@ class RallyBase(singlevm.VmReady1): def clean(self): """Cleanup of OpenStack resources. Should be called on completion.""" - super(RallyBase, self).clean() if self.flavor_alt: self.orig_cloud.delete_flavor(self.flavor_alt.id) + super(RallyBase, self).clean() def is_successful(self): """The overall result of the test.""" diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 8d989b0de..8e61253f8 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -357,8 +357,8 @@ class TempestCommon(singlevm.VmReady1): """ Cleanup all OpenStack objects. Should be called on completion. """ - super(TempestCommon, self).clean() if self.image_alt: self.cloud.delete_image(self.image_alt) if self.flavor_alt: self.orig_cloud.delete_flavor(self.flavor_alt.id) + super(TempestCommon, self).clean() diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py index 5429fe1e4..b43675544 100644 --- a/functest/opnfv_tests/vnf/epc/juju_epc.py +++ b/functest/opnfv_tests/vnf/epc/juju_epc.py @@ -384,11 +384,11 @@ class JujuEpc(singlevm.VmReady2): self.__logger.exception("General issue during the undeployment ..") for fip in self.cloud.list_floating_ips(): self.cloud.delete_floating_ip(fip.id) - super(JujuEpc, self).clean() if self.image_alt: self.cloud.delete_image(self.image_alt) if self.flavor_alt: self.orig_cloud.delete_flavor(self.flavor_alt.id) + super(JujuEpc, self).clean() # ---------------------------------------------------------- diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.py b/functest/opnfv_tests/vnf/ims/cloudify_ims.py index 8fa8c612b..f7931b7b7 100644 --- a/functest/opnfv_tests/vnf/ims/cloudify_ims.py +++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.py @@ -279,12 +279,11 @@ class CloudifyIms(cloudify.Cloudify): self.vnf['descriptor'].get('name')) except Exception: # pylint: disable=broad-except self.__logger.exception("Some issue during the undeployment ..") - - super(CloudifyIms, self).clean() if self.image_alt: self.cloud.delete_image(self.image_alt) if self.flavor_alt: self.orig_cloud.delete_flavor(self.flavor_alt.id) + super(CloudifyIms, self).clean() # ---------------------------------------------------------- diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py index 02d871fd9..f9266ff17 100644 --- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py +++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py @@ -249,12 +249,11 @@ class CloudifyVrouter(cloudify.Cloudify): self.vnf['descriptor'].get('name')) except Exception: # pylint: disable=broad-except self.__logger.exception("Some issue during the undeployment ..") - - super(CloudifyVrouter, self).clean() if self.image_alt: self.cloud.delete_image(self.image_alt) if self.flavor_alt: self.orig_cloud.delete_flavor(self.flavor_alt.id) + super(CloudifyVrouter, self).clean() def wait_for_execution(client, execution, logger, timeout=7200, ): |