diff options
author | 2019-07-24 16:40:42 -0400 | |
---|---|---|
committer | 2019-07-24 16:40:42 -0400 | |
commit | 0b4b16cf7c55e056433f599e480575d83a703341 (patch) | |
tree | 213bdd568c916571355af4dbdfbecb475a7cc831 /robot/resources/so_interface.robot | |
parent | 8316a86b3ec7d83b9bb162422e39ff390f4ebe6b (diff) |
move SO code to python for easier reuse
Issue-ID: TEST-179
Change-Id: I23db38db7810fc298df66dbde023a6ec559d46e8
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/so_interface.robot')
-rw-r--r-- | robot/resources/so_interface.robot | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/robot/resources/so_interface.robot b/robot/resources/so_interface.robot deleted file mode 100644 index 7c0e647b..00000000 --- a/robot/resources/so_interface.robot +++ /dev/null @@ -1,64 +0,0 @@ -*** Settings *** -Documentation The main interface for interacting with MSO. It handles low level stuff like managing the http request library and MSO required fields -Library ONAPLibrary.SO WITH NAME SO -Library ONAPLibrary.Templating WITH NAME Templating - -Resource global_properties.robot -*** Variables *** -${SO_HEALTH_CHECK_PATH} /manage/health -${CLOUD_CONFIG_PATH} /cloudSite -${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 *** -Run SO Global Health Check - SO.Run Get Request ${GLOBAL_SO_APIHAND_ENDPOINT} ${SO_HEALTH_CHECK_PATH} - SO.Run Get Request ${GLOBAL_SO_ASDCHAND_ENDPOINT} ${SO_HEALTH_CHECK_PATH} - SO.Run Get Request ${GLOBAL_SO_BPMN_ENDPOINT} ${SO_HEALTH_CHECK_PATH} - SO.Run Get Request ${GLOBAL_SO_CATDB_ENDPOINT} ${SO_HEALTH_CHECK_PATH} - SO.Run Get Request ${GLOBAL_SO_OPENSTACK_ENDPOINT} ${SO_HEALTH_CHECK_PATH} - SO.Run Get Request ${GLOBAL_SO_REQDB_ENDPOINT} ${SO_HEALTH_CHECK_PATH} - SO.Run Get Request ${GLOBAL_SO_SDNC_ENDPOINT} ${SO_HEALTH_CHECK_PATH} - SO.Run Get Request ${GLOBAL_SO_VFC_ENDPOINT} ${SO_HEALTH_CHECK_PATH} - SO.Run Get Request ${GLOBAL_SO_VNFM_ENDPOINT} ${SO_HEALTH_CHECK_PATH} - -Get Cloud Configuration - [Documentation] Gets cloud configuration in SO - [Arguments] ${site_name} - ${auth}= Create List ${GLOBAL_MSO_CATDB_USERNAME} ${GLOBAL_MSO_PASSWORD} - ${get_resp}= SO.Run Get Request ${GLOBAL_SO_CATDB_ENDPOINT} ${CLOUD_CONFIG_PATH}/${site_name} auth=${auth} - Should Be Equal As Strings ${get_resp.status_code} 200 - -Create Cloud Configuration - [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} - ${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} - Templating.Create Environment so ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template so ${SO_ADD_CLOUD_CONFIG} ${arguments} - ${auth}= Create List ${GLOBAL_MSO_CATDB_USERNAME} ${GLOBAL_MSO_PASSWORD} - ${get_resp}= SO.Run Put Request ${GLOBAL_SO_CATDB_ENDPOINT} ${CLOUD_CONFIG_PATH}/${site_name} ${data} auth=${auth} - ${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} - Templating.Create Environment so ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template so ${SO_ADD_CLOUD_CONFIG_V3} ${arguments} - ${auth}= Create List ${GLOBAL_MSO_CATDB_USERNAME} ${GLOBAL_MSO_PASSWORD} - ${get_resp}= SO.Run Post Request ${GLOBAL_SO_CATDB_ENDPOINT} ${CLOUD_CONFIG_PATH} ${data} auth=${auth} - ${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} - ${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} - Templating.Create Environment so ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Templating.Apply Template so ${SO_ADD_CLOUD_CONFIG} ${arguments} - ${auth}= Create List ${GLOBAL_MSO_CATDB_USERNAME} ${GLOBAL_MSO_PASSWORD} - ${get_resp}= SO.Run Put Request ${GLOBAL_SO_CATDB_ENDPOINT} ${CLOUD_CONFIG_PATH}/${site_name} ${data} auth=${auth} - Should Be Equal As Strings ${get_resp.status_code} 200 - [Return] ${get_resp}
\ No newline at end of file |