diff options
author | Jerry Flood <jf9860@att.com> | 2017-12-06 17:05:49 -0500 |
---|---|---|
committer | Jerry Flood <jf9860@att.com> | 2017-12-06 17:06:38 -0500 |
commit | d571ed23f508d6b2c00235a9f2c0acd9dc9fb121 (patch) | |
tree | 030d0ab972e61b147b3a6316d3efad6311e763da /robot/resources | |
parent | 4f84db3c939d9af6ab5110fa22b48a290edf108c (diff) |
Update amsterdam to support vFWCL
Issue-ID: TEST-72
Change-Id: I6aefc125480192c9971bbe9f787e12c71fa635e4
Signed-off-by: Jerry Flood <jf9860@att.com>
Diffstat (limited to 'robot/resources')
-rw-r--r-- | robot/resources/asdc_interface.robot | 6 | ||||
-rw-r--r-- | robot/resources/demo_preload.robot | 27 | ||||
-rw-r--r-- | robot/resources/sdngc_interface.robot | 2 | ||||
-rw-r--r-- | robot/resources/test_templates/closedloop_test_template.robot | 2 | ||||
-rw-r--r-- | robot/resources/test_templates/model_test_template.robot | 9 | ||||
-rw-r--r-- | robot/resources/test_templates/vnf_orchestration_test_template.robot | 68 | ||||
-rw-r--r-- | robot/resources/vid/create_vid_vnf.robot | 4 |
7 files changed, 91 insertions, 27 deletions
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot index 90bf952a..76496cc6 100644 --- a/robot/resources/asdc_interface.robot +++ b/robot/resources/asdc_interface.robot @@ -53,11 +53,13 @@ Distribute Model From ASDC [Arguments] ${model_zip_path} ${catalog_service_name}= ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} ${catalog_resource_ids}= Create List + ${catalog_resources}= Create Dictionary : FOR ${zip} IN @{model_zip_path} \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']} + \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} Checkin ASDC Catalog Service ${catalog_service_id} Request Certify ASDC Catalog Service ${catalog_service_id} @@ -69,8 +71,8 @@ Distribute Model From ASDC ${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 Check Catalog Service Distributed ${catalog_service_resp['uuid']} - [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} - + [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} + Setup ASDC Catalog Resource [Documentation] Creates all the steps a vf needs for an asdc catalog resource and returns the id [Arguments] ${model_zip_path} diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot index 69048950..3cc0c51a 100644 --- a/robot/resources/demo_preload.robot +++ b/robot/resources/demo_preload.robot @@ -41,7 +41,7 @@ Load Models [Documentation] Use openECOMP to Orchestrate a service. [Arguments] ${customer_name} Set Test Variable ${CUSTOMER_NAME} ${customer_name} - ${status} ${value}= Run Keyword And Ignore Error Distribute Model vFW ${DEMO_PREFIX}VFW + ${status} ${value}= Run Keyword And Ignore Error Distribute Model vFWCL ${DEMO_PREFIX}VFWCL ${status} ${value}= Run Keyword And Ignore Error Distribute Model vLB ${DEMO_PREFIX}VLB ${status} ${value}= Run Keyword And Ignore Error Distribute Model vCPE ${DEMO_PREFIX}VCPE ##${status} ${value}= Run Keyword And Ignore Error Distribute Model vIMS ${DEMO_PREFIX}VIMS @@ -53,13 +53,13 @@ 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 ${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=vFW service2=vLB service3=vCPE service4=vIMS + Set To Dictionary ${arguments} service1=vFWCL service2=vLB service3=vCPE service4=vIMS ${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} @@ -67,7 +67,7 @@ Create Customer For VNF Demo Preload User Model [Documentation] Preload the demo data for the passed VNF with the passed module name - [Arguments] ${vnf_name} ${vf_module_name} + [Arguments] ${vnf_name} ${vf_module_name} ${vnf_service}=default # Go to A&AI and get information about the VNF we need to preload ${status} ${generic_vnf}= Run Keyword And Ignore Error Get Service Instance ${vnf_name} Run Keyword If '${status}' == 'FAIL' FAIL VNF Name: ${vnf_name} is not found. @@ -85,11 +85,26 @@ Preload User Model Setup Browser Login To VID GUI ${vf_modules}= Get Module Names from VID ${invariantUUID} + ${vnf_service}= Set Variable If '${vnf_service}'=='default' ${service} ${vnf_service} + ${vf_modules}= Get The Selected Modules ${vf_modules} ${vnf_service} Log ${generic_vnf} Log ${service_instance_id},${vnf_name},${vnf_type},${vf_module_name},${vf_modules},${service} - Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_modules} ${service} demo + Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_modules} ${vnf_service} demo [Teardown] Close All Browsers +Get The Selected Modules + [Arguments] ${vf_modules} ${vnf_service} + ${returnlist} Create List + ${list}= Get From DIctionary ${GLOBAL_SERVICE_TEMPLATE_MAPPING} ${vnf_service} + :for ${map} in @{list} + \ ${name}= Get From Dictionary ${map} name_pattern + \ Add To Module List ${vf_modules} ${name} ${returnlist} + [Return] ${returnlist} + +Add To Module List + [Arguments] ${vf_modules} ${name} ${returnlist} + :for ${map} in @{vf_modules} + \ Run Keyword If '${name}' in '${map['name']}' Append To List ${returnlist} ${map} Get Relationship Data [Arguments] ${relationships} @@ -108,7 +123,7 @@ Get Persona Model Id [Documentation] Query and Validates A&AI Service Instance [Arguments] ${service_instance_id} ${service_type} ${customer_id} ${resp}= Run A&AI Get Request ${INDEX PATH}${CUSTOMER SPEC PATH}${customer_id}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_id} - ${persona_model_id}= Get From DIctionary ${resp.json()['service-instance'][0]} persona-model-id + ${persona_model_id}= Get From DIctionary ${resp.json()['service-instance'][0]} model-invariant-id [Return] ${persona_model_id} APPC Mount Point diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot index 2339ab5c..50286444 100644 --- a/robot/resources/sdngc_interface.robot +++ b/robot/resources/sdngc_interface.robot @@ -83,7 +83,7 @@ Run SDNGC Delete Request Preload Vnf [Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_modules} ${service} ${uuid} - ${base_vf_module_type}= Catenate '' + ${base_vf_module_type}= Catenate ${closedloop_vf_module}= Create Dictionary ${templates}= Get From Dictionary ${GLOBAL_SERVICE_TEMPLATE_MAPPING} ${service} :for ${vf_module} in @{vf_modules} diff --git a/robot/resources/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot index 6930e56d..1a136130 100644 --- a/robot/resources/test_templates/closedloop_test_template.robot +++ b/robot/resources/test_templates/closedloop_test_template.robot @@ -192,7 +192,7 @@ Orchestrate VNF vFW closedloop [Documentation] VNF Orchestration for vFW Log VNF Orchestration flow TEST NAME=${TEST NAME} Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone - ${stack_name} ${service}= Orchestrate VNF ETE_CLP vFW vFW ${TENANT_NAME} + ${stack_name} ${service}= Orchestrate VNF ETE_CLP vFWCL vFWCL ${TENANT_NAME} [Return] ${stack_name} Orchestrate VNF vDNS closedloop diff --git a/robot/resources/test_templates/model_test_template.robot b/robot/resources/test_templates/model_test_template.robot index 4dce50a7..98b3b1cf 100644 --- a/robot/resources/test_templates/model_test_template.robot +++ b/robot/resources/test_templates/model_test_template.robot @@ -3,7 +3,7 @@ Documentation The main interface for interacting with ASDC. It handles low l Library OperatingSystem Library ArchiveLibrary Library Collections -Library String +Library String Resource ../asdc_interface.robot Variables ../../assets/service_mappings.py @@ -25,16 +25,17 @@ Model Distribution For Directory ${directory_list}= Get From Dictionary ${GLOBAL_SERVICE_FOLDER_MAPPING} ${service} ${ziplist}= Create List :for ${directory} in @{directory_list} - \ ${zipname}= Replace String ${directory} / _ + \ ${zipname}= Replace String ${directory} / _ \ ${zip}= Catenate ${ASDC_ZIP_DIRECTORY}/${zipname}.zip \ ${folder}= Catenate ${ASDC_ASSETS_DIRECTORY}/${directory} \ OperatingSystem.Create Directory ${ASDC_ASSETS_DIRECTORY}/temp \ Create Zip From Files In Directory ${folder} ${zip} \ Append To List ${ziplist} ${zip} - ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} Distribute Model From ASDC ${ziplist} ${catalog_service_name} + ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Distribute Model From ASDC ${ziplist} ${catalog_service_name} Set Test Variable ${CATALOG_RESOURCE_IDS} ${catalog_resource_ids} Set Test Variable ${CATALOG_SERVICE_ID} ${catalog_service_id} - [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} + Set Test Variable ${CATALOG_RESOURCES} ${catalog_resources} + [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources} diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot index 1e3bd76b..807647db 100644 --- a/robot/resources/test_templates/vnf_orchestration_test_template.robot +++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot @@ -33,6 +33,7 @@ ${TENANT_ID} ${REGIONS} ${CUSTOMER_NAME} ${STACK_NAME} +${STACK_NAMES} ${SERVICE} ${VVG_SERVER_ID} ${SERVICE_INSTANCE_ID} @@ -51,11 +52,11 @@ Orchestrate VNF ${uuid}= Generate UUID Set Test Variable ${CUSTOMER_NAME} ${customer_name}_${uuid} Set Test Variable ${SERVICE} ${service} - ${vnf_name}= Catenate Vnf_Ete_Name${uuid} + ${list}= Create List + Set Test Variable ${STACK_NAMES} ${list} ${service_name}= Catenate Service_Ete_Name${uuid} ${service_type}= Set Variable ${service} - ${vf_module_name}= Catenate Vfmodule_Ete_Name${uuid} - ${service_model_type} ${vnf_type} ${vf_modules} = Model Distribution For Directory ${service} + ${service_model_type} ${vnf_type} ${vf_modules} ${catalog_resources}= Model Distribution For Directory ${service} 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 @@ -63,17 +64,62 @@ Orchestrate VNF ${service_instance_id}= Wait Until Keyword Succeeds 300s 5s Create VID Service Instance ${customer_name} ${service_model_type} ${service} ${service_name} Set Test Variable ${SERVICE_INSTANCE_ID} ${service_instance_id} Validate Service Instance ${service_instance_id} ${service} ${customer_name} - Wait Until Keyword Succeeds 300s 5s Create VID VNF ${service_instance_id} ${vnf_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} ${CUSTOMER_NAME} - ${vf_module_type} ${closedloop_vf_module}= Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_modules} ${service} ${uuid} - ${vf_module_id}= Create VID VNF module ${service_instance_id} ${vf_module_name} ${lcp_region} ${tenant} ${vf_module_type} ${CUSTOMER_NAME} - ${generic_vnf}= Validate Generic VNF ${vnf_name} ${vnf_type} ${service_instance_id} - VLB Closed Loop Hack ${service} ${generic_vnf} ${closedloop_vf_module} - Set Test Variable ${STACK_NAME} ${vf_module_name} - Execute Heatbridge ${vf_module_name} ${service_instance_id} ${service} - Validate VF Module ${vf_module_name} ${service} + ${vnflist}= Get From Dictionary ${GLOBAL_SERVICE_VNF_MAPPING} ${service} + :for ${vnf} in @{vnflist} + \ ${vnf_name}= Catenate Ete_${vnf}_${uuid} + \ ${vf_module_name}= Catenate Vfmodule_Ete_${vnf}_${uuid} + \ ${vnf_type}= Get VNF Type ${catalog_resources} ${vnf} + \ ${vf_module}= Get VF Module ${catalog_resources} ${vnf} + \ Append To List ${STACK_NAMES} ${vf_module_name} + \ Wait Until Keyword Succeeds 300s 5s Create VID VNF ${service_instance_id} ${vnf_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} ${CUSTOMER_NAME} + \ ${vf_module_type} ${closedloop_vf_module}= Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_module} ${vnf} ${uuid} + \ ${vf_module_id}= Create VID VNF module ${service_instance_id} ${vf_module_name} ${lcp_region} ${tenant} ${vf_module_type} ${CUSTOMER_NAME} ${vnf_name} + \ ${generic_vnf}= Validate Generic VNF ${vnf_name} ${vnf_type} ${service_instance_id} + \ 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} + \ Execute Heatbridge ${vf_module_name} ${service_instance_id} ${vnf} + \ Validate VF Module ${vf_module_name} ${vnf} [Return] ${vf_module_name} ${service} +Get VNF Type + [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] ${resources} ${vnf} + ${cr}= Get Catalog Resource ${resources} ${vnf} + ${vnf_type}= Get From Dictionary ${cr} name + [Return] ${vnf_type} + +Get VF Module + [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] ${resources} ${vnf} + ${cr}= Get Catalog Resource ${resources} ${vnf} + ${vf_module}= Find Element In Array ${cr['groups']} type org.openecomp.groups.VfModule + [Return] ${vf_module} + +Get Catalog Resource + [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] ${resources} ${vnf} + + ${base_name}= Get Name Pattern ${vnf} + ${keys}= Get Dictionary Keys ${resources} + + :for ${key} in @{keys} + \ ${cr}= Get From Dictionary ${resources} ${key} + \ Return From Keyword If '${base_name}' in '${cr['allArtifacts']['heat1']['artifactDisplayName']}' ${cr} + Fail Unable to find catalog resource for ${vnf} ${base_name} + +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} + ${list}= Get From Dictionary ${GLOBAL_SERVICE_TEMPLATE_MAPPING} ${vnf} + :for ${dict} in @{list} + \ ${base_name}= Get From Dictionary ${dict} name_pattern + \ Return From Keyword If '${dict['isBase']}' == 'true' ${base_name} + Fail Unable to locate base name pattern + + + Create Customer For VNF [Documentation] VNF Orchestration Test setup.... ... Create Tenant if not exists, Create Customer, Create Service and related relationships diff --git a/robot/resources/vid/create_vid_vnf.robot b/robot/resources/vid/create_vid_vnf.robot index 67e308cf..41737627 100644 --- a/robot/resources/vid/create_vid_vnf.robot +++ b/robot/resources/vid/create_vid_vnf.robot @@ -81,7 +81,7 @@ Delete VID VNF Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE Create VID VNF module - [Arguments] ${service_instance_id} ${vf_module_name} ${lcp_region} ${TENANT} ${VNF_TYPE} ${customer} + [Arguments] ${service_instance_id} ${vf_module_name} ${lcp_region} ${TENANT} ${VNF_TYPE} ${customer} ${vnf_name} Go To VID HOME Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} @@ -98,7 +98,7 @@ Create VID VNF module #Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=120s #Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=120s #Wait Until Element Is Visible button=Add VF-Module timeout=120s - Click Element button=Add VF-Module + Click Element xpath=//div[contains(.,'${vnf_name}')]/div/button[contains(.,'Add VF-Module')] # This is where firefox breaks. Th elink never becomes visible when run with the script. Click Element link=${vnf_type} |