Automatically Set Tenant in Robot VM 39/11539/2
authorYang Xu <xuyang11@gmail.com>
Mon, 11 Sep 2017 04:10:43 +0000 (00:10 -0400)
committerYang Xu <xuyang11@gmail.com>
Mon, 11 Sep 2017 21:42:07 +0000 (17:42 -0400)
Issue-Id: INT-192
Change-Id: I9f8a4bb3dc0131385ef6316548a8d2b52eb53037
Signed-off-by: Yang Xu <xuyang11@gmail.com>
robot/assets/templates/keystone_get_auth.template
robot/resources/openstack/keystone_interface.robot

index 776ed49..c3fa82f 100644 (file)
@@ -1,9 +1,9 @@
 {
   "auth": {
-    "tenantName" : "${tenantName}",
+    "tenantId" : "${tenantId}",
     "passwordCredentials": {
       "username": "${username}",
       "password": "${password}"
     }
   }
-}
\ No newline at end of file
+}
index 1243a19..3c3de90 100644 (file)
@@ -23,7 +23,7 @@ Run Openstack Auth Request
     ${session}=    Create Session      keystone        ${GLOBAL_INJECTED_KEYSTONE}    verify=True
     ${uuid}=    Generate UUID
     ${data_template}=    OperatingSystem.Get File    ${OPENSTACK_KEYSTONE_AUTH_BODY_FILE}
-    ${arguments}=    Create Dictionary    username=${username}    password=${password}   tenantName=${GLOBAL_OPENSTACK_TENANT_NAME}
+    ${arguments}=    Create Dictionary    username=${username}    password=${password}   tenantId=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID}
     ${data}=   Fill JSON Template    ${data_template}    ${arguments}
     ${data_path}=    Catenate    ${OPENSTACK_KEYSTONE_API_VERSION}${OPENSTACK_KEYSTONE_AUTH_PATH}
     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
@@ -52,4 +52,4 @@ Set Openstack Credentials
     [Return]   ${user}   ${pass}
 
 Get Openstack Credentials
-    [Return]   ${GLOBAL_INJECTED_OPENSTACK_USERNAME}    ${GLOBAL_INJECTED_OPENSTACK_PASSWORD}
\ No newline at end of file
+    [Return]   ${GLOBAL_INJECTED_OPENSTACK_USERNAME}    ${GLOBAL_INJECTED_OPENSTACK_PASSWORD}