diff options
-rw-r--r-- | docker/lighttpd.conf | 1 | ||||
-rw-r--r-- | robot/assets/service_mappings.py | 2 | ||||
-rw-r--r-- | robot/assets/templates/asdc/catalog_vnf_inputs.template | 112 | ||||
-rw-r--r-- | robot/assets/templates/asdc/catalog_vnf_properties.template | 29 | ||||
-rw-r--r-- | robot/resources/asdc_interface.robot | 95 | ||||
-rw-r--r-- | robot/resources/portal-sdk/portalDef.robot | 39 | ||||
-rw-r--r-- | robot/resources/test_templates/model_test_template.robot | 4 | ||||
-rw-r--r-- | robot/resources/test_templates/vnf_orchestration_test_template.robot | 27 | ||||
-rw-r--r-- | robot/testsuites/demo.robot | 7 | ||||
-rwxr-xr-x | runTags.sh | 3 |
10 files changed, 268 insertions, 51 deletions
diff --git a/docker/lighttpd.conf b/docker/lighttpd.conf index 6cdf07bd..b6fc1fb8 100644 --- a/docker/lighttpd.conf +++ b/docker/lighttpd.conf @@ -15,6 +15,7 @@ $HTTP["url"] =~ "^/logs/" { mimetype.assign = ( ".log" => "text/plain", ".txt" => "text/plain", + ".png" => "image/png", ".html" => "text/html", ".xml" => "text/xml" ) diff --git a/robot/assets/service_mappings.py b/robot/assets/service_mappings.py index ff41fad3..b1ed2d85 100644 --- a/robot/assets/service_mappings.py +++ b/robot/assets/service_mappings.py @@ -6,6 +6,7 @@ GLOBAL_SERVICE_FOLDER_MAPPING = {"vFW" : ['vFW'], \ "vVG" : ['vVG'], \ "vCPE" : ['vCPE/infra', 'vCPE/vbng', 'vCPE/vbrgemu', 'vCPE/vgmux', 'vCPE/vgw'], "vFWCL" : ['vFWCL/vFWSNK', 'vFWCL/vPKG'], + "vFWNG" : ['vFW_NextGen/templates'], } ''' @@ -17,6 +18,7 @@ GLOBAL_SERVICE_VNF_MAPPING = { "vVG" : ['vVG'], "vCPE" : ['vCPE'], "vFWCL" : ['vFWSNK', 'vPKG'], + "vFWNG" : ['vFWNG'], } ''' diff --git a/robot/assets/templates/asdc/catalog_vnf_inputs.template b/robot/assets/templates/asdc/catalog_vnf_inputs.template new file mode 100644 index 00000000..fb5d4940 --- /dev/null +++ b/robot/assets/templates/asdc/catalog_vnf_inputs.template @@ -0,0 +1,112 @@ +[ + { + "defaultValue": "${nf_function}", + "description": null, + "name": "nf_function", + "parentUniqueId": "cs0008", + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "${nf_function_uid}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": "cs0008", + "inputPath": null + }, + { + "defaultValue": "${nf_type}", + "description": null, + "name": "nf_type", + "parentUniqueId": null, + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "${nf_type_uid}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": null, + "inputPath": null + }, + { + "defaultValue": "${nf_naming_code}", + "description": null, + "name": "nf_naming_code", + "parentUniqueId": null, + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "${nf_naming_code_uid}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": null, + "inputPath": null + }, + { + "defaultValue": "${nf_role}", + "description": null, + "name": "nf_role", + "parentUniqueId": null, + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "${nf_role_uid}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": null, + "inputPath": null + }, + { + "defaultValue": "${cloud_env}", + "description": "Cloud environment (e.g., openstack, rackspace)", + "name": "cloud_env", + "parentUniqueId": null, + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "${cloud_env_uid}", + "value": null, + "definition": false, + "getInputValues": null, + "instanceUniqueId": null, + "propertyId": null, + "properties": null, + "inputs": null, + "ownerId": null, + "inputPath": null + } +] diff --git a/robot/assets/templates/asdc/catalog_vnf_properties.template b/robot/assets/templates/asdc/catalog_vnf_properties.template new file mode 100644 index 00000000..63e85527 --- /dev/null +++ b/robot/assets/templates/asdc/catalog_vnf_properties.template @@ -0,0 +1,29 @@ +[ + { + "name": "nfc_function", + "parentUniqueId": "${parent_id}", + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "string", + "uniqueId": "${parent_id}.nfc_function", + "value": "${nfc_function}", + "definition": false + }, + { + "description": "vfc naming", + "name": "nfc_naming", + "parentUniqueId": "${parent_id}", + "password": false, + "required": false, + "schema": { + "property": {} + }, + "type": "org.openecomp.datatypes.Naming", + "uniqueId": "${parent_id}.nfc_naming", + "value": "{\"ecomp_generated_naming\":true,\"naming_policy\":\"${nfc_naming_policy}\"}", + "definition": false + } +] diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot index 38d7c27f..c9edfae3 100644 --- a/robot/resources/asdc_interface.robot +++ b/robot/resources/asdc_interface.robot @@ -23,6 +23,7 @@ ${ASDC_VENDOR_FEATURE_GROUP_PATH} /feature-groups ${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} /license-agreements ${ASDC_VENDOR_ACTIONS_PATH} /actions ${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} /orchestration-template-candidate +${ASDC_FE_CATALOG_RESOURCES_PATH} /sdc1/feProxy/rest/v1/catalog/resources ${ASDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources ${ASDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource @@ -44,6 +45,8 @@ ${ASDC_CATALOG_RESOURCE_TEMPLATE} robot/assets/templates/asdc/catalog_resourc ${ASDC_USER_REMARKS_TEMPLATE} robot/assets/templates/asdc/user_remarks.template ${ASDC_CATALOG_SERVICE_TEMPLATE} robot/assets/templates/asdc/catalog_service.template ${ASDC_RESOURCE_INSTANCE_TEMPLATE} robot/assets/templates/asdc/resource_instance.template +${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} robot/assets/templates/asdc/catalog_vnf_properties.template +${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} robot/assets/templates/asdc/catalog_vnf_inputs.template ${ASDC_FE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_ASDC_FE_PORT} ${ASDC_BE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_ASDC_BE_PORT} ${ASDC_BE_ONBOARD_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_ONBOARD_IP_ADDR}:${GLOBAL_ASDC_BE_ONBOARD_PORT} @@ -51,12 +54,12 @@ ${ASDC_BE_ONBOARD_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECT *** Keywords *** Distribute Model From ASDC [Documentation] goes end to end creating all the asdc objects based ona model and distributing it to the systems. it then returns the service name, vf name and vf module name - [Arguments] ${model_zip_path} ${catalog_service_name}= + [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${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} + \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds} \ 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']} @@ -91,7 +94,7 @@ Loop Over Check Catalog Service Distributed 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} + [Arguments] ${model_zip_path} ${cds}= ${license_model_id} ${license_model_version_id}= Add ASDC License Model ${key_group_id}= Add ASDC License Group ${license_model_id} ${license_model_version_id} ${pool_id}= Add ASDC Entitlement Pool ${license_model_id} ${license_model_version_id} @@ -106,8 +109,45 @@ 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} + # Check if need to set up CDS properties + Run Keyword If '${cds}' == 'vfwng' Setup ASDC Catalog Resource CDS Properties ${catalog_resource_id} + ${catalog_resource_id}= Certify ASDC Catalog Resource ${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} [Return] ${catalog_resource_id} +Setup ASDC Catalog Resource CDS Properties + [Documentation] Set up vfwng VNF properties and inputs for CDS + [Arguments] ${catalog_resource_id} + # Set vnf module properties + ${resp}= Get ASDC Catalog Resource Component Instances ${catalog_resource_id} + :FOR ${comp} in @{resp['componentInstances']} + \ ${name} Set Variable ${comp['name']} + \ ${uniqueId} Set Variable ${comp['uniqueId']} + \ ${actualComponentUid} Set Variable ${comp['actualComponentUid']} + \ ${test} ${v}= Run Keyword and Ignore Error Should Contain ${name} abstract_ + \ Run Keyword If '${test}' == 'FAIL' Continue For Loop + \ ${response}= Get ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${actualComponentUid} + \ ${dict}= Create Dictionary parent_id=${response[6]['parentUniqueId']} + \ Run Keyword If '${name}'=='abstract_vfw' Set To Dictionary ${dict} nfc_function=vfw nfc_naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP + \ Run Keyword If '${name}'=='abstract_vpg' Set To Dictionary ${dict} nfc_function=vpg nfc_naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP + \ Run Keyword If '${name}'=='abstract_vsn' Set To Dictionary ${dict} nfc_function=vsn nfc_naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP + \ ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} ${dict} + \ ${response}= Set ASDC Catalog Resource Component Instance Properties ${catalog_resource_id} ${uniqueId} ${data} + \ Log To Console resp=${response} + + # Set vnf inputs + ${resp}= Get ASDC Catalog Resource Inputs ${catalog_resource_id} + ${dict}= Create Dictionary + :FOR ${comp} in @{resp['inputs']} + \ ${name} Set Variable ${comp['name']} + \ ${uid} Set Variable ${comp['uniqueId']} + \ Run Keyword If '${name}'=='nf_function' Set To Dictionary ${dict} nf_function=ONAP-FIREWALL nf_function_uid=${uid} + \ Run Keyword If '${name}'=='nf_type' Set To Dictionary ${dict} nf_type=FIREWALL nf_type_uid=${uid} + \ Run Keyword If '${name}'=='nf_naming_code' Set To Dictionary ${dict} nf_naming_code=vfw nf_naming_code_uid=${uid} + \ Run Keyword If '${name}'=='nf_role' Set To Dictionary ${dict} nf_role=vFW nf_role_uid=${uid} + \ Run Keyword If '${name}'=='cloud_env' Set To Dictionary ${dict} cloud_env=openstack cloud_env_uid=${uid} + ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} ${dict} + ${response}= Set ASDC Catalog Resource VNF Inputs ${catalog_resource_id} ${data} + Add ASDC License Model [Documentation] Creates an asdc license model and returns its id ${uuid}= Generate UUID @@ -273,6 +313,55 @@ Get ASDC Catalog Resource [Arguments] ${catalog_resource_id} ${resp}= Run ASDC Get Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id} ${ASDC_DESIGNER_USER_ID} [Return] ${resp.json()} +Get ASDC Catalog Resource Component Instances + [Documentation] gets asdc Catalog Resource Component Instances by its id + [Arguments] ${catalog_resource_id} + ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=componentInstances ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT} + [Return] ${resp.json()} +Get ASDC Catalog Resource Inputs + [Documentation] gets asdc Catalog Inputs by its id + [Arguments] ${catalog_resource_id} + ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/filteredDataByParams?include=inputs ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT} + [Return] ${resp.json()} +Get ASDC Catalog Resource Component Instance Properties + [Documentation] gets an asdc Catalog Resource properties by its id + [Arguments] ${catalog_resource_id} ${component_instance_id} ${component_id} + ${resp}= Run ASDC Get Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/componentInstances/${component_instance_id}/${component_id}/inputs ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT} + [Return] ${resp.json()} +Set ASDC Catalog Resource Component Instance Properties + [Documentation] sets an asdc Catalog Resource by its id + [Arguments] ${catalog_resource_id} ${component_instance_id} ${data} + ${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/resourceInstance/${component_instance_id}/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT} + [Return] ${resp.json()} +Set ASDC Catalog Resource VNF Inputs + [Documentation] sets an asdc Catalog Resource by its id + [Arguments] ${catalog_resource_id} ${data} + ${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/update/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT} + [Return] ${resp.json()} +Get SDC Demo Vnf Catalog Resource + [Documentation] gets resource id's for demonstration VNFs for instantiate + [Arguments] ${service_name} + ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0 + @{ITEMS}= Copy List ${resp.json()['componentInstances']} + ${demo_catalog_resource}= Create Dictionary + :FOR ${ELEMENT} IN @{ITEMS} + \ Log ${ELEMENT['name']} + \ Log ${ELEMENT['groupInstances'][0]['groupName']} + \ ${vnf}= Get VNF From Group Name ${ELEMENT['groupInstances'][0]['groupName']} ${service_name} + \ ${vnf_data}= Create Dictionary vnf_type=${ELEMENT['name']} vf_module=${ELEMENT['groupInstances'][0]['groupName']} + \ LOG ${vnf_data} + \ Set To Dictionary ${demo_catalog_resource} ${vnf}=${vnf_data} + \ LOG ${demo_catalog_resource} + [Return] ${demo_catalog_resource} + +Get VNF From Group Name + [Documentation] looks up vnf key from service mapping for a regex on groupName and service_name + [Arguments] ${group_name} ${service_name} + ${vnf}= Set Variable If + ... ('${service_name}'=='demoVFWCL') and ('base_vfw' in '${group_name}') vFWSNK + ... ('${service_name}'=='demoVFWCL') and ('base_vpkg' in '${group_name}') vPKG + ... ('${service_name}'=='demoVLB') and ('base_vlb' in '${group_name}') vLB + [Return] ${vnf} Checkin ASDC Catalog Resource [Documentation] checksin an asdc Catalog Resource by its id [Arguments] ${catalog_resource_id} diff --git a/robot/resources/portal-sdk/portalDef.robot b/robot/resources/portal-sdk/portalDef.robot index a876d9c8..57b6e1bb 100644 --- a/robot/resources/portal-sdk/portalDef.robot +++ b/robot/resources/portal-sdk/portalDef.robot @@ -1,6 +1,6 @@ *** Settings *** Documentation This is RobotFrame work script -Library ExtendedSelenium2Library browser_breath_delay=1 +Library ExtendedSelenium2Library Library OperatingSystem Library ../../library/eteutils/RequestsClientCert.py Library RequestsLibrary @@ -30,17 +30,6 @@ ${GLOBAL_APPLICATION_ID} robot-functional ${GLOBAL_PORTAL_ADMIN_USER} demo ${GLOBAL_PORTAL_ADMIN_PWD} demo123456! ${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/ -${GLOBAL_SELENIUM_BROWSER} chrome -${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary -${GLOBAL_SELENIUM_DELAY} 1 -${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 30 -${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 10 -${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} orchestration -${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume -${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute -${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network -${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image -${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity ${GLOBAL_BUILD_NUMBER} 0 ${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt ${jira} jira @@ -50,7 +39,10 @@ ${portal_Template} ${CURDIR}/portal.template ${Result} FALSE ${td_id} 0 ${download_link_id} 0 - + +${HEADLESS} False + + *** Keywords *** Generate Random User Name @@ -80,7 +72,7 @@ Portal admin Login To Portal GUI Setup Browser # Open Browser ${PORTAL_LOGIN_URL} chrome Go To ${PORTAL_LOGIN_URL} - Maximize Browser Window + # Maximize Browser Window Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} Log Logging in to ${PORTAL_URL}${PORTAL_ENV} #Handle Proxy Warning @@ -90,7 +82,7 @@ Portal admin Login To Portal GUI Click Link xpath=//a[@id='loginBtn'] Sleep 5s Go To ${PORTAL_HOME_URL} - Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} #Execute Javascript document.getElementById('w-ecomp-footer').style.display = 'none' Log Logged in to ${PORTAL_URL}${PORTAL_ENV} @@ -657,13 +649,15 @@ Portal admin Logout from Portal GUI [Documentation] Logout from Portal GUI Click Element xpath=//div[@id='header-user-icon'] Run Keyword And Ignore Error Click Button xpath=//button[contains(.,'Log out')] - Sleep 5s - Title Should Be Login + # TODO: Rework Logout tests to deal with intermittent "document unloaded while waiting for result" errors + # Sleep 5s + # Title Should Be Login Application admin Login To Portal GUI [Documentation] Logs into Portal GUI # Setup Browser Now being managed by test case ##Setup Browser + Go To ${PORTAL_LOGIN_URL} Title Should Be Login Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID} Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD} @@ -763,8 +757,9 @@ Application admin Logout from Portal GUI #Set Selenium Implicit Wait 3000 Run Keyword And Ignore Error Click Button xpath=//button[contains(text(),'Log out')] #Set Selenium Implicit Wait 3000 - Sleep 5s - Title Should Be Login + # TODO: Rework Logout tests to deal with intermittent "document unloaded while waiting for result" errors + # Sleep 5s + # Title Should Be Login Standared user Login To Portal GUI [Documentation] Logs into Portal GUI @@ -776,6 +771,7 @@ Standared user Login To Portal GUI #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} #Log Logging in to ${PORTAL_URL}${PORTAL_ENV} # Handle Proxy Warning + Go To ${PORTAL_LOGIN_URL} Title Should Be Login Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID} Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD} @@ -825,8 +821,9 @@ Standared user Logout from Portal GUI Click Element xpath=//div[@id='header-user-icon'] Run Keyword And Ignore Error Click Button xpath=//button[contains(.,'Log out')] #Confirm Action - Sleep 5s - Title Should Be Login + # TODO: Rework Logout tests to deal with intermittent "document unloaded while waiting for result" errors + # Sleep 5s + # Title Should Be Login Portal admin Add New Account Click Link //*[@id="parent-item-App-Account-Management"] diff --git a/robot/resources/test_templates/model_test_template.robot b/robot/resources/test_templates/model_test_template.robot index bd63d2b7..3fbf7d26 100644 --- a/robot/resources/test_templates/model_test_template.robot +++ b/robot/resources/test_templates/model_test_template.robot @@ -22,7 +22,7 @@ ${CATALOG_SERVICE_ID} *** Keywords *** Model Distribution For Directory - [Arguments] ${service} ${catalog_service_name}= + [Arguments] ${service} ${catalog_service_name}= ${cds}= ${directory_list}= Get From Dictionary ${GLOBAL_SERVICE_FOLDER_MAPPING} ${service} ${ziplist}= Create List ${uuid}= Get Current Date @@ -36,7 +36,7 @@ Model Distribution For 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} ${catalog_resources} 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} ${cds} Set Test Variable ${CATALOG_RESOURCE_IDS} ${catalog_resource_ids} Set Test Variable ${CATALOG_SERVICE_ID} ${catalog_service_id} Set Test Variable ${CATALOG_RESOURCES} ${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 b13a088b..26d8eefe 100644 --- a/robot/resources/test_templates/vnf_orchestration_test_template.robot +++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot @@ -95,17 +95,15 @@ Orchestrate Demo VNF ... '${service}'=='vLB' demoVLB ${lcp_region}= Get Openstack Region ${uuid}= Generate UUID - Set Test Variable ${CUSTOMER_NAME} ${customer_name} + Set Test Variable ${CUSTOMER_NAME} ${customer_name}_${uuid} Set Test Variable ${SERVICE} ${service} ${list}= Create List Set Test Variable ${STACK_NAMES} ${list} ${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} - #${service_model_type} ${vnf_type} ${vf_modules} ${catalog_resources}= Get Demonstration Model Data ${service_model_type} - ${vnf_json_resources} OperatingSystem.Get File /tmp/config/vnf_resources.json - # need dictionary for service with vnf_type vf_module + ${vnf_json_resources}= Get SDC Demo Vnf Catalog Resource ${service_model_type} Set Suite Variable ${SUITE_SERVICE_MODEL_NAME} ${service_model_type} + Create Customer For VNF ${CUSTOMER_NAME} ${CUSTOMER_NAME} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} Setup Browser 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} @@ -115,8 +113,8 @@ Orchestrate Demo VNF :for ${vnf} in @{vnflist} \ ${vnf_name}= Catenate Ete_${vnf}_${uuid} \ ${vf_module_name}= Catenate Vfmodule_Demo_${vnf}_${uuid} - \ ${vnf_type}= Get Demo VNF Type ${vnf_json_resources} ${vnf} - \ ${vf_module}= Get Demo VF Module ${vnf_json_resources} ${vnf} + \ ${vnf_type}= Set Variable ${vnf_json_resources['${vnf}']['vnf_type']} + \ ${vf_module}= Set Variable ${vnf_json_resources['${vnf}']['vf_module']} \ 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_entry}= Create Dictionary name=${vf_module} @@ -133,21 +131,6 @@ Orchestrate Demo VNF [Return] ${vf_module_name} ${service} -Get Demo VNF Type - [Documentation] Get vnf_type from json demo vnf data - [Arguments] ${json_resources} ${vnf} - ${vnf_type}= Get Json Value ${json_resources} /${vnf}/vnf_type - ${vnf_type}= Remove String ${vnf_type} " - [Return] ${vnf_type} - -Get Demo VF Module - [Documentation] Get vf_module from json demo vnf data - [Arguments] ${json_resources} ${vnf} - ${vf_module}= Get Json Value ${json_resources} /${vnf}/vf_module - ${vf_module}= Remove String ${vf_module} " - [Return] ${vf_module} - - 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} diff --git a/robot/testsuites/demo.robot b/robot/testsuites/demo.robot index e329671c..54129a3b 100644 --- a/robot/testsuites/demo.robot +++ b/robot/testsuites/demo.robot @@ -4,6 +4,7 @@ Documentation Executes the VNF Orchestration Test cases including setup and te Library Collections Library HTTPUtils Resource ../resources/demo_preload.robot +Resource ../resources/asdc_interface.robot *** Variables *** ${VNF_NAME} DemoVNF @@ -71,3 +72,9 @@ Preload APPC CDT GUI Preload APPC CDT GUI # Preload APPC CDT GUI demo reference_AllAction_vLoadBalancer_vLoadBalancer-test0_0.0.1V.json ${EXECDIR}/robot/assets/templates/appc/reference_AllAction_vLoadBalancer_vLoadBalancer-test0_0.0.1V.json ${EXECDIR}/robot/assets/templates/appc/template_ConfigScaleOut_vLoadBalancer_vLoadBalancer-test0_0.0.1V_vLB.xml ${EXECDIR}/robot/assets/templates/appc/pd_ConfigScaleOut_vLoadBalancer_vLoadBalancer-test0_0.0.1V_vLB.yaml +Distribute vFWNG CDS Model + [Documentation] Distribute vFWNG for CDS + [Tags] DistributeVFWNG + [Timeout] 600 + Model Distribution For Directory service=vFWNG cds=vfwng + @@ -101,7 +101,4 @@ do fi done -# Blindly clean up all outstanding chrome processes -pkill chrome - exit $RET_CODE |