From a6ce951601727e8e544756f25ecb908f0cf7c904 Mon Sep 17 00:00:00 2001 From: DR695H Date: Fri, 19 Jul 2019 14:25:43 -0400 Subject: import all libraries even ones that done have overridign keywords so there is no dual importing Issue-ID: TEST-174 Change-Id: I0b9bd9a703d3b792fa4b57ae048060525d0559cd Signed-off-by: DR695H --- robot/resources/asdc_interface.robot | 10 +++++----- robot/resources/heatbridge.robot | 6 +++--- robot/resources/sdngc_interface.robot | 22 +++++++++++----------- .../stack_validation/policy_check_vfw.robot | 2 +- .../test_templates/model_test_template.robot | 12 ++++-------- .../model_test_template_vcperescust.robot | 6 +++--- 6 files changed, 27 insertions(+), 31 deletions(-) (limited to 'robot') diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot index f3aad2fb..c212eacf 100644 --- a/robot/resources/asdc_interface.robot +++ b/robot/resources/asdc_interface.robot @@ -10,7 +10,7 @@ Library String Library ArchiveLibrary Library ONAPLibrary.Openstack Library DateTime -Library ONAPLibrary.ServiceMapping +Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping Library ONAPLibrary.Templating Library ONAPLibrary.SDC WITH NAME SDC Resource global_properties.robot @@ -95,8 +95,8 @@ 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} - Set Directory default ./demo/service_mapping - ${vnflist}= Get Service Vnf Mapping default ${service} + ServiceMapping.Set Directory default ./demo/service_mapping + ${vnflist}= ServiceMapping.Get Service Vnf Mapping default ${service} # Spread the icons on the pallette starting on the left ${xoffset}= Set Variable ${0} @@ -111,7 +111,7 @@ Distribute Model From ASDC ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule # # do network - ${networklist}= Get Service Neutron Mapping default ${service} + ${networklist}= ServiceMapping.Get Service Neutron Mapping default ${service} ${generic_neutron_net_uuid}= Get Generic NeutronNet UUID :FOR ${network} IN @{networklist} \ ${loop_catalog_resource_id}= Set Variable ${generic_neutron_net_uuid} @@ -126,7 +126,7 @@ Distribute Model From ASDC # # do deployment artifacts # - ${deploymentlist}= Get Service Deployment Artifact Mapping default ${service} + ${deploymentlist}= ServiceMapping.Get Service Deployment Artifact Mapping default ${service} :FOR ${deployment} IN @{deploymentlist} \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} \ Setup SDC Catalog Resource Deployment Artifact Properties ${catalog_service_id} ${loop_catalog_resource_resp} ${catalog_resource_unique_name} ${deployment} diff --git a/robot/resources/heatbridge.robot b/robot/resources/heatbridge.robot index 65415a31..39385437 100644 --- a/robot/resources/heatbridge.robot +++ b/robot/resources/heatbridge.robot @@ -2,7 +2,7 @@ Library HeatBridge Library Collections Library OperatingSystem -Library ONAPLibrary.ServiceMapping +Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping Library ONAPLibrary.Templating Resource openstack/keystone_interface.robot @@ -81,10 +81,10 @@ Run Validation Query [Documentation] Run A&AI query to validate the bulk add [Arguments] ${stack_info} ${service} ${vnf_id} Return from Keyword If '${service}' == '' - Set Directory default ./demo/service_mapping + ServiceMapping.Set Directory default ./demo/service_mapping ${payload}= Run Get Generic VNF by VnfId ${vnf_id} ${vnf_type}= Catenate ${payload.json()[vnf-type]} - ${server_name_parameter}= Get Validate Name Mapping default ${service} ${vnf_type} + ${server_name_parameter}= ServiceMapping.Get Validate Name Mapping default ${service} ${vnf_type} ${vserver_name}= Get From Dictionary ${stack_info} ${server_name_parameter} Run Vserver Query ${vserver_name} diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot index 114cd4c4..6a2f6494 100644 --- a/robot/resources/sdngc_interface.robot +++ b/robot/resources/sdngc_interface.robot @@ -8,7 +8,7 @@ Library Collections Library String Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping Library ONAPLibrary.PreloadData WITH NAME Preload -Library ONAPLibrary.Templating +Library ONAPLibrary.Templating WITH NAME Templating Library ONAPLibrary.SDNC WITH NAME SDNC Resource global_properties.robot Resource browser_setup.robot @@ -49,8 +49,8 @@ Preload Network ${network_name}= Catenate SEPARATOR=_ net ${network_role} ${name_suffix} ${subnet_name}= Catenate SEPARATOR=_ net ${network_role} subnet ${name_suffix} ${parameters}= Create Dictionary network_role=${network_role} service_type=vCPE network_type=Generic NeutronNet network_name=${network_name} subnet_start_ip=${subnet_start_ip} subnet_gateway=${subnet_gateway} - Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/template.network.jinja ${parameters} + Templating.Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/template.network.jinja ${parameters} ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD} ${post_resp}= SDNC.Run Post Request ${SDNGC_REST_ENDPOINT} ${SDNGC_INDEX_PATH}${PRELOAD_NETWORK_TOPOLOGY_OPERATION_PATH} data=${data} auth=${auth} [Return] ${network_name} ${subnet_name} @@ -59,8 +59,8 @@ Preload Vcpe vGW [Arguments] ${brg_mac} ${cpe_network_name} ${cpe_subnet_name} ${mux_gw_net} ${mux_gw_subnet} ${name_suffix}= Generate Timestamp ${parameters}= Create Dictionary pub_key=${GLOBAL_INJECTED_PUBLIC_KEY} brg_mac=${brg_mac} cpe_public_net=${cpe_network_name} cpe_public_subnet=${cpe_subnet_name} mux_gw_net=${mux_gw_net} mux_gw_subnet=${mux_gw_subnet} suffix=${name_suffix} oam_onap_net=oam_network_2No2 oam_onap_subnet=oam_network_2No2 public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID} - Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/template.vcpe_vgw_vfmodule.jinja ${parameters} + Templating.Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/template.vcpe_vgw_vfmodule.jinja ${parameters} ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD} ${post_resp}= SDNC.Run Post Request ${SDNGC_REST_ENDPOINT} ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} data=${data} auth=${auth} @@ -68,8 +68,8 @@ Preload Vcpe vGW Gra [Arguments] ${brg_mac} ${cpe_public_network_name} ${cpe_public_subnet_name} ${mux_gw_net} ${mux_gw_subnet} ${name_suffix}= Generate Timestamp ${parameters}= Create Dictionary pub_key=${GLOBAL_INJECTED_PUBLIC_KEY} brg_mac=${brg_mac} cpe_public_net=${cpe_public_network_name} cpe_public_subnet=${cpe_public_subnet_name} mux_gw_net=${mux_gw_net} mux_gw_subnet=${mux_gw_subnet} suffix=${name_suffix} oam_onap_net=oam_network_2No2 oam_onap_subnet=oam_network_2No2 public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID} - Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/template.vcpe_gwgra_vfmodule.jinja ${parameters} + Templating.Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/template.vcpe_gwgra_vfmodule.jinja ${parameters} ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD} ${post_resp}= SDNC.Run Post Request ${SDNGC_REST_ENDPOINT} ${SDNGC_INDEX_PATH}${PRELOAD_GR_TOPOLOGY_OPERATION_PATH} data=${data} auth=${auth} @@ -92,7 +92,7 @@ Preload Vnf ${base_vf_module_type}= Catenate ${closedloop_vf_module}= Create Dictionary ServiceMapping.Set Directory default ./demo/service_mapping - ${templates}= Get Service Template Mapping default ${service} ${generic_vnf_type} + ${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 # need to pass in vnf_index if non-zero @@ -142,8 +142,8 @@ Preload One Vnf Topology Return From Keyword If '${filename}' == '' ${parameters}= Get Template Parameters ${generic_vnf_name} ${filename} ${uuid} ${service} 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} - Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} - ${data}= Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/preload.jinja ${parameters} + Templating.Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Templating.Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/preload.jinja ${parameters} ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD} ${post_resp}= SDNC.Run Post Request ${SDNGC_REST_ENDPOINT} ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} data=${data} auth=${auth} Should Be Equal As Strings ${post_resp.json()['output']['response-code']} 200 @@ -200,7 +200,7 @@ Resolve VNF Parameters Into Array ${keys}= Get Dictionary Keys ${from} :FOR ${key} IN @{keys} \ ${value}= Get From Dictionary ${from} ${key} - \ ${value}= Template String ${value} ${valuemap} + \ ${value}= Templating.Template String ${value} ${valuemap} \ ${parameter}= Create Dictionary vnf-parameter-name=${key} vnf-parameter-value=${value} \ Append To List ${vnf_parameters} ${parameter} [Return] ${vnf_parameters} diff --git a/robot/resources/stack_validation/policy_check_vfw.robot b/robot/resources/stack_validation/policy_check_vfw.robot index 927b1ec1..8b09bad2 100644 --- a/robot/resources/stack_validation/policy_check_vfw.robot +++ b/robot/resources/stack_validation/policy_check_vfw.robot @@ -8,7 +8,7 @@ Library ONAPLibrary.JSON Library ONAPLibrary.Openstack Library Collections Library String -Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping +Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping Resource ../openstack/keystone_interface.robot Resource ../openstack/nova_interface.robot diff --git a/robot/resources/test_templates/model_test_template.robot b/robot/resources/test_templates/model_test_template.robot index 67c95e98..ab331051 100644 --- a/robot/resources/test_templates/model_test_template.robot +++ b/robot/resources/test_templates/model_test_template.robot @@ -5,7 +5,7 @@ Library ArchiveLibrary Library Collections Library String Library DateTime -Library ONAPLibrary.ServiceMapping +Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping Resource ../asdc_interface.robot *** Variables *** @@ -19,11 +19,10 @@ ${CATALOG_RESOURCE_IDS} ${CATALOG_SERVICE_ID} *** Keywords *** - Model Distribution For Directory [Arguments] ${service} ${catalog_service_name}= ${cds}= - Set Directory default ./demo/service_mapping - ${directory_list}= Get Service Folder Mapping default ${service} + ServiceMapping.Set Directory default ./demo/service_mapping + ${directory_list}= ServiceMapping.Get Service Folder Mapping default ${service} ${ziplist}= Create List ${uuid}= Get Current Date ${service_name}= Catenate ${service} ${uuid} @@ -43,9 +42,6 @@ Model Distribution For Directory Download CSAR ${catalog_service_id} [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources} - - - Teardown Model Distribution [Documentation] Clean up at the end of the test Log ${CATALOG_SERVICE_ID} ${CATALOG_RESOURCE_IDS} @@ -59,4 +55,4 @@ Teardown Models \ ${resourece_json}= Mark ASDC Catalog Resource Inactive ${catalog_resource_id} ${service_json}= Mark ASDC Catalog Service Inactive ${catalog_service_id} ${services_json}= Delete Inactive ASDC Catalog Services - ${resources_json}= Delete Inactive ASDC Catalog Resources + ${resources_json}= Delete Inactive ASDC Catalog Resources \ No newline at end of file diff --git a/robot/resources/test_templates/model_test_template_vcperescust.robot b/robot/resources/test_templates/model_test_template_vcperescust.robot index b096a302..c30cfb23 100644 --- a/robot/resources/test_templates/model_test_template_vcperescust.robot +++ b/robot/resources/test_templates/model_test_template_vcperescust.robot @@ -5,7 +5,7 @@ Library ArchiveLibrary Library Collections Library String Library DateTime -Library ONAPLibrary.ServiceMapping +Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping Resource ../asdc_interface.robot *** Variables *** @@ -22,8 +22,8 @@ ${CATALOG_SERVICE_ID} Model Distribution For vCPEResCust Directory [Arguments] ${service} ${catalog_service_name}= ${cds}= - Set Directory default ./demo/service_mapping - ${directory_list}= Get Service Folder Mapping default ${service} + ServiceMapping.Set Directory default ./demo/service_mapping + ${directory_list}= ServiceMapping.Get Service Folder Mapping default ${service} ${ziplist}= Create List ${uuid}= Get Current Date ${service_name}= Catenate ${service} ${uuid} -- cgit 1.2.3-korg