aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--red.xml1
-rw-r--r--robot/resources/asdc_interface.robot2
-rw-r--r--robot/resources/demo_preload.robot1
-rw-r--r--robot/resources/global_properties.robot11
-rw-r--r--robot/resources/heatbridge.robot2
-rw-r--r--robot/resources/sdngc_interface.robot2
-rw-r--r--robot/resources/so/create_cloud_config.robot57
-rw-r--r--robot/resources/so_interface.robot190
-rw-r--r--robot/resources/stack_validation/policy_check_vfw.robot2
-rw-r--r--robot/resources/test_templates/model_test_template.robot2
-rw-r--r--robot/resources/test_templates/model_test_template_vcperescust.robot2
-rw-r--r--robot/resources/test_templates/vnf_orchestration_test_template.robot6
-rw-r--r--robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot9
-rw-r--r--robot/resources/vid/create_service_instance.robot12
-rw-r--r--robot/resources/vid/create_vid_vnf.robot11
-rw-r--r--robot/resources/vid/teardown_vid.robot4
-rw-r--r--robot/testsuites/create-cloud-config.robot2
17 files changed, 93 insertions, 223 deletions
diff --git a/red.xml b/red.xml
index 8e88eb62..56e9837e 100644
--- a/red.xml
+++ b/red.xml
@@ -22,6 +22,7 @@
<referencedLibrary type="PYTHON" name="ONAPLibrary.SDC" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="ONAPLibrary.PreloadData" path="testsuite/robot/library"/>
<referencedLibrary type="PYTHON" name="ONAPLibrary.AAI" path="testsuite/robot/library"/>
+ <referencedLibrary type="PYTHON" name="ONAPLibrary.SO" path="testsuite/robot/library"/>
<pythonpath>
<path location="robot/library"/>
</pythonpath>
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index ecd0211a..7fa648fb 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -95,7 +95,7 @@ Distribute Model From ASDC
\ Set To Dictionary ${resource_types} ${resource_type_string} ${loop_catalog_resource_id}
\ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
- ServiceMapping.Set Directory default ./demo/service_mapping
+ ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
${vnflist}= ServiceMapping.Get Service Vnf Mapping default ${service}
# Spread the icons on the pallette starting on the left
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index 50a99e47..97932527 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -5,7 +5,6 @@ Resource test_templates/model_test_template.robot
Resource test_templates/model_test_template_vcperescust.robot
Resource test_templates/vnf_orchestration_test_template.robot
Resource asdc_interface.robot
-Resource so_interface.robot
Resource vid/vid_interface.robot
Resource consul_interface.robot
Resource policy_interface.robot
diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot
index cdb73f4f..1a4fa0c8 100644
--- a/robot/resources/global_properties.robot
+++ b/robot/resources/global_properties.robot
@@ -34,3 +34,14 @@ ${GLOBAL_AAI_ZONE_NAME} nova
${GLOBAL_AAI_DESIGN_TYPE} integration
${GLOBAL_AAI_ZONE_CONTEXT} labs
${GLOBAL_TEMPLATE_FOLDER} robot/assets/templates
+${GLOBAL_SERVICE_MAPPING_DIRECTORY} ./demo/service_mapping
+${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_MSO_SERVER_PORT}
+${GLOBAL_SO_APIHAND_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_APIHAND_IP_ADDR}:${GLOBAL_MSO_APIHAND_SERVER_PORT}
+${GLOBAL_SO_ASDCHAND_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_ASDCHAND_IP_ADDR}:${GLOBAL_MSO__ASDCHAND_SERVER_PORT}
+${GLOBAL_SO_BPMN_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_BPMN_IP_ADDR}:${GLOBAL_MSO_BPMN_SERVER_PORT}
+${GLOBAL_SO_CATDB_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_CATDB_IP_ADDR}:${GLOBAL_MSO__CATDB_SERVER_PORT}
+${GLOBAL_SO_OPENSTACK_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_OPENSTACK_IP_ADDR}:${GLOBAL_MSO_OPENSTACK_SERVER_PORT}
+${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
diff --git a/robot/resources/heatbridge.robot b/robot/resources/heatbridge.robot
index 1f1a6429..afecc1c5 100644
--- a/robot/resources/heatbridge.robot
+++ b/robot/resources/heatbridge.robot
@@ -80,7 +80,7 @@ Run Validation Query
[Documentation] Run A&AI query to validate the bulk add
[Arguments] ${stack_info} ${service} ${vnf_id}
Return from Keyword If '${service}' == ''
- ServiceMapping.Set Directory default ./demo/service_mapping
+ ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
${payload}= Run Get Generic VNF by VnfId ${vnf_id}
${vnf_type}= Catenate ${payload.json()[vnf-type]}
${server_name_parameter}= ServiceMapping.Get Validate Name Mapping default ${service} ${vnf_type}
diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot
index 6a2f6494..4f6f3326 100644
--- a/robot/resources/sdngc_interface.robot
+++ b/robot/resources/sdngc_interface.robot
@@ -91,7 +91,7 @@ Preload Vnf
[Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_modules} ${service} ${uuid}
${base_vf_module_type}= Catenate
${closedloop_vf_module}= Create Dictionary
- ServiceMapping.Set Directory default ./demo/service_mapping
+ ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
${templates}= ServiceMapping.Get Service Template Mapping default ${service} ${generic_vnf_type}
:FOR ${vf_module} IN @{vf_modules}
\ ${vf_module_type}= Get From Dictionary ${vf_module} name
diff --git a/robot/resources/so/create_cloud_config.robot b/robot/resources/so/create_cloud_config.robot
deleted file mode 100644
index 5f471fb9..00000000
--- a/robot/resources/so/create_cloud_config.robot
+++ /dev/null
@@ -1,57 +0,0 @@
-*** Settings ***
-Documentation Create Cloud Config
-
-Resource ../so_interface.robot
-Library OperatingSystem
-Library Collections
-Library ONAPLibrary.Templating WITH NAME Templating
-
-
-*** Variables ***
-${CLOUD_CONFIG_PATH} /cloudSite
-
-${SYSTEM USER} robot-ete
-${SO_ADD_CLOUD_CONFIG}= so/create_cloud_config.jinja
-${SO_ADD_CLOUD_CONFIG_V3}= so/cloud_config_v3.jinja
-
-*** Keywords ***
-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}
- ${get_resp}= Run SO Catalog Post request ${CLOUD_CONFIG_PATH}/${site_name} ${data}
-
- ${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}
- ${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}
- ${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}
- ${get_resp}= Run SO Catalog Put request ${CLOUD_CONFIG_PATH}/${site_name} ${data}
- Should Be Equal As Strings ${get_resp.status_code} 200
- [Return] ${get_resp}
-
-Get Cloud Configuration
- [Documentation] Gets cloud configuration in SO
- [Arguments] ${site_name}
- ${get_resp}= Run MSO Catalog Get request ${CLOUD_CONFIG_PATH}/${site_name}
- Should Be Equal As Strings ${get_resp.status_code} 200
-
-
diff --git a/robot/resources/so_interface.robot b/robot/resources/so_interface.robot
index 1e555dbf..f0491d31 100644
--- a/robot/resources/so_interface.robot
+++ b/robot/resources/so_interface.robot
@@ -1,152 +1,64 @@
*** 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 RequestsLibrary
-Library ONAPLibrary.Utilities
-Library OperatingSystem
-Library Collections
+Library ONAPLibrary.SO WITH NAME SO
+Library ONAPLibrary.Templating WITH NAME Templating
+
Resource global_properties.robot
*** Variables ***
-${MSO_HEALTH_CHECK_PATH} /manage/health
-${MSO_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_MSO_SERVER_PORT}
-${SO_APIHAND_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_APIHAND_IP_ADDR}:${GLOBAL_MSO_APIHAND_SERVER_PORT}
-${SO_ASDCHAND_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_ASDCHAND_IP_ADDR}:${GLOBAL_MSO__ASDCHAND_SERVER_PORT}
-${SO_BPMN_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_BPMN_IP_ADDR}:${GLOBAL_MSO_BPMN_SERVER_PORT}
-${SO_CATDB_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_CATDB_IP_ADDR}:${GLOBAL_MSO__CATDB_SERVER_PORT}
-${SO_OPENSTACK_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_OPENSTACK_IP_ADDR}:${GLOBAL_MSO_OPENSTACK_SERVER_PORT}
-${SO_REQDB_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_REQDB_IP_ADDR}:${GLOBAL_MSO_REQDB_SERVER_PORT}
-${SO_SDNC_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_SDNC_IP_ADDR}:${GLOBAL_MSO_SDNC_SERVER_PORT}
-${SO_VFC_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_VFC_IP_ADDR}:${GLOBAL_MSO_VFC_SERVER_PORT}
-${SO_VNFM_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_VNFM_IP_ADDR}:${GLOBAL_MSO_VNFM_SERVER_PORT}
+${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
- Run SO Container Health Check API_HANDLER ${SO_APIHAND_ENDPOINT}
- Run SO Container Health Check ASDC_HANDLER ${SO_ASDCHAND_ENDPOINT}
- Run SO Container Health Check BPMN_INFRA ${SO_BPMN_ENDPOINT}
- Run SO Container Health Check CATALOG_DB ${SO_CATDB_ENDPOINT}
- Run SO Container Health Check OPENSTACK_INFRA ${SO_OPENSTACK_ENDPOINT}
- Run SO Container Health Check REQUEST_DB ${SO_REQDB_ENDPOINT}
- Run SO Container Health Check SDNC_INFRA ${SO_SDNC_ENDPOINT}
- Run SO Container Health Check VFC_INFRA ${SO_VFC_ENDPOINT}
- Run SO Container Health Check VNFM_INFRA ${SO_VNFM_ENDPOINT}
-
-
-Run SO Container Health Check
- [Documentation] Runs an MSO global health check
- [Arguments] ${so_endpoint_label} ${so_endpoint}
- ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- ${session}= Create Session mso ${so_endpoint}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Get Request mso ${MSO_HEALTH_CHECK_PATH} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Run MSO Get ModelInvariantId
- [Documentation] Runs an MSO Get ModelInvariantID for ClosedLoop Policies
- [Arguments] ${service_model_name} ${vf_module_label}=NULL
- ${param_dict}= Create Dictionary serviceModelName ${service_model_name}
- ${param}= Evaluate urllib.urlencode(${param_dict}) urllib
- ${data_path}= Catenate SEPARATOR= /ecomp/mso/catalog/v2/serviceVnfs? ${param}
- ${resp}= Run MSO Catalog Get Request ${data_path}
- Log ${resp.json()}
- # ${resp.json()['serviceVnfs'][0]['vfModules'][0]['vfModuleLabel'] should be 'base_vpkg'
- ${model_invariant_id}= Set Variable NULL
- @{ITEMS}= Copy List ${resp.json()['serviceVnfs']}
- :FOR ${ELEMENT} IN @{ITEMS}
- \ Log ${ELEMENT['vfModules']}
- \ ${model_invariant_id} Set Variable If ('${vf_module_label}' in '${ELEMENT['vfModules'][0]['vfModuleLabel']}') ${ELEMENT['modelInfo']['modelInvariantUuid']} NULL
- \ Exit For Loop If '${model_invariant_id}' != 'NULL'
- Should Not Be Equal As Strings ${model_invariant_id} NULL
- [Return] ${model_invariant_id}
-
-Run MSO Get Request
- [Documentation] Runs an MSO get request
- [Arguments] ${data_path} ${accept}=application/json
- ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- Log Creating session ${MSO_ENDPOINT}
- ${session}= Create Session mso ${MSO_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=${accept} Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Get Request mso ${data_path} headers=${headers}
- Log Received response from mso ${resp.text}
- [Return] ${resp}
+ Run Get Request ${GLOBAL_SO_APIHAND_ENDPOINT} ${SO_HEALTH_CHECK_PATH}
+ Run Get Request ${GLOBAL_SO_ASDCHAND_ENDPOINT} ${SO_HEALTH_CHECK_PATH}
+ Run Get Request ${GLOBAL_SO_BPMN_ENDPOINT} ${SO_HEALTH_CHECK_PATH}
+ Run Get Request ${GLOBAL_SO_CATDB_ENDPOINT} ${SO_HEALTH_CHECK_PATH}
+ Run Get Request ${GLOBAL_SO_OPENSTACK_ENDPOINT} ${SO_HEALTH_CHECK_PATH}
+ Run Get Request ${GLOBAL_SO_REQDB_ENDPOINT} ${SO_HEALTH_CHECK_PATH}
+ Run Get Request ${GLOBAL_SO_SDNC_ENDPOINT} ${SO_HEALTH_CHECK_PATH}
+ Run Get Request ${GLOBAL_SO_VFC_ENDPOINT} ${SO_HEALTH_CHECK_PATH}
+ Run Get Request ${GLOBAL_SO_VNFM_ENDPOINT} ${SO_HEALTH_CHECK_PATH}
-Run MSO Catalog Get Request
- [Documentation] Runs an MSO get request
- [Arguments] ${data_path} ${accept}=application/json
+Get Cloud Configuration
+ [Documentation] Gets cloud configuration in SO
+ [Arguments] ${site_name}
${auth}= Create List ${GLOBAL_MSO_CATDB_USERNAME} ${GLOBAL_MSO_PASSWORD}
- Log Creating session ${SO_CATDB_ENDPOINT}
- ${session}= Create Session so_catdb ${SO_CATDB_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=${accept} Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Get Request so_catdb ${data_path} headers=${headers}
- Log Received response from so_catdb ${resp.text}
- [Return] ${resp}
-
-
-Poll MSO Get Request
- [Documentation] Runs an MSO get request until a certain status is received. valid values are COMPLETE
- [Arguments] ${data_path} ${status}
- ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- Log Creating session ${MSO_ENDPOINT}
- ${session}= Create Session mso ${MSO_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- #do this until it is done
- :FOR ${i} IN RANGE 20
- \ ${resp}= Get Request mso ${data_path} headers=${headers}
- \ Should Not Contain ${resp.text} FAILED
- \ Log ${resp.json()['request']['requestStatus']['requestState']}
- \ ${exit_loop}= Evaluate "${resp.json()['request']['requestStatus']['requestState']}" == "${status}"
- \ Exit For Loop If ${exit_loop}
- \ Sleep 15s
- Log Received response from mso ${resp.text}
- [Return] ${resp}
-
-Run MSO Post request
- [Documentation] Runs an MSO post request
- [Arguments] ${data_path} ${data}
- ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- Log Creating session ${MSO_ENDPOINT}
- ${session}= Create Session mso ${MSO_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Post Request mso ${data_path} data=${data} headers=${headers}
- Log Received response from mso ${resp.text}
- [Return] ${resp}
-
-Run SO Catalog Post request
- [Documentation] Runs an SO post request
- [Arguments] ${data_path} ${data} ${so_port}=
+ ${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}
- Log Creating session ${SO_CATDB_ENDPOINT}
- ${session}= Create Session so_catdb ${SO_CATDB_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Post Request so_catdb ${data_path} data=${data} headers=${headers}
- Log Received response from so_catdb ${resp.text}
- [Return] ${resp}
+ ${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
-Run SO Catalog Put request
- [Documentation] Runs an SO put request
- [Arguments] ${data_path} ${data} ${so_port}=
+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}
- Log Creating session ${SO_CATDB_ENDPOINT}
- ${session}= Create Session so_catdb ${SO_CATDB_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Put Request so_catdb ${data_path} data=${data} headers=${headers}
- Log Received response from so_catdb ${resp.text}
- [Return] ${resp}
+ ${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)$
-Run MSO Delete request
- [Documentation] Runs an MSO Delete request
- [Arguments] ${data_path} ${data}
- ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- Log Creating session ${MSO_ENDPOINT}
- ${session}= Create Session mso ${MSO_ENDPOINT} auth=${auth}
- ${uuid}= Generate UUID4
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Delete Request mso ${data_path} ${data} headers=${headers}
- Log Received response from mso ${resp.text}
- [Return] ${resp}
+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
diff --git a/robot/resources/stack_validation/policy_check_vfw.robot b/robot/resources/stack_validation/policy_check_vfw.robot
index ea791cde..7b73db0f 100644
--- a/robot/resources/stack_validation/policy_check_vfw.robot
+++ b/robot/resources/stack_validation/policy_check_vfw.robot
@@ -83,7 +83,7 @@ Policy Check vLB Stack
[Return] ${dnsscaling}
Get DNSScaling Prefix
- ServiceMapping.Set Directory default ./demo/service_mapping
+ ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
${mapping}= ServiceMapping.Get Service Template Mapping default vLB vLB
:FOR ${dict} IN @{mapping}
\ Return From Keyword If '${dict['isBase']}' == 'false' ${dict['prefix']}
diff --git a/robot/resources/test_templates/model_test_template.robot b/robot/resources/test_templates/model_test_template.robot
index dfbf541c..dbbe2644 100644
--- a/robot/resources/test_templates/model_test_template.robot
+++ b/robot/resources/test_templates/model_test_template.robot
@@ -15,7 +15,7 @@ ${ASDC_ZIP_DIRECTORY} ${ASDC_ASSETS_DIRECTORY}/temp
*** Keywords ***
Model Distribution For Directory
[Arguments] ${service} ${catalog_service_name}= ${cds}=
- ServiceMapping.Set Directory default ./demo/service_mapping
+ ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
${directory_list}= ServiceMapping.Get Service Folder Mapping default ${service}
${ziplist}= Create List
${uuid}= Get Current Date
diff --git a/robot/resources/test_templates/model_test_template_vcperescust.robot b/robot/resources/test_templates/model_test_template_vcperescust.robot
index ad7c6a07..bcce51e2 100644
--- a/robot/resources/test_templates/model_test_template_vcperescust.robot
+++ b/robot/resources/test_templates/model_test_template_vcperescust.robot
@@ -15,7 +15,7 @@ ${ASDC_ZIP_DIRECTORY} ${ASDC_ASSETS_DIRECTORY}/temp
*** Keywords ***
Model Distribution For vCPEResCust Directory
[Arguments] ${service} ${catalog_service_name}= ${cds}=
- ServiceMapping.Set Directory default ./demo/service_mapping
+ ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
${directory_list}= ServiceMapping.Get Service Folder Mapping default ${service}
${ziplist}= Create List
${uuid}= Get Current Date
diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot
index 6c21e4a4..3311c8bb 100644
--- a/robot/resources/test_templates/vnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot
@@ -50,7 +50,7 @@ Orchestrate VNF
Login To VID GUI
${service_instance_id}= Wait Until Keyword Succeeds 300s 5s Create VID Service Instance ${customer_name} ${service_model_type} ${service} ${service_name} ${project_name} ${owning_entity}
Validate Service Instance ${service_instance_id} ${service} ${customer_name}
- ServiceMapping.Set Directory default ./demo/service_mapping
+ ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
${vnflist}= ServiceMapping.Get Service Vnf Mapping default ${service}
${generic_vnfs}= Create Dictionary
${vnf_name_index}= Set Variable 0
@@ -95,7 +95,7 @@ Orchestrate Demo VNF
Login To VID GUI
${service_instance_id}= Wait Until Keyword Succeeds 300s 5s Create VID Service Instance ${customer_name} ${service_model_type} ${service} ${service_name} ${project_name} ${owning_entity}
Validate Service Instance ${service_instance_id} ${service} ${customer_name}
- ServiceMapping.Set Directory default ./demo/service_mapping
+ ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
${vnflist}= ServiceMapping.Get Service Vnf Mapping default ${service}
${generic_vnfs}= Create Dictionary
:FOR ${vnf} IN @{vnflist}
@@ -147,7 +147,7 @@ Get Catalog Resource
Get Name Pattern
[Documentation] To support services with multiple VNFs, we need to dig the vnf type out of the SDC catalog resources to select in the VID UI
[Arguments] ${vnf} ${service}
- ServiceMapping.Set Directory default ./demo/service_mapping
+ ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
${list}= ServiceMapping.Get Service Template Mapping default ${service} ${vnf}
:FOR ${dict} IN @{list}
\ ${base_name}= Get From Dictionary ${dict} name_pattern
diff --git a/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot b/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot
index 537dc5f1..f203b167 100644
--- a/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot
@@ -18,7 +18,6 @@ Resource ../openstack/neutron_interface.robot
Resource ../heatbridge.robot
Resource ../global_properties.robot
-Resource ../so_interface.robot
Library ONAPLibrary.Openstack
Library ONAPLibrary.Utilities
@@ -29,6 +28,7 @@ Library ONAPLibrary.JSON
Library RequestsLibrary
Library Collections
+Library ONAPLibrary.SO WITH NAME SO
*** Variables ***
${service_template} robot/assets/cds/service-Vfirewall0911-template.yml
@@ -85,7 +85,8 @@ Orchestrate VNF With CDS
Log --------request--------
Log ${request}
Log --------end request--------
- ${resp}= Run MSO Post Request ${so_uri_path} ${request}
+ ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
+ ${resp}= SO.Run Post Request ${GLOBAL_SO_ENDPOINT} ${so_uri_path} ${data} auth=${auth}
Log --------response-------
${json_string}= Evaluate json.dumps(${resp.json()}) json
Log ${json_string}
@@ -93,8 +94,8 @@ Orchestrate VNF With CDS
${requestId}= Catenate ${resp.json()['requestReferences']['requestId']}
Log requestId=${requestId}
Log -------end response-------
- # Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
-
+ # ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
+ # Run Polling Get Request ${MSO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
Get VNF Info
[Documentation] Get VNF Info
diff --git a/robot/resources/vid/create_service_instance.robot b/robot/resources/vid/create_service_instance.robot
index 45ea899d..ffb3e044 100644
--- a/robot/resources/vid/create_service_instance.robot
+++ b/robot/resources/vid/create_service_instance.robot
@@ -1,14 +1,13 @@
*** Settings ***
Documentation Creates VID Service Instance
-...
-... Creates VID Service Instance
Library SeleniumLibrary
Library ONAPLibrary.Utilities
Library String
Library DateTime
+Library ONAPLibrary.SO WITH NAME SO
-Resource ../so_interface.robot
+Resource ../global_properties.robot
Resource vid_interface.robot
*** Keywords ***
@@ -37,7 +36,8 @@ Create VID Service Instance
Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Close']
${request_id}= Parse Request Id ${response text}
${service_instance_id}= Parse Instance Id ${response text}
- Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
+ ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
+ SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
[return] ${service_instance_id}
Wait For Model
@@ -58,8 +58,8 @@ Delete Service Instance By GUI
Wait Until Element Contains xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
${request_id}= Parse Request Id ${response text}
- Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
-
+ ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
+ SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
Search Service Instance
[Arguments] ${service_instance_id}
diff --git a/robot/resources/vid/create_vid_vnf.robot b/robot/resources/vid/create_vid_vnf.robot
index a0110a2b..cdcee11a 100644
--- a/robot/resources/vid/create_vid_vnf.robot
+++ b/robot/resources/vid/create_vid_vnf.robot
@@ -5,12 +5,11 @@ Library SeleniumLibrary 60
Library String
Library DateTime
Library RequestsLibrary
-
-Resource ../so_interface.robot
+Resource ../global_properties.robot
Resource vid_interface.robot
+Library ONAPLibrary.SO WITH NAME SO
*** Keywords ***
-
Create VID VNF
[Documentation] Creates a VNF instance using VID for passed instance id with the passed service instance name
[Arguments] ${service_instance_id} ${service_instance_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} ${customer} ${line_of_business}=LOB-Demonstration ${platform}=Platform-Demonstration
@@ -84,7 +83,8 @@ Delete VID VNF
${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
${request_id}= Parse Request Id ${response text}
- Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
+ ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
+ ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
Create VID VNF module
[Arguments] ${service_instance_id} ${vf_module_name} ${lcp_region} ${TENANT} ${VNF_TYPE} ${customer} ${vnf_name}
@@ -124,7 +124,8 @@ Create VID VNF module
${instance_id}= Parse Instance Id ${response text}
${request_id}= Parse Request Id ${response text}
- Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
+ ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
+ ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
[Return] ${instance_id}
Wait For Add VF Module
diff --git a/robot/resources/vid/teardown_vid.robot b/robot/resources/vid/teardown_vid.robot
index f1b6daa8..706c3c44 100644
--- a/robot/resources/vid/teardown_vid.robot
+++ b/robot/resources/vid/teardown_vid.robot
@@ -3,6 +3,7 @@ Documentation The main interface for interacting with VID. It handles low le
Library SeleniumLibrary
Library Collections
Library String
+Library ONAPLibrary.SO WITH NAME SO
Resource vid_interface.robot
Resource create_vid_vnf.robot
Resource create_service_instance.robot
@@ -81,7 +82,8 @@ Delete Next VID Entity
${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
${request_id}= Parse Request Id ${response text}
Click Element xpath=//div[@class='ng-scope']/div[@class = 'buttonRow']/button[text() = 'Close']
- Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
+ ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
+ ${resp}= SO.Run Polling Get Request ${GLOBAL_SO_ENDPOINT} ${GLOBAL_MSO_STATUS_PATH}${request_id} auth=${auth}
[Return] ${teardown_status} ${vfmodule}
Handle VID Alert
diff --git a/robot/testsuites/create-cloud-config.robot b/robot/testsuites/create-cloud-config.robot
index 662bc29a..385f6ec6 100644
--- a/robot/testsuites/create-cloud-config.robot
+++ b/robot/testsuites/create-cloud-config.robot
@@ -3,7 +3,7 @@ Documentation SO Cloud Config Test Cases
Test Timeout 1 minute
-Resource ../resources/so/create_cloud_config.robot
+Resource ../resources/so_interface.robot
Resource ../resources/aai/create_tenant.robot