summaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-07-24 16:40:42 -0400
committerDR695H <dr695h@att.com>2019-07-24 16:40:42 -0400
commit0b4b16cf7c55e056433f599e480575d83a703341 (patch)
tree213bdd568c916571355af4dbdfbecb475a7cc831 /robot/resources
parent8316a86b3ec7d83b9bb162422e39ff390f4ebe6b (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')
-rw-r--r--robot/resources/global_properties.robot5
-rw-r--r--robot/resources/so_interface.robot64
2 files changed, 4 insertions, 65 deletions
diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot
index 1a4fa0c8..7ccb09c2 100644
--- a/robot/resources/global_properties.robot
+++ b/robot/resources/global_properties.robot
@@ -44,4 +44,7 @@ ${GLOBAL_SO_OPENSTACK_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJ
${GLOBAL_SO_REQDB_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_REQDB_IP_ADDR}:${GLOBAL_MSO_REQDB_SERVER_PORT}
${GLOBAL_SO_SDNC_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_SDNC_IP_ADDR}:${GLOBAL_MSO_SDNC_SERVER_PORT}
${GLOBAL_SO_VFC_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_VFC_IP_ADDR}:${GLOBAL_MSO_VFC_SERVER_PORT}
-${GLOBAL_SO_VNFM_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_VNFM_IP_ADDR}:${GLOBAL_MSO_VNFM_SERVER_PORT} \ No newline at end of file
+${GLOBAL_SO_VNFM_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_VNFM_IP_ADDR}:${GLOBAL_MSO_VNFM_SERVER_PORT}
+${GLOBAL_SO_HEALTH_CHECK_PATH} /manage/health
+${GLOBAL_SO_CLOUD_CONFIG_PATH} /cloudSite
+${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE} robot/assets/templates/so/create_cloud_config.jinja \ No newline at end of file
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