Fix usage of v3 APIs of OpenStack 87/31087/1
authorMichael Pauls <michael.pauls@fokus.fraunhofer.de>
Mon, 20 Mar 2017 15:08:13 +0000 (16:08 +0100)
committerMorgan Richomme <morgan.richomme@orange.com>
Mon, 20 Mar 2017 16:26:41 +0000 (16:26 +0000)
Using OS_PROJECT_ID instead of OS_TENANT_NAME as tenant
when onboarding a new VIM/PoP with Open Baton

Change-Id: I873badc73e7b33179fa487505d18ce89840d6599
Signed-off-by: Michael Pauls <michael.pauls@fokus.fraunhofer.de>
(cherry picked from commit 340cf9330af728dac334de7b391c3ea3971fd125)

functest/opnfv_tests/vnf/ims/orchestra_ims.py

index df57800..d13fe8f 100644 (file)
@@ -308,12 +308,15 @@ class ImsVnf(vnf_base.VnfOnBoardingBase):
         if self.ob_projectid == "":
             self.step_failure("Default project id was not found!")
 
+        creds = os_utils.get_credentials()
+        self.logger.info("PoP creds: %s" % creds)
+
         vim_json = {
             "name": "vim-instance",
-            "authUrl": os_utils.get_credentials().get("auth_url"),
-            "tenant": os_utils.get_credentials().get("tenant_name"),
-            "username": os_utils.get_credentials().get("username"),
-            "password": os_utils.get_credentials().get("password"),
+            "authUrl": creds.get("auth_url"),
+            "tenant": os.environ.get("OS_PROJECT_ID"),
+            "username": creds.get("username"),
+            "password": creds.get("password"),
             "securityGroups": [
                 "default",
                 "orchestra-sec-group"