diff options
-rw-r--r-- | robot/assets/templates/so/cloud_config_v3.template | 19 | ||||
-rw-r--r-- | robot/resources/so/create_cloud_config.robot | 12 | ||||
-rw-r--r-- | robot/testsuites/create-cloud-config.robot | 11 |
3 files changed, 41 insertions, 1 deletions
diff --git a/robot/assets/templates/so/cloud_config_v3.template b/robot/assets/templates/so/cloud_config_v3.template new file mode 100644 index 00000000..61674589 --- /dev/null +++ b/robot/assets/templates/so/cloud_config_v3.template @@ -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}" + } +} diff --git a/robot/resources/so/create_cloud_config.robot b/robot/resources/so/create_cloud_config.robot index be578127..8762d415 100644 --- a/robot/resources/so/create_cloud_config.robot +++ b/robot/resources/so/create_cloud_config.robot @@ -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} diff --git a/robot/testsuites/create-cloud-config.robot b/robot/testsuites/create-cloud-config.robot index 3c1277cb..7a798a4b 100644 --- a/robot/testsuites/create-cloud-config.robot +++ b/robot/testsuites/create-cloud-config.robot @@ -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 |