Update for v3 KEYSTONE SO config 77/85377/2
authorBrian Freeman <bf1936@att.com>
Mon, 15 Apr 2019 21:57:18 +0000 (16:57 -0500)
committerBrian Freeman <bf1936@att.com>
Mon, 15 Apr 2019 22:01:10 +0000 (17:01 -0500)
Issue-ID: INT-1026
Change-Id: I18f521030683f2b8ee7a42d837c49e630dc1cfbb
Signed-off-by: Brian Freeman <bf1936@att.com>
robot/assets/templates/so/cloud_config_v3.template [new file with mode: 0644]
robot/resources/so/create_cloud_config.robot
robot/testsuites/create-cloud-config.robot

diff --git a/robot/assets/templates/so/cloud_config_v3.template b/robot/assets/templates/so/cloud_config_v3.template
new file mode 100644 (file)
index 0000000..6167458
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "id": "${site_name}",
+  "region_id": "${region_id}",
+  "aic_version": "2.5", 
+  "clli": "${clli}",   
+  "identityService": {
+       "identity_url": "${identity_url}",  
+       "mso_id": "${mso_id}", 
+    "mso_pass": "${mso_pass}",   
+    "admin_tenant": "${admin_tenant}", 
+    "member_role": "${member_role}", 
+    "tenant_meta_data": true,
+    "id": "${identity_id}", 
+    "identity_server_type": "${identity_server_type}",     
+    "identity_authentication_type": "${authentication_type}",
+    "project_domain_name": "${project_domain_name}",
+    "user_domain_name": "${user_domain_name}"
+  } 
+}
index be57812..8762d41 100644 (file)
@@ -12,6 +12,7 @@ ${CLOUD_CONFIG_PATH}    /cloudSite
 
 ${SYSTEM USER}    robot-ete
 ${SO_ADD_CLOUD_CONFIG}=   robot/assets/templates/so/create_cloud_config.template
+${SO_ADD_CLOUD_CONFIG_V3}=   robot/assets/templates/so/cloud_config_v3.template
 
 *** Keywords ***
 Create Cloud Configuration
@@ -24,6 +25,17 @@ Create Cloud Configuration
     ${get_resp}=    Run Keyword If    '${get_resp.status_code}'=='404'    Update Cloud Configuration    ${site_name}    ${region_id}   ${clli}   ${identity_id}   ${identity_url}   ${mso_id}    ${mso_pass}    ${admin_tenant}    ${member_role}    ${identity_server_type}    ${authentication_type}
     Should Be Equal As Strings  ${get_resp.status_code}     200
 
+
+Create Cloud Configuration v3
+    [Documentation]    Creates a cloud configuration in SO, so it knows how to talk to an openstack cloud
+    [Arguments]    ${site_name}    ${region_id}   ${clli}   ${identity_id}   ${identity_url}   ${mso_id}    ${mso_pass}    ${admin_tenant}    ${member_role}    ${identity_server_type}    ${authentication_type}    ${project_domain_name}    ${user_domain_Name}
+    ${arguments}=    Create Dictionary     site_name=${site_name}  region_id=${region_id}  clli=${clli}    identity_id=${identity_id}    identity_url=${identity_url}    mso_id=${mso_id}    mso_pass=${mso_pass}    admin_tenant=${admin_tenant}   member_role=${member_role}     identity_server_type=${identity_server_type}     authentication_type=${authentication_type}    project_domain_name=${project_domain_name}    user_domain_name=${user_domain_name}
+    Log    ${arguments}
+    ${data}=   Fill JSON Template File    ${SO_ADD_CLOUD_CONFIG_V3}     ${arguments}
+    ${get_resp}=    Run SO Catalog Post request     ${CLOUD_CONFIG_PATH}     ${data}
+    ${status_string}=    Convert To String    ${get_resp.status_code}
+    Should Match Regexp    ${status_string}    ^(201|200)$
+
 Update Cloud Configuration
     [Documentation]    Updates a cloud configuration in SO
     [Arguments]    ${site_name}    ${region_id}   ${clli}   ${identity_id}   ${identity_url}   ${mso_id}    ${mso_pass}    ${admin_tenant}    ${member_role}    ${identity_server_type}    ${authentication_type}
index 3c1277c..7a798a4 100644 (file)
@@ -10,7 +10,16 @@ Resource          ../resources/so/create_cloud_config.robot
 Create Cloud Config Test
     [TAGS]    mso    cloudconfig
     # Run Create Cloud Configuration    RegionOne   RegionOne   RegionOne    DEFAULT_KEYSTONE    identify_url:http://10.12.25.2:5000/v2.0    mso_id:demo  mso_pass:encrypted_password  admin_tenant:1e097c6713e74fd7ac8e4295e605ee1e    member_role:admin    identity_server_type:KEYSTONE    identity_authentication_type:USERNAME_PASSWORD
-    Create Cloud Configuration    ${GLOBAL_INJECTED_REGION}   ${GLOBAL_INJECTED_REGION}  ${GLOBAL_INJECTED_REGION}   DEFAULT_KEYSTONE    ${GLOBAL_INJECTED_KEYSTONE}/${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION}    ${GLOBAL_INJECTED_OPENSTACK_USERNAME}   ${GLOBAL_INJECTED_OPENSTACK_API_KEY}    ${GLOBAL_INJECTED_OPENSTACK_TENANT_ID}     admin    KEYSTONE    USERNAME_PASSWORD 
+    Create Cloud Configuration    ${GLOBAL_INJECTED_REGION}   ${GLOBAL_INJECTED_REGION}  ${GLOBAL_INJECTED_REGION}   DEFAULT_KEYSTONE    ${GLOBAL_INJECTED_KEYSTONE}/${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION}    ${GLOBAL_INJECTED_OPENSTACK_USERNAME}   ${GLOBAL_INJECTED_OPENSTACK_MSO_ENCRYPTED_PASSWORD}    ${GLOBAL_INJECTED_OPENSTACK_TENANT_ID}     admin    KEYSTONE    USERNAME_PASSWORD 
+
+Create Cloud Config RegionThree V3 Test
+    [TAGS]    mso    cloudconfig  cloudconfigv3
+    #     [Arguments]    ${site_name}    ${region_id}   ${clli}   ${identity_id}   ${identity_url}   ${mso_id}    ${mso_pass}    ${admin_tenant}    ${member_role}    ${identity_server_type}    ${authentication_type}    ${project_domain_name}    ${user_domain_Name}
+    # ${region_id} in openstack is set up by cloud administration and does not have to be same as ONAP ${site_name}
+    # In Windriver/Intel test labs the os_region_id's are all set to "RegionOne"
+    # clli by testing team convention is same as onap site_name
+    #  KEYSTONE URL should end in /v3 SO will put /auth when KEYSTONE_V3 is the identity_server_type
+    Create Cloud Configuration v3    ${GLOBAL_INJECTED_REGION_THREE}   ${GLOBAL_INJECTED_REGION}  ${GLOBAL_INJECTED_REGION_THREE}   REGION_THREE_KEYSTONE    ${GLOBAL_INJECTED_KEYSTONE_REGION_THREE}/${GLOBAL_INJECTED_OPENSTACK_KEYSTONE_API_VERSION_REGION_THREE}     ${GLOBAL_INJECTED_OPENSTACK_USERNAME_REGION_THREE}   ${GLOBAL_INJECTED_OPENSTACK_MSO_ENCRYPTED_PASSWORD_REGION_THREE}    ${GLOBAL_INJECTED_OPENSTACK_TENANT_ID_REGION_THREE}     admin    KEYSTONE_V3    USERNAME_PASSWORD  ${GLOBAL_INJECTED_OPENSTACK_PROJECT_DOMAIN__REGION_THREE}  ${GLOBAL_INJECTED_OPENSTACK_USER_DOMAIN__REGION_THREE}
 
 Get Cloud Config Test
     [TAGS]    mso    cloudconfig