diff options
Diffstat (limited to 'robot/resources')
-rw-r--r-- | robot/resources/appc_interface.robot | 45 | ||||
-rw-r--r-- | robot/resources/asdc_interface.robot | 37 | ||||
-rw-r--r-- | robot/resources/dcae_interface.robot | 5 | ||||
-rw-r--r-- | robot/resources/demo_preload.robot | 20 | ||||
-rw-r--r-- | robot/resources/global_properties.robot | 1 | ||||
-rw-r--r-- | robot/resources/heatbridge.robot | 14 | ||||
-rw-r--r-- | robot/resources/msb_interface.robot | 2 | ||||
-rw-r--r-- | robot/resources/oof_interface.robot | 4 | ||||
-rw-r--r-- | robot/resources/policy_interface.robot | 22 | ||||
-rw-r--r-- | robot/resources/sdngc_interface.robot | 2 | ||||
-rw-r--r-- | robot/resources/so_interface.robot (renamed from robot/resources/mso_interface.robot) | 45 | ||||
-rw-r--r-- | robot/resources/test_templates/closedloop_test_template.robot | 31 | ||||
-rw-r--r-- | robot/resources/test_templates/vnf_orchestration_test_template.robot | 5 | ||||
-rw-r--r-- | robot/resources/vid/create_service_instance.robot | 4 | ||||
-rw-r--r-- | robot/resources/vid/create_vid_vnf.robot | 2 |
15 files changed, 190 insertions, 49 deletions
diff --git a/robot/resources/appc_interface.robot b/robot/resources/appc_interface.robot index 5c3d8636..91c44c63 100644 --- a/robot/resources/appc_interface.robot +++ b/robot/resources/appc_interface.robot @@ -12,6 +12,12 @@ ${APPC_HEALTHCHECK_OPERATION_PATH} /operations/SLI-API:healthcheck ${APPC_CREATE_MOUNTPOINT_PATH} /config/network-topology:network-topology/topology/topology-netconf/node/ ${APPC_MOUNT_XML} robot/assets/templates/appc/vnf_mount.template ${APPC_ENDPOINT} ${GLOBAL_APPC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_APPC_IP_ADDR}:${GLOBAL_APPC_SERVER_PORT} +${APPC_CDT_Config_Scaleout} ${EXECDIR}/robot/assets/templates/appc/template_ConfigScaleOut_vLoadBalancer_vLoadBalancer-test0_0.0.1V_vLB.xml +${APPC_CDT_Config_Scaleout_PD} ${EXECDIR}/robot/assets/templates/appc/pd_ConfigScaleOut_vLoadBalancer_vLoadBalancer-test0_0.0.1V_vLB.yaml +${APPC_CDT_Config_Scaleout_REF} ${EXECDIR}/robot/assets/templates/appc/reference_AllAction_vLoadBalancer_vLoadBalancer-test0_0.0.1V.json +${APPC_CDT_Config_Scaleout_REF_name} reference_AllAction_vLoadBalancer_vLoadBalancer-test0_0.0.1V.json +${APPC_CDT_ENDPOINT} ${GLOBAL_APPC_CDT_SERVER_PROTOCOL}://${GLOBAL_INJECTED_APPC_CDT_IP_ADDR}:${GLOBAL_APPC_CDT_SERVER_PORT} +${APPC_CDT_LOGIN_URL} ${APPC_CDT_ENDPOINT}/index.html *** Keywords *** @@ -54,3 +60,42 @@ Create Mount Point In APPC ${resp}= Run APPC Put Request ${APPC_INDEX PATH}${APPC_CREATE_MOUNTPOINT_PATH}${nodeid} ${data} Should Be True 200 <= ${resp.status_code} < 300 [Return] ${resp} + +Preload APPC CDT GUI + [Documentation] APPC CDT GUI Preload + [Arguments] ${username}=${GLOBAL_APPC_CDT_USERNAME} ${reference_file_name}=${APPC_CDT_Config_Scaleout_REF_name} ${reference_file}=${APPC_CDT_Config_Scaleout_REF} ${template_file}=${APPC_CDT_Config_Scaleout} ${parameterdefinition_file}=${APPC_CDT_Config_Scaleout_PD} + # Setup Browser Now being managed by test case + ##Setup Browser + Go To ${APPC_CDT_LOGIN_URL}#/home + Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} + Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + Log Logging in to ${APPC_CDT_ENDPOINT} + Handle Proxy Warning + Wait Until Page Contains WELCOME ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Go To ${APPC_CDT_LOGIN_URL}#/vnfs + Wait Until Element Is Visible id=userId ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Input Text id=userId ${username} + Click Button Submit + Page Should Contain ${username} + Wait Until Page Contains Element xpath=(//*[@class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary']) ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Button Create New VNF Type or VNFC Type + Page Should Contain Enter VNF type and VNFC to proceed + Click Button Proceed anyway + Click Button Upload Reference File + Choose File id=inputFile ${reference_file} + Select From List By Value name=templateIdentifier vLB + Sleep ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + Click Link Template + Click Button Upload Template File + Choose File id=inputFile ${template_file} + Sleep ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + Click Link Parameter Definition + Click Button UPLOAD PD FILE + Choose File id=inputFile1 ${parameterdefinition_file} + Sleep ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + Click Link Reference Data + Select From List By Value name=templateIdentifier vLB + Click Button saveToAppc + Go To ${APPC_CDT_LOGIN_URL}#/vnfs + Wait Until Page Contains ${reference_file_name} ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Log Logged in to ${APPC_CDT_ENDPOINT} diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot index f31e7c50..9dc3254e 100644 --- a/robot/resources/asdc_interface.robot +++ b/robot/resources/asdc_interface.robot @@ -68,23 +68,23 @@ 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 1 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} \ ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule \ ${status} ${_} = Run Keyword And Ignore Error Loop Over Check Catalog Service Distributed ${catalog_service_resp['uuid']} \ Exit For Loop If '${status}'=='PASS' + Should Be Equal As Strings ${status} PASS [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Loop Over Check Catalog Service Distributed - [Arguments] ${catalog_service_id} - : FOR ${CHECK_INDEX} IN RANGE 1 15 - \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} - \ Sleep 20s + [Arguments] ${catalog_service_id} + : FOR ${CHECK_INDEX} IN RANGE 15 + \ ${status} ${_} = Run Keyword And Ignore Error Check Catalog Service Distributed ${catalog_service_id} + \ Sleep 20s \ Return From Keyword If '${status}'=='PASS' - Fail - + Should Be Equal As Strings ${status} PASS Setup ASDC Catalog Resource [Documentation] Creates all the steps a vf needs for an asdc catalog resource and returns the id @@ -103,12 +103,8 @@ Setup ASDC Catalog Resource Package ASDC Software Product ${software_product_id} ${software_product_version_id} ${software_product_resp}= Get ASDC Software Product ${software_product_id} ${software_product_version_id} ${catalog_resource_id}= Add ASDC Catalog Resource ${license_agreement_id} ${software_product_resp['name']} ${license_model_resp['vendorName']} ${software_product_id} - Checkin ASDC Catalog Resource ${catalog_resource_id} - Request Certify ASDC Catalog Resource ${catalog_resource_id} - Start Certify ASDC Catalog Resource ${catalog_resource_id} - # on certify it gets a new id + ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} [Return] ${catalog_resource_id} - ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} Add ASDC License Model [Documentation] Creates an asdc license model and returns its id ${uuid}= Generate UUID @@ -298,10 +294,10 @@ Start Certify ASDC Catalog Resource [Return] ${resp.json()} Certify ASDC Catalog Resource [Documentation] start certify an asdc Catalog Resource by its id and returns the new id - [Arguments] ${catalog_resource_id} + [Arguments] ${catalog_resource_id} ${user_id}=${ASDC_TESTER_USER_ID} ${map}= Create Dictionary user_remarks=Robot remarks ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map} - ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID} + ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id} Should Be Equal As Strings ${resp.status_code} 200 [Return] ${resp.json()['uniqueId']} @@ -407,20 +403,13 @@ Check Catalog Service Distributed ${det_resp}= Get Catalog Service Distribution Details ${dist_resp['distributionStatusOfServiceList'][0]['distributionID']} @{ITEMS}= Copy List ${det_resp['distributionStatusList']} Should Not Be Empty ${ITEMS} - ${AAI_DEPLOY} Set Variable FALSE - ${SDNC_DEPLOY} Set Variable FALSE - ${SO_DEPLOY} Set Variable FALSE ${SO_COMPLETE} Set Variable FALSE :FOR ${ELEMENT} IN @{ITEMS} \ Log ${ELEMENT['omfComponentID']} \ Log ${ELEMENT['status']} - \ ${SDNC_DEPLOY} Set Variable If (('sdnc-docker' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DEPLOY_OK')) or ('${SDNC_DEPLOY}' == 'TRUE') TRUE - \ ${SO_DEPLOY} Set Variable If (('mso-docker' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DEPLOY_OK')) or ('${SO_DEPLOY}' == 'TRUE') TRUE - \ ${AAI_DEPLOY} Set Variable If (('aai-ml' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DEPLOY_OK')) or ('${AAI_DEPLOY}'=='TRUE') TRUE - \ ${SO_COMPLETE} Set Variable If (('mso-docker' in '${ELEMENT['omfComponentID']}') and ('${ELEMENT['status']}' == 'DISTRIBUTION_COMPLETE_OK')) or ('${SO_COMPLETE}'=='TRUE') TRUE - Should Be True ( '${SDNC_DEPLOY}'=='TRUE') SDNC Test - Should Be True ( '${SO_DEPLOY}'=='TRUE') SO Test - Should Be True ( '${AAI_DEPLOY}'=='TRUE') AAI Test + \ ${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 diff --git a/robot/resources/dcae_interface.robot b/robot/resources/dcae_interface.robot index 267f4757..dd804503 100644 --- a/robot/resources/dcae_interface.robot +++ b/robot/resources/dcae_interface.robot @@ -19,5 +19,6 @@ Run DCAE Health Check ${uuid}= Generate UUID ${headers}= Create Dictionary X-ECOMP-Client-Version=ONAP-R2 action=getTable Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} ${resp}= Get Request dcae ${DCAE_HEALTH_CHECK_PATH} headers=${headers} - Log Received response from dcae ${resp} - Should Be Equal As Strings ${resp.status_code} 200
\ No newline at end of file + Log Received response code from dcae ${resp} + Log Received content from dcae ${resp.content} + Should Be Equal As Strings ${resp.status_code} 200 diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot index db346be5..f87cc366 100644 --- a/robot/resources/demo_preload.robot +++ b/robot/resources/demo_preload.robot @@ -4,7 +4,9 @@ Documentation This test template encapsulates the VNF Orchestration use case. Resource test_templates/model_test_template.robot Resource test_templates/vnf_orchestration_test_template.robot Resource asdc_interface.robot +Resource so_interface.robot Resource vid/vid_interface.robot +Resource policy_interface.robot Library UUID Library Collections @@ -20,6 +22,7 @@ ${AAI_INDEX_PATH} /aai/v8 ${VF_MODULES_NAME} _Demo_VFModules.json ${FILE_CACHE} /share/ ${DEMO_PREFIX} demo +${VPKG_MODULE_LABEL} base_vpkg *** Keywords *** @@ -64,7 +67,7 @@ Load Models Distribute Model [Arguments] ${service} ${modelName} - ${service_model_type} ${vnf_type} ${vf_modules}= Model Distribution For Directory ${service} ${modelName} + ${service_model_type} ${vnf_type} ${vf_modules} ${catalog_resources}= Model Distribution For Directory ${service} ${modelName} Create Customer For VNF Demo [Documentation] Create demo customer for the demo @@ -141,17 +144,27 @@ APPC Mount Point ${stack_id}= Get From Dictionary ${stack_info} id ${server_list}= Get Openstack Servers auth ${vpg_name_0}= Get From Dictionary ${stack_info} vpg_name_0 + ${vnf_id}= Get From Dictionary ${stack_info} vnf_id ${vpg_public_ip}= Get Server Ip ${server_list} ${stack_info} vpg_name_0 network_name=public ${vpg_oam_ip}= Get From Dictionary ${stack_info} vpg_private_ip_1 - ${appc}= Create Mount Point In APPC ${vpg_name_0} ${vpg_oam_ip} + #${appc}= Create Mount Point In APPC ${vpg_name_0} ${vpg_oam_ip} + ${appc}= Create Mount Point In APPC ${vnf_id} ${vpg_oam_ip} Instantiate VNF - [Arguments] ${service} + [Arguments] ${service} ${vf_module_label}=NULL Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone ${vf_module_name} ${service}= Orchestrate VNF DemoCust ${service} ${service} ${TENANT_NAME} Save For Delete Log to Console Customer Name=${CUSTOMER_NAME} Log to Console VNF Module Name=${vf_module_name} + ${model_invariant_id}= Run MSO Get ModelInvariantId ${SUITE_SERVICE_MODEL_NAME} ${vf_module_label} + Log to Console ModelInvariantID=${model_invariant_id} + ${status} ${value}= Run Keyword And Ignore Error Update vVFWCL Policy ${model_invariant_id} + ${status} ${value}= Run Keyword And Ignore Error APPC Mount Point ${vf_module_name} + + + + Save For Delete [Documentation] Create a variable file to be loaded for save for delete @@ -182,5 +195,6 @@ Save For Delete \ ${comma}= Catenate , ${vars}= Catenate ${vars}]\n OperatingSystem.Create File ${FILE_CACHE}/${STACK_NAME}.py ${vars} + OperatingSystem.Create File ${FILE_CACHE}/lastVNF4HEATBRIGE.py ${vars} diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot index 70909e2a..e32b01e9 100644 --- a/robot/resources/global_properties.robot +++ b/robot/resources/global_properties.robot @@ -28,6 +28,7 @@ ${GLOBAL_VID_UI_TIMEOUT_SHORT} 20s ${GLOBAL_VID_UI_TIMEOUT_MEDIUM} 60s ${GLOBAL_VID_UI_TIMEOUT_LONG} 120s ${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt +${GLOBAL_ONAP_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/onap_dev.pvt ${GLOBAL_AAI_ZONE_ID} nova1 ${GLOBAL_AAI_ZONE_NAME} nova ${GLOBAL_AAI_DESIGN_TYPE} integration diff --git a/robot/resources/heatbridge.robot b/robot/resources/heatbridge.robot index b881da8f..8e8d6a0e 100644 --- a/robot/resources/heatbridge.robot +++ b/robot/resources/heatbridge.robot @@ -31,14 +31,16 @@ Execute Heatbridge [Documentation] Run the Heatbridge against the stack to generate the bulkadd message ... Execute the build add ... Validate the add results by running the named query - [Arguments] ${stack_name} ${service_instance_id} ${service} + [Arguments] ${stack_name} ${service_instance_id} ${service} ${ipv4_oam_address} Return From Keyword If '${service}' == 'vVG' Run Openstack Auth Request auth ${stack_info}= Wait for Stack to Be Deployed auth ${stack_name} ${stack_id}= Get From Dictionary ${stack_info} id ${tenant_id}= Get From Dictionary ${stack_info} OS::project_id ${vnf_id}= Get From Dictionary ${stack_info} vnf_id - Run Set VNF ProvStatus ${vnf_id} PROV + ${KeyIsPresent}= Run Keyword And Return Status Dictionary Should Contain Key ${stack_info} ${ipv4_oam_address} + ${ipv4_vnf_address}= Run Keyword If ${KeyIsPresent} Get From Dictionary ${stack_info} ${ipv4_oam_address} + Run Set VNF Params ${vnf_id} ${ipv4_vnf_address} PROV Active ${url} ${path}= Get Keystone Url And Path ${openstack_identity_url}= Catenate ${url}${path} ${region}= Get Openstack Region @@ -72,13 +74,15 @@ Run Vserver Query Should Be Equal As Strings ${resp.status_code} 200 -Run Set VNF ProvStatus - [Documentation] Run A&A GET and PUT to set prov-status - [Arguments] ${vnf_id} ${prov_status}=PROV +Run Set VNF Params + [Documentation] Run A&A GET and PUT to set prov-status, orchestration status, and ipv4-oam-address + [Arguments] ${vnf_id} ${ipv4_vnf_address} ${prov_status}=PROV ${orch_status}=Active ${payload}= Run Get Generic VNF by VnfId ${vnf_id} #${payload_json}= evaluate json.loads('''${payload}''') json set to dictionary ${payload} prov-status ${prov_status} + set to dictionary ${payload} orchestration-status ${orch_status} + set to dictionary ${payload} ipv4-oam-address ${ipv4_vnf_address} ${payload_string}= evaluate json.dumps(${payload}) json ${put_resp}= Run A&AI Put Request ${VERSIONED_INDEX_PATH}/network/generic-vnfs/generic-vnf/${vnf_id} ${payload_string} diff --git a/robot/resources/msb_interface.robot b/robot/resources/msb_interface.robot index 53b67da6..81224efe 100644 --- a/robot/resources/msb_interface.robot +++ b/robot/resources/msb_interface.robot @@ -6,7 +6,7 @@ Resource global_properties.robot *** Variables *** ${MSB_HEALTH_CHECK_PATH} /iui/microservices/default.html -${MSB_ENDPOINT} ${GLOBAL_MSB_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OPENO_IP_ADDR}:${GLOBAL_MSB_SERVER_PORT} +${MSB_ENDPOINT} ${GLOBAL_MSB_SERVER_PROTOCOL}://${GLOBAL_INJECTED_MSB_IP_ADDR}:${GLOBAL_MSB_SERVER_PORT} *** Keywords *** diff --git a/robot/resources/oof_interface.robot b/robot/resources/oof_interface.robot index fc595261..1c3137e4 100644 --- a/robot/resources/oof_interface.robot +++ b/robot/resources/oof_interface.robot @@ -8,8 +8,8 @@ Resource global_properties.robot ${OOF_HOMING_HEALTH_CHECK_PATH} /v1/plans/healthcheck ${OOF_SNIRO_HEALTH_CHECK_PATH} /api/oof/v1/healthcheck -${OOF_HOMING_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_IP_ADDR}:${GLOBAL_OOF_HOMING_SERVER_PORT} -${OOF_SNIRO_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_IP_ADDR}:${GLOBAL_OOF_SNIRO_SERVER_PORT} +${OOF_HOMING_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_HOMING_IP_ADDR}:${GLOBAL_OOF_HOMING_SERVER_PORT} +${OOF_SNIRO_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_SNIRO_IP_ADDR}:${GLOBAL_OOF_SNIRO_SERVER_PORT} *** Keywords *** Run OOF-Homing Health Check diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot index f05f2650..6f48e4fc 100644 --- a/robot/resources/policy_interface.robot +++ b/robot/resources/policy_interface.robot @@ -10,7 +10,9 @@ Resource global_properties.robot *** Variables *** ${POLICY_HEALTH_CHECK_PATH} /healthcheck ${POLICY_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_POLICY_SERVER_PORT} -${POLICY_HEALTHCHECK_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_POLICY_HEALTHCHECK_PORT} +${POLICY_HEALTHCHECK_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_HEALTHCHECK_IP_ADDR}:${GLOBAL_POLICY_HEALTHCHECK_PORT} +${POLICY_TEMPLATES} robot/assets/templates/policy +${DROOLS_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_DROOLS_SERVER_PORT} *** Keywords *** @@ -29,6 +31,18 @@ Run Policy Health Check \ Should Be Equal As Strings ${ELEMENT['code']} 200 \ Should Be True ${ELEMENT['healthy']} +Run Drools Get Request + [Documentation] Runs Drools Get Request + [Arguments] ${data_path} + ${auth}= Create List ${GLOBAL_DROOLS_USERNAME} ${GLOBAL_DROOLS_PASSWORD} + Log Creating session ${POLICY_ENDPOINT} + ${session}= Create Session policy ${DROOLS_ENDPOINT} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request policy ${data_path} headers=${headers} + Log Received response from policy ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + Run Policy Put Request [Documentation] Runs Policy Put request [Arguments] ${data_path} ${data} @@ -63,14 +77,18 @@ Run Policy Get Configs Request Update vVFWCL Policy [Arguments] ${resource_id} - Delete vFWCL Policy + Run Keyword and Ignore Error Delete vFWCL Policy Sleep 20s + Log To Console Create vFWCL Policy Create vFWCL Policy ${resource_id} Sleep 5s + Log To Console Push vFWCL Policy Push vFWCL Policy Sleep 20s + Log To Console Reboot Drools Reboot Drools Sleep 20s + Log To Console Validate vFWCL Policy Validate the vFWCL Policy Delete vFWCL Policy diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot index f95fff1f..b311e9bd 100644 --- a/robot/resources/sdngc_interface.robot +++ b/robot/resources/sdngc_interface.robot @@ -20,7 +20,7 @@ ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY} robot/assets/templates/sdnc/ ${SDNGC_INDEX_PATH} /restconf ${SDNCGC_HEALTHCHECK_OPERATION_PATH} /operations/SLI-API:healthcheck ${SDNGC_REST_ENDPOINT} ${GLOBAL_SDNGC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDNC_IP_ADDR}:${GLOBAL_SDNGC_REST_PORT} -${SDNGC_ADMIN_ENDPOINT} ${GLOBAL_SDNGC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDNC_IP_ADDR}:${GLOBAL_SDNGC_ADMIN_PORT} +${SDNGC_ADMIN_ENDPOINT} ${GLOBAL_SDNGC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDNC_PORTAL_IP_ADDR}:${GLOBAL_SDNGC_ADMIN_PORT} ${SDNGC_ADMIN_SIGNUP_URL} ${SDNGC_ADMIN_ENDPOINT}/signup ${SDNGC_ADMIN_LOGIN_URL} ${SDNGC_ADMIN_ENDPOINT}/login ${SDNGC_ADMIN_VNF_PROFILE_URL} ${SDNGC_ADMIN_ENDPOINT}/mobility/getVnfProfile diff --git a/robot/resources/mso_interface.robot b/robot/resources/so_interface.robot index 49965c89..70faf3bf 100644 --- a/robot/resources/mso_interface.robot +++ b/robot/resources/so_interface.robot @@ -7,19 +7,56 @@ Library Collections Resource global_properties.robot Resource ../resources/json_templater.robot *** Variables *** -${MSO_HEALTH_CHECK_PATH} /ecomp/mso/infra/globalhealthcheck +${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} *** Keywords *** -Run MSO Health Check +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 [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 ${MSO_ENDPOINT} + ${session}= Create Session mso ${so_endpoint} ${uuid}= Generate UUID - ${headers}= Create Dictionary Accept=text/html Content-Type=text/html X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} + ${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 Polieis + [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 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' + [Return] ${model_invariant_id} + Run MSO Get Request [Documentation] Runs an MSO get request [Arguments] ${data_path} ${accept}=application/json diff --git a/robot/resources/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot index 0a0a8950..f83ce5b1 100644 --- a/robot/resources/test_templates/closedloop_test_template.robot +++ b/robot/resources/test_templates/closedloop_test_template.robot @@ -1,9 +1,11 @@ *** Settings *** Documentation Policy Closed Loop Test cases -Resource ../policy_interface.robot +Resource ../policy_interface.robot Resource ../stack_validation/policy_check_vfw.robot +Resource ../stack_validation/packet_generator_interface.robot Resource vnf_orchestration_test_template.robot + Library String Library HttpLibrary.HTTP LIbrary Process @@ -201,3 +203,30 @@ Orchestrate VNF vFW closedloop Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone ${stack_name} ${service}= Orchestrate VNF ETE_CLP vLB vLB ${TENANT_NAME} [Return] ${stack_name} + +VFWCL High Test + [Documentation] Test Control Loop for High Traffic + [Arguments] ${pkg_host} + Enable Streams ${pkg_host} 10 + :FOR ${i} IN RANGE 8 + \ Sleep 15s + \ ${resp}= Get List Of Enabled Streams ${pkg_host} + \ ${stream_count}= Evaluate len(${resp['sample-plugin']['pg-streams']['pg-stream']}) + \ Log To Console Number of steam: ${stream_count} + \ Exit For Loop If '${stream_count}'=='5' + Should Be Equal As Integers ${stream_count} 5 + +VFWCL Low Test + [Documentation] Test Control Loop for Low Traffic + [Arguments] ${pkg_host} + Enable Streams ${pkg_host} 1 + Get List Of Enabled Streams ${pkg_host} + :FOR ${i} IN RANGE 8 + \ Sleep 15s + \ ${resp}= Get List Of Enabled Streams ${pkg_host} + \ ${stream_count}= Evaluate len(${resp['sample-plugin']['pg-streams']['pg-stream']}) + \ Log To Console Number of steam: ${stream_count} + \ Exit For Loop If '${stream_count}'=='5' + Should Be Equal As Integers ${stream_count} 5 + + diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot index 6e2cd9a4..53d56962 100644 --- a/robot/resources/test_templates/vnf_orchestration_test_template.robot +++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot @@ -42,9 +42,9 @@ ${SERVICE_INSTANCE_ID} *** Keywords *** Orchestrate VNF Template [Documentation] Use openECOMP to Orchestrate a service. - [Arguments] ${customer_name} ${service} ${product_family} ${tenant} + [Arguments] ${customer_name} ${service} ${product_family} ${tenant} ${delete_flag}=DELETE Orchestrate VNF ${customer_name} ${service} ${product_family} ${tenant} - Delete VNF + Run Keyword If '${delete_flag}' == 'DELETE' Delete VNF Orchestrate VNF [Documentation] Use openECOMP to Orchestrate a service. @@ -58,6 +58,7 @@ Orchestrate VNF ${service_name}= Catenate Service_Ete_Name${uuid} ${service_type}= Set Variable ${service} ${service_model_type} ${vnf_type} ${vf_modules} ${catalog_resources}= Model Distribution For Directory ${service} + Set Suite Variable ${SUITE_SERVICE_MODEL_NAME} ${service_model_type} Run Keyword If '${service}' == 'vVG' Create VVG Server ${uuid} Create Customer For VNF ${CUSTOMER_NAME} ${CUSTOMER_NAME} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} Setup Browser diff --git a/robot/resources/vid/create_service_instance.robot b/robot/resources/vid/create_service_instance.robot index aa0d32a7..76597260 100644 --- a/robot/resources/vid/create_service_instance.robot +++ b/robot/resources/vid/create_service_instance.robot @@ -8,7 +8,7 @@ Library UUID Library String Library DateTime -Resource ../mso_interface.robot +Resource ../so_interface.robot Resource vid_interface.robot *** Keywords *** @@ -21,12 +21,14 @@ Create VID Service Instance ${uuid}= Generate UUID Wait Until Page Contains Element xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG} Wait Until Element Is Visible xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG} + Click On Element When Visible //select[@prompt='Select Subscriber Name'] Select From List When Enabled //select[@prompt='Select Subscriber Name'] ${customer_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} Select From List When Enabled //select[@prompt='Select Service Type'] ${service_type} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} Select From List When Enabled //select[@prompt='Select Project Name'] ${project_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} Select From List When Enabled //select[@prompt='Select Owning Entity'] ${owning_entity} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} Capture Page Screenshot Xpath Should Match X Times //input[@parameter-name='Instance Name'] 1 + Focus //input[@parameter-name='Instance Name'] Wait Until Keyword Succeeds 120s 5s Input Text When Enabled //input[@parameter-name='Instance Name'] ${service_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} Capture Page Screenshot Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Confirm'] diff --git a/robot/resources/vid/create_vid_vnf.robot b/robot/resources/vid/create_vid_vnf.robot index a7cc8e1f..5997b07e 100644 --- a/robot/resources/vid/create_vid_vnf.robot +++ b/robot/resources/vid/create_vid_vnf.robot @@ -7,7 +7,7 @@ Library String Library DateTime Library RequestsLibrary -Resource ../mso_interface.robot +Resource ../so_interface.robot Resource vid_interface.robot *** Keywords *** |