From: Alex Yang Date: Thu, 7 Sep 2017 01:26:37 +0000 (+0800) Subject: Fix creds used by vrouter X-Git-Tag: opnfv-5.0.RC1~100^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F41249%2F1;p=functest.git Fix creds used by vrouter 1. 'CloudifyVrouter' object has no attribute 'creds' 2. snaps_cred was set in VnfOnBoarding.prepare() Change-Id: I7d7ba60627f82c6e40d2c6190b110d6029740eb2 Signed-off-by: Alex Yang --- diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py index c3cccb989..edbdb495f 100644 --- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py +++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py @@ -25,7 +25,6 @@ import functest.utils.openstack_utils as os_utils from git import Repo -from snaps.openstack.os_credentials import OSCreds from snaps.openstack.create_network import (NetworkSettings, SubnetSettings, OpenStackNetwork) from snaps.openstack.create_security_group import (SecurityGroupSettings, @@ -110,17 +109,10 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase): self.__logger.info("Additional pre-configuration steps") - self.snaps_creds = OSCreds( - username=self.creds['username'], - password=self.creds['password'], - auth_url=self.creds['auth_url'], - project_name=self.creds['tenant'], - identity_api_version=int(os_utils.get_keystone_client_version())) - - self.util.set_credentials(self.creds["username"], - self.creds["password"], - self.creds["auth_url"], - self.creds["tenant"]) + self.util.set_credentials(self.snaps_creds.username, + self.snaps_creds.password, + self.snaps_creds.auth_url, + self.snaps_creds.project_name) # needs some images self.__logger.info("Upload some OS images if it doesn't exist")