diff options
Diffstat (limited to 'robot/resources')
-rw-r--r-- | robot/resources/asdc_interface.robot | 8 | ||||
-rw-r--r-- | robot/resources/clamp_interface.robot | 2 | ||||
-rw-r--r-- | robot/resources/demo_preload.robot | 4 | ||||
-rwxr-xr-x | robot/resources/dr_interface.robot | 23 | ||||
-rw-r--r-- | robot/resources/global_properties.robot | 2 | ||||
-rw-r--r-- | robot/resources/nbi_interface.robot | 2 | ||||
-rw-r--r-- | robot/resources/openstack/keystone_interface.robot | 7 | ||||
-rw-r--r-- | robot/resources/sdngc_interface.robot | 6 | ||||
-rw-r--r-- | robot/resources/so_interface.robot | 31 | ||||
-rw-r--r-- | robot/resources/test_templates/vnf_orchestration_test_template.robot | 3 | ||||
-rw-r--r-- | robot/resources/vid/vid_interface.robot | 5 |
11 files changed, 69 insertions, 24 deletions
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot index 382821e9..3e33fded 100644 --- a/robot/resources/asdc_interface.robot +++ b/robot/resources/asdc_interface.robot @@ -68,7 +68,7 @@ Distribute Model From ASDC # on certify it gets a new id ${catalog_service_id}= Certify ASDC Catalog Service ${catalog_service_id} Approve ASDC Catalog Service ${catalog_service_id} - : FOR ${DIST_INDEX} IN RANGE 3 + : FOR ${DIST_INDEX} IN RANGE 2 \ Log Distribution Attempt ${DIST_INDEX} \ Distribute ASDC Catalog Service ${catalog_service_id} \ ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} @@ -408,6 +408,8 @@ Check Catalog Service Distributed \ Log ${ELEMENT['omfComponentID']} \ Log ${ELEMENT['status']} \ ${SO_COMPLETE} Set Variable If (('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE + \ Exit For Loop If ('${SO_COMPLETE}'=='TRUE') + \ Exit For Loop If ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_ERROR') Should Be True ( '${SO_COMPLETE}'=='TRUE') SO Test Get Catalog Service Distribution Details [Documentation] gets an asdc catalog Service distrbution details @@ -421,13 +423,13 @@ Run ASDC Health Check ${uuid}= Generate UUID ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} ${resp}= Get Request asdc ${ASDC_HEALTH_CHECK_PATH} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.status_code} 200 SDC DOWN ${SDC_DE_HEALTH}= Catenate DOWN @{ITEMS}= Copy List ${resp.json()['componentsInfo']} :FOR ${ELEMENT} IN @{ITEMS} \ Log ${ELEMENT['healthCheckStatus']} \ ${SDC_DE_HEALTH} Set Variable If (('DE' in '${ELEMENT['healthCheckComponent']}') and ('${ELEMENT['healthCheckStatus']}' == 'UP')) or ('${SDC_DE_HEALTH}'=='UP') UP - Should Be Equal As Strings ${SDC_DE_HEALTH} UP + Should Be Equal As Strings ${SDC_DE_HEALTH} UP SDC_DE DOWN Run ASDC Get Request [Documentation] Runs an ASDC get request [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT} diff --git a/robot/resources/clamp_interface.robot b/robot/resources/clamp_interface.robot index 85a8c9e9..0adabd73 100644 --- a/robot/resources/clamp_interface.robot +++ b/robot/resources/clamp_interface.robot @@ -5,7 +5,7 @@ Library RequestsLibrary Resource global_properties.robot *** Variables *** -${CLAMP_HEALTH_CHECK_PATH} /restservices/clds/v1/clds/healthcheck +${CLAMP_HEALTH_CHECK_PATH} /restservices/clds/v1/healthcheck ${CLAMP_ENDPOINT} ${GLOBAL_CLAMP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CLAMP_IP_ADDR}:${GLOBAL_CLAMP_SERVER_PORT} diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot index f87cc366..460c249d 100644 --- a/robot/resources/demo_preload.robot +++ b/robot/resources/demo_preload.robot @@ -72,13 +72,15 @@ Distribute Model Create Customer For VNF Demo [Documentation] Create demo customer for the demo [Arguments] ${customer_name} ${customer_id} ${customer_type} ${clouder_owner} ${cloud_region_id} ${tenant_id} + Create Service If Not Exists vFW Create Service If Not Exists vFWCL Create Service If Not Exists vLB Create Service If Not Exists vCPE Create Service If Not Exists vIMS + Create Service If Not Exists gNB ${data_template}= OperatingSystem.Get File ${ADD_DEMO_CUSTOMER_BODY} ${arguments}= Create Dictionary subscriber_name=${customer_name} global_customer_id=${customer_id} subscriber_type=${customer_type} cloud_owner=${clouder_owner} cloud_region_id=${cloud_region_id} tenant_id=${tenant_id} - Set To Dictionary ${arguments} service1=vFWCL service2=vLB service3=vCPE service4=vIMS + Set To Dictionary ${arguments} service1=vFWCL service2=vLB service3=vCPE service4=vIMS service5=gNB service6=vFW ${data}= Fill JSON Template ${data_template} ${arguments} ${put_resp}= Run A&AI Put Request ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${data} ${status_string}= Convert To String ${put_resp.status_code} diff --git a/robot/resources/dr_interface.robot b/robot/resources/dr_interface.robot new file mode 100755 index 00000000..b368ce94 --- /dev/null +++ b/robot/resources/dr_interface.robot @@ -0,0 +1,23 @@ +*** Settings *** +Documentation The main interface for interacting with Data-Router. +Library RequestsLibrary + +Resource global_properties.robot + +*** Variables *** +${DR_HEALTH_CHECK_PATH} /internal/fetchProv +${DR_ENDPOINT} ${GLOBAL_DMAAP_DR_NODE_SERVER_PROTOCOL}://${GLOBAL_INJECTED_DMAAP_DR_NODE_IP_ADDR}:${GLOBAL_DMAAP_DR_NODE_SERVER_PORT} + + +*** Keywords *** +Run DR Health Check + [Documentation] Runs DR Health check + ${resp}= Run DR Get Request ${DR_HEALTH_CHECK_PATH} + Should Be Equal As Strings ${resp.status_code} 204 + +Run DR Get Request + [Documentation] Runs DR Get request + [Arguments] ${data_path} + ${session}= Create Session session ${DR_ENDPOINT} + ${resp}= Get Request session ${data_path} + [Return] ${resp} diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot index e32b01e9..7d8db8e0 100644 --- a/robot/resources/global_properties.robot +++ b/robot/resources/global_properties.robot @@ -6,7 +6,7 @@ Documentation store all properties that can change or are used in multipl *** Variables *** ${GLOBAL_APPLICATION_ID} robot-ete -${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v5/ +${GLOBAL_MSO_STATUS_PATH} /onap/so/infra/orchestrationRequests/v6/ ${GLOBAL_SELENIUM_BROWSER} chrome ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary ${GLOBAL_SELENIUM_DELAY} 0 diff --git a/robot/resources/nbi_interface.robot b/robot/resources/nbi_interface.robot index 076ecd20..9d5313de 100644 --- a/robot/resources/nbi_interface.robot +++ b/robot/resources/nbi_interface.robot @@ -5,7 +5,7 @@ Library RequestsLibrary Resource global_properties.robot *** Variables *** -${NBI_HEALTH_CHECK_PATH} /nbi/api/v1/status +${NBI_HEALTH_CHECK_PATH} /nbi/api/v3/status ${NBI_ENDPOINT} ${GLOBAL_NBI_SERVER_PROTOCOL}://${GLOBAL_INJECTED_NBI_IP_ADDR}:${GLOBAL_NBI_SERVER_PORT} diff --git a/robot/resources/openstack/keystone_interface.robot b/robot/resources/openstack/keystone_interface.robot index 4749eb08..b18674f7 100644 --- a/robot/resources/openstack/keystone_interface.robot +++ b/robot/resources/openstack/keystone_interface.robot @@ -54,7 +54,10 @@ Set Openstack Credentials [Return] ${user} ${pass} Get Openstack Credentials - [Return] ${GLOBAL_INJECTED_OPENSTACK_USERNAME} ${GLOBAL_INJECTED_OPENSTACK_PASSWORD} + [Documentation] Returns the Decripted Password and openstack username using same api_key.txt as SO + ${DECRYPTED_OPENSTACK_PASSWORD}= Run echo -n ${GLOBAL_INJECTED_OPENSTACK_API_KEY} | xxd -r -p | openssl enc -aes-128-ecb -d -nopad -nosalt -K aa3871669d893c7fb8abbcda31b88b4f | tr -d '\x08' + [Return] ${GLOBAL_INJECTED_OPENSTACK_USERNAME} ${DECRYPTED_OPENSTACK_PASSWORD} + Get Keystone Url And Path [Documentation] Handle arbitrary keystone identiit url. Add v2.0 if not present. @@ -63,4 +66,4 @@ Get Keystone Url And Path ${version}= Evaluate '' ${version}= Set Variable If '${OPENSTACK_KEYSTONE_API_VERSION}' not in '${pieces.path}' ${OPENSTACK_KEYSTONE_API_VERSION} ${version} ${path}= Catenate ${pieces.path}${version} - [Return] ${url} ${path}
\ No newline at end of file + [Return] ${url} ${path} diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot index 57198dbe..b311e9bd 100644 --- a/robot/resources/sdngc_interface.robot +++ b/robot/resources/sdngc_interface.robot @@ -117,7 +117,7 @@ Preload One Vnf Topology [Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_module_type} ${service} ${filename} ${uuid} Return From Keyword If '${filename}' == '' ${data_template}= OperatingSystem.Get File ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}/preload.template - ${parameters}= Get Template Parameters ${filename} ${uuid} + ${parameters}= Get Template Parameters ${generic_vnf_name} ${filename} ${uuid} Set To Dictionary ${parameters} generic_vnf_name=${generic_vnf_name} generic_vnf_type=${generic_vnf_type} service_type=${service_type_uuid} vf_module_name=${vf_module_name} vf_module_type=${vf_module_type} ${data}= Fill JSON Template ${data_template} ${parameters} ${put_resp}= Run SDNGC Post Request ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} ${data} @@ -126,7 +126,7 @@ Preload One Vnf Topology Should Be Equal As Strings ${get_resp.status_code} 200 Get Template Parameters - [Arguments] ${template} ${uuid} + [Arguments] ${generic_vnf_name} ${template} ${uuid} ${rest} ${suite}= Split String From Right ${SUITE NAME} . 1 ${uuid}= Catenate ${uuid} ${hostid}= Get Substring ${uuid} -4 @@ -147,7 +147,7 @@ Get Template Parameters # update the value map with unique values. - Set To Dictionary ${valuemap} uuid=${uuid} hostid=${hostid} ecompnet=${ecompnet} + Set To Dictionary ${valuemap} uuid=${uuid} hostid=${hostid} ecompnet=${ecompnet} generic_vnf_name=${generic_vnf_name} # # Mash together the defaults dict with the test case dict to create the set of diff --git a/robot/resources/so_interface.robot b/robot/resources/so_interface.robot index 70faf3bf..23ab9415 100644 --- a/robot/resources/so_interface.robot +++ b/robot/resources/so_interface.robot @@ -9,14 +9,14 @@ Resource ../resources/json_templater.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_IP_ADDR}:${GLOBAL_MSO_APIHAND_SERVER_PORT} -${SO_ASDCHAND_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_MSO__ASDCHAND_SERVER_PORT} -${SO_BPMN_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_MSO_BPMN_SERVER_PORT} -${SO_CATDB_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_MSO__CATDB_SERVER_PORT} -${SO_OPENSTACK_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_MSO_OPENSTACK_SERVER_PORT} -${SO_REQDB_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_MSO_REQDB_SERVER_PORT} -${SO_SDNC_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_MSO_SDNC_SERVER_PORT} -${SO_VFC_ENDPOINT} ${GLOBAL_MSO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_IP_ADDR}:${GLOBAL_MSO_VFC_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} *** Keywords *** Run SO Global Health Check @@ -46,7 +46,7 @@ Run MSO Get ModelInvariantId ${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 Get Request ${data_path} + ${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 @@ -69,6 +69,19 @@ Run MSO Get Request Log Received response from mso ${resp.text} [Return] ${resp} +Run MSO Catalog Get Request + [Documentation] Runs an MSO get request + [Arguments] ${data_path} ${accept}=application/json + ${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 UUID + ${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} diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot index 53d56962..3a9c5570 100644 --- a/robot/resources/test_templates/vnf_orchestration_test_template.robot +++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot @@ -80,7 +80,8 @@ Orchestrate VNF \ VLB Closed Loop Hack ${service} ${generic_vnf} ${closedloop_vf_module} \ Set Test Variable ${STACK_NAME} ${vf_module_name} \ Append To List ${STACK_NAMES} ${STACK_NAME} - \ Run Keyword and Ignore Error Execute Heatbridge ${vf_module_name} ${service_instance_id} ${vnf} + # TODO: Need to look at a better way to default ipv4_oam_interface search for Heatbridge + \ Run Keyword and Ignore Error Execute Heatbridge ${vf_module_name} ${service_instance_id} ${vnf} ipv4_oam_interface \ Run Keyword and Ignore Error Validate VF Module ${vf_module_name} ${vnf} [Return] ${vf_module_name} ${service} diff --git a/robot/resources/vid/vid_interface.robot b/robot/resources/vid/vid_interface.robot index ec017577..35522793 100644 --- a/robot/resources/vid/vid_interface.robot +++ b/robot/resources/vid/vid_interface.robot @@ -100,7 +100,7 @@ Parse Instance Id ${json}= To Json ${request_list[1]} ${request_id}= Catenate ${json['requestReferences']['instanceId']} [Return] ${request_id} - + Get Model UUID from VID [Documentation] Must use UI since rest call get redirect to portal and get DNS error ... Search all services and match on the invariantUUID @@ -108,7 +108,8 @@ Get Model UUID from VID Go To ${VID_ENDPOINT}${VID_ENV}/rest/models/services ${resp}= Get Text xpath=//body/pre ${json}= To Json ${resp} - :for ${dict} in @{json} + ${services}= Get From Dictionary ${json} services + :for ${dict} in @{services} \ ${uuid}= Get From DIctionary ${dict} uuid \ ${inv}= Get From DIctionary ${dict} invariantUUID \ Return From Keyword If "${invariantUUID}" == "${inv}" ${uuid} |