summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--robot/resources/demo_preload.robot32
-rw-r--r--robot/resources/sdngc_interface.robot49
-rw-r--r--robot/resources/test_templates/closedloop_test_template.robot14
-rw-r--r--robot/resources/test_templates/vnf_orchestration_test_template.robot91
-rw-r--r--robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot12
-rw-r--r--robot/testsuites/cds.robot4
-rw-r--r--robot/testsuites/demo.robot8
-rw-r--r--robot/testsuites/vnf-orchestration.robot16
8 files changed, 89 insertions, 137 deletions
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index 938465f7..cbdeef7a 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -54,10 +54,10 @@ Load OwningEntity
Load Customer
[Documentation] Use openECOMP to Orchestrate a service.
[Arguments] ${customer_name}
- Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
+ ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
Set Test Variable ${CUSTOMER_NAME} ${customer_name}
${region}= Get Openstack Region
- Create Customer For VNF Demo ${CUSTOMER_NAME} ${CUSTOMER_NAME} INFRA ${GLOBAL_AAI_CLOUD_OWNER} ${region} ${TENANT_ID}
+ Create Customer For VNF Demo ${CUSTOMER_NAME} ${CUSTOMER_NAME} INFRA ${GLOBAL_AAI_CLOUD_OWNER} ${region} ${tenant_id}
Create Customer For VNF Demo ${CUSTOMER_NAME} ${CUSTOMER_NAME} INFRA ${GLOBAL_AAI_CLOUD_OWNER} RegionTlab 50b190410b2a4c229d8a6044a80ab7c1
Create Availability Zone If Not Exists ${GLOBAL_AAI_CLOUD_OWNER} ${region} ${GLOBAL_AAI_AVAILABILITY_ZONE_NAME}
@@ -110,7 +110,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} ${service}
# 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.
@@ -170,20 +170,13 @@ APPC Mount Point
${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=${GLOBAL_INJECTED_OPENSTACK_PUBLIC_NETWORK}
-
- # vpg_oam_ip is no longer needed - use vpg_public_ip
- #${vpg_oam_ip}= Get From Dictionary ${stack_info} vpg_private_ip_1
- #${vpg_oam_ip}= Get From Dictionary ${stack_info} vpg_onap_private_ip_0
- #${appc}= Create Mount Point In APPC ${vpg_name_0} ${vpg_oam_ip}
- #${appc}= Create Mount Point In APPC ${vnf_id} ${vpg_oam_ip}
-
${appc}= Create Mount Point In APPC ${vnf_id} ${vpg_public_ip}
Instantiate VNF
[Arguments] ${service} ${vf_module_label}=NULL
- Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
- ${vf_module_name_list} ${service} ${generic_vnfs}= Orchestrate VNF DemoCust ${service} ${service} ${TENANT_NAME}
- Save For Delete
+ ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
+ ${vf_module_name_list} ${generic_vnfs} ${vvg_server_id}= Orchestrate VNF DemoCust ${service} ${service} ${tenant_id} ${tenant_name}
+ Save For Delete ${tenant_id} ${tenant_name} ${vvg_server_id}
Log Customer Name=${CUSTOMER_NAME}
:FOR ${vf_module_name} IN @{vf_module_name_list}
\ Log VNF Module Name=${vf_module_name}
@@ -203,9 +196,8 @@ Instantiate VNF
Instantiate Demo VNF
[Arguments] ${service} ${vf_module_label}=NULL
- Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
- ${vf_module_name} ${service} ${generic_vnfs}= Orchestrate Demo VNF Demonstration ${service} ${service} ${TENANT_NAME}
- #Save For Delete
+ ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
+ ${vf_module_name} ${service} ${generic_vnfs}= Orchestrate Demo VNF Demonstration ${service} ${service} ${tenant_id} ${tenant_name}
Log Customer Name=${CUSTOMER_NAME}
Log VNF Module Name=${vf_module_name}
# Don't get from MSO for now due to SO-1186
@@ -221,13 +213,13 @@ Instantiate Demo VNF
Save For Delete
[Documentation] Create a variable file to be loaded for save for delete
+ [Arguments] ${tenant_id} ${tenant_name} ${vvg_server_id}
${dict}= Create Dictionary
- Set To Dictionary ${dict} TENANT_NAME=${TENANT_NAME}
- Set To Dictionary ${dict} TENANT_ID=${TENANT_ID}
+ Set To Dictionary ${dict} TENANT_NAME=${tenant_name}
+ Set To Dictionary ${dict} TENANT_ID=${tenant_id}
Set To Dictionary ${dict} CUSTOMER_NAME=${CUSTOMER_NAME}
Set To Dictionary ${dict} STACK_NAME=${STACK_NAME}
- Set To Dictionary ${dict} SERVICE=${SERVICE}
- Set To Dictionary ${dict} VVG_SERVER_ID=${VVG_SERVER_ID}
+ Set To Dictionary ${dict} VVG_SERVER_ID=${vvg_server_id}
Set To Dictionary ${dict} SERVICE_INSTANCE_ID=${SERVICE_INSTANCE_ID}
Set To Dictionary ${dict} VLB_CLOSED_LOOP_DELETE=${VLB_CLOSED_LOOP_DELETE}
diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot
index 961176a8..1311f6e5 100644
--- a/robot/resources/sdngc_interface.robot
+++ b/robot/resources/sdngc_interface.robot
@@ -32,31 +32,11 @@ ${VNF_KEYPAIR_SSH_KEY} robot/assets/keys/onap_dev_public.txt
*** Keywords ***
Run SDNGC Health Check
[Documentation] Runs an SDNGC healthcheck
- ${resp}= Run SDNGC Post Request ${SDNGC_INDEX PATH}${SDNCGC_HEALTHCHECK_OPERATION_PATH} ${None}
+ ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD}
+ ${resp}= Run Post Request ${SDNGC_REST_ENDPOINT} ${SDNGC_INDEX PATH}${SDNCGC_HEALTHCHECK_OPERATION_PATH} data=${None} auth=${auth}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['output']['response-code']} 200
-Run SDNGC Get Request
- [Documentation] Runs an SDNGC get request
- [Arguments] ${data_path}
- ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD}
- ${resp}= Run Get Request ${SDNGC_REST_ENDPOINT} ${data_path} auth=${auth}
- [Return] ${resp}
-
-Run SDNGC Put Request
- [Documentation] Runs an SDNGC put request
- [Arguments] ${data_path} ${data}
- ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD}
- ${resp}= Run Put Request ${SDNGC_REST_ENDPOINT} ${data_path} data=${data} auth=${auth}
- [Return] ${resp}
-
-Run SDNGC Post Request
- [Documentation] Runs an SDNGC post request
- [Arguments] ${data_path} ${data}
- ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD}
- ${resp}= Run Post Request ${SDNGC_REST_ENDPOINT} ${data_path} data=${data} auth=${auth}
- [Return] ${resp}
-
Preload Vcpe Networks
Preload Network cpe_public 10.2.0.2 10.2.0.1
Preload Network cpe_signal 10.4.0.2 10.4.0.1
@@ -72,7 +52,8 @@ Preload Network
${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}
- ${post_resp}= Run SDNGC Post Request ${SDNGC_INDEX_PATH}${PRELOAD_NETWORK_TOPOLOGY_OPERATION_PATH} ${data}
+ ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD}
+ ${post_resp}= Run Post Request ${SDNGC_REST_ENDPOINT} ${SDNGC_INDEX_PATH}${PRELOAD_NETWORK_TOPOLOGY_OPERATION_PATH} data=${data} auth=${auth}
[Return] ${network_name} ${subnet_name}
Preload Vcpe vGW
@@ -82,7 +63,8 @@ Preload Vcpe vGW
${parameters}= Create Dictionary pub_key=${ssh_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}
- ${post_resp}= Run SDNGC Post Request ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} ${data}
+ ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD}
+ ${post_resp}= Run Post Request ${SDNGC_REST_ENDPOINT} ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} data=${data} auth=${auth}
Preload Vcpe vGW Gra
[Arguments] ${brg_mac} ${cpe_public_network_name} ${cpe_public_subnet_name} ${mux_gw_net} ${mux_gw_subnet}
@@ -91,7 +73,8 @@ Preload Vcpe vGW Gra
${parameters}= Create Dictionary pub_key=${ssh_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}
- ${post_resp}= Run SDNGC Post Request ${SDNGC_INDEX_PATH}${PRELOAD_GR_TOPOLOGY_OPERATION_PATH} ${data}
+ ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD}
+ ${post_resp}= Run Post Request ${SDNGC_REST_ENDPOINT} ${SDNGC_INDEX_PATH}${PRELOAD_GR_TOPOLOGY_OPERATION_PATH} data=${data} auth=${auth}
Preload Generic VfModule
[Arguments] ${service_instance_id} ${vnf_model} ${model_customization_name} ${short_model_customization_name} ${cpe_public_network_name}=None ${cpe_public_subnet_name}=None ${cpe_signal_network_name}=None ${cpe_signal_subnet_name}=None
@@ -165,9 +148,11 @@ Preload One Vnf Topology
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}
- ${put_resp}= Run SDNGC Post Request ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} ${data}
- Should Be Equal As Strings ${put_resp.json()['output']['response-code']} 200
- ${get_resp}= Run SDNGC Get Request ${SDNGC_INDEX_PATH}${PRELOAD_VNF_CONFIG_PATH}/${vf_module_name}/${vf_module_type}
+ ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD}
+ ${post_resp}= 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
+ ${auth}= Create List ${GLOBAL_SDNGC_USERNAME} ${GLOBAL_SDNGC_PASSWORD}
+ ${get_resp}= Run Get Request ${SDNGC_REST_ENDPOINT} ${SDNGC_INDEX_PATH}${PRELOAD_VNF_CONFIG_PATH}/${vf_module_name}/${vf_module_type} auth=${auth}
Get Template Parameters
[Arguments] ${generic_vnf_name} ${template} ${uuid} ${service}
@@ -213,14 +198,6 @@ Get Template Parameters
${parameters}= Create Dictionary vnf_parameters=${vnf_parameters_json}
[Return] ${parameters}
-Resolve Values Into Dictionary
- [Arguments] ${valuemap} ${from} ${to}
- ${keys}= Get Dictionary Keys ${from}
- :FOR ${key} IN @{keys}
- \ ${value}= Get From Dictionary ${from} ${key}
- \ ${value}= Template String ${value} ${valuemap}
- \ Set To Dictionary ${to} ${key} ${value}
-
Resolve VNF Parameters Into Array
[Arguments] ${valuemap} ${from}
${vnf_parameters}= Create List
diff --git a/robot/resources/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot
index 4547b92a..95af32b9 100644
--- a/robot/resources/test_templates/closedloop_test_template.robot
+++ b/robot/resources/test_templates/closedloop_test_template.robot
@@ -56,14 +56,16 @@ VFW Policy
Initialize VFW Policy
${stackname}= Orchestrate VNF vFW closedloop
Policy Check FirewallCL Stack ${stackname} ${VFWPOLICYRATE}
- Delete VNF
+ # there is none of this
+ Delete VNF ${None} ${None}
VDNS Policy
Initialize VDNS Policy
${stackname}= Orchestrate VNF vDNS closedloop
${dnsscaling}= Policy Check vLB Stack ${stackname} ${VLBPOLICYRATE}
Set Test Variable ${DNSSCALINGSTACK} ${dnsscaling}
- Delete VNF
+ # there is none of this
+ Delete VNF ${None} ${None}
Initialize VFW Policy
# Create Config Policy
@@ -190,15 +192,15 @@ Delete Ops Policy
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 vFWCL vFWCL ${TENANT_NAME}
+ ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
+ ${stack_name}= Orchestrate VNF ETE_CLP vFWCL vFWCL ${tenant_id} ${tenant_name}
[Return] ${stack_name}
Orchestrate VNF vDNS closedloop
[Documentation] VNF Orchestration for vLB
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 vLB vLB ${TENANT_NAME}
+ ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
+ ${stack_name}= Orchestrate VNF ETE_CLP vLB vLB ${tenant_id} ${tenant_name}
[Return] ${stack_name}
VFWCL High Test
diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot
index ca29d95e..dc239a8d 100644
--- a/robot/resources/test_templates/vnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot
@@ -23,52 +23,48 @@ Library SeleniumLibrary
Library Collections
Library ONAPLibrary.Utilities
Library ONAPLibrary.JSON
-Library ONAPLibrary.ServiceMapping
+Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping
*** Variables ***
#**************** TEST CASE VARIABLES **************************
-${TENANT_NAME}
-${TENANT_ID}
-${REGIONS}
${CUSTOMER_NAME}
${STACK_NAME}
${STACK_NAMES}
-${SERVICE}
-${VVG_SERVER_ID}
${SERVICE_INSTANCE_ID}
*** Keywords ***
Orchestrate VNF Template
+ [Teardown] Teardown VNF
[Documentation] Use openECOMP to Orchestrate a service.
- [Arguments] ${customer_name} ${service} ${product_family} ${tenant} ${delete_flag}=DELETE
- Orchestrate VNF ${customer_name} ${service} ${product_family} ${tenant}
- Run Keyword If '${delete_flag}' == 'DELETE' Delete VNF
+ [Arguments] ${customer_name} ${service} ${product_family} ${delete_flag}=DELETE
+ ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
+ ${vf_module_name_list} ${generic_vnfs} ${server_id}= Orchestrate VNF ${customer_name} ${service} ${product_family} ${tenant_id} ${tenant_name}
+ Run Keyword If '${delete_flag}' == 'DELETE' Delete VNF ${tenant_name} ${server_id}
Orchestrate VNF
[Documentation] Use openECOMP to Orchestrate a service.
- [Arguments] ${customer_name} ${service} ${product_family} ${tenant} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration
+ [Arguments] ${customer_name} ${service} ${product_family} ${tenant_id} ${tenant_name} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration
${lcp_region}= Get Openstack Region
${uuid}= Generate UUID4
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}
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}
+ ${server_id}= Run Keyword If '${service}' == 'vVG' Create VVG Server ${uuid}
+ Create Customer For VNF ${CUSTOMER_NAME} ${CUSTOMER_NAME} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id}
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}
Set Test Variable ${SERVICE_INSTANCE_ID} ${service_instance_id}
Validate Service Instance ${service_instance_id} ${service} ${customer_name}
- 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}
${generic_vnfs}= Create Dictionary
${vnf_name_index}= Set Variable 0
${vf_module_name_list}= Create List
@@ -81,23 +77,22 @@ Orchestrate VNF
\ ${vnf_type}= Get VNF Type ${catalog_resources} ${vnf} ${service}
\ ${vf_module}= Get VF Module ${catalog_resources} ${vnf} ${service}
\ 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}
+ \ Wait Until Keyword Succeeds 300s 5s Create VID VNF ${service_instance_id} ${vnf_name} ${product_family} ${lcp_region} ${tenant_name} ${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}
+ \ ${vf_module_id}= Create VID VNF module ${service_instance_id} ${vf_module_name} ${lcp_region} ${tenant_name} ${vf_module_type} ${CUSTOMER_NAME} ${vnf_name}
\ ${generic_vnf}= Validate Generic VNF ${vnf_name} ${vnf_type} ${service_instance_id}
\ Set To Dictionary ${generic_vnfs} ${vf_module_type} ${generic_vnf}
- #\ Run Keyword If '${service}' == 'vLB' VLB Closed Loop Hack ${service} ${generic_vnf} ${closedloop_vf_module}
\ Set Test Variable ${STACK_NAME} ${vf_module_name}
# TODO: Need to look at a better way to default ipv4_oam_interface search for Heatbridge
\ Execute Heatbridge ${vf_module_name} ${service_instance_id} ${vnf} ipv4_oam_interface
\ Validate VF Module ${vf_module_name} ${vnf}
\ Append To List ${vf_module_name_list} ${vf_module_name}
- [Return] ${vf_module_name_list} ${service} ${generic_vnfs}
+ [Return] ${vf_module_name_list} ${generic_vnfs} ${server_id}
Orchestrate Demo VNF
[Documentation] Use ONAP to Orchestrate a service from Demonstration Models.
- [Arguments] ${customer_name} ${service} ${product_family} ${tenant} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration
+ [Arguments] ${customer_name} ${service} ${product_family} ${tenant_id} ${tenant_name} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration
${service_model_type}= Set Variable If
... '${service}'=='vFWCL' demoVFWCL
... '${service}'=='vFW' demoVFW
@@ -105,21 +100,20 @@ Orchestrate Demo VNF
${lcp_region}= Get Openstack Region
${uuid}= Generate UUID4
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}
${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}
+ Create Customer For VNF ${CUSTOMER_NAME} ${CUSTOMER_NAME} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id}
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}
Set Test Variable ${SERVICE_INSTANCE_ID} ${service_instance_id}
Validate Service Instance ${service_instance_id} ${service} ${customer_name}
- 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}
${generic_vnfs}= Create Dictionary
:FOR ${vnf} IN @{vnflist}
\ ${vnf_name}= Catenate Ete_${vnf}_${uuid}
@@ -127,14 +121,13 @@ Orchestrate Demo 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}
+ \ Wait Until Keyword Succeeds 300s 5s Create VID VNF ${service_instance_id} ${vnf_name} ${product_family} ${lcp_region} ${tenant_name} ${vnf_type} ${CUSTOMER_NAME}
\ ${vf_module_entry}= Create Dictionary name=${vf_module}
\ ${vf_modules}= Create List ${vf_module_entry}
\ ${vf_module_type} ${closedloop_vf_module}= Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_modules} ${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}
+ \ ${vf_module_id}= Create VID VNF module ${service_instance_id} ${vf_module_name} ${lcp_region} ${tenant_name} ${vf_module_type} ${CUSTOMER_NAME} ${vnf_name}
\ ${generic_vnf}= Validate Generic VNF ${vnf_name} ${vnf_type} ${service_instance_id}
\ Set To Dictionary ${generic_vnfs} ${vf_module_type} ${generic_vnf}
- #\ Run Keyword If '${service}' == 'vLB' VLB Closed Loop Hack ${service} ${generic_vnf} ${closedloop_vf_module}
\ Set Test Variable ${STACK_NAME} ${vf_module_name}
# TODO: Need to look at a better way to default ipv4_oam_interface search for Heatbridge
\ Execute Heatbridge ${vf_module_name} ${service_instance_id} ${vnf} ipv4_oam_interface
@@ -172,35 +165,35 @@ Get Catalog Resource
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} ${service}
- Set Directory default ./demo/service_mapping
- ${list}= Get Service Template Mapping default ${service} ${vnf}
+ ServiceMapping.Set Directory default ./demo/service_mapping
+ ${list}= ServiceMapping.Get Service Template Mapping default ${service} ${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
- [Arguments] ${customer_name} ${customer_id} ${customer_type} ${service_type} ${cloud_owner}
+ [Arguments] ${customer_name} ${customer_id} ${customer_type} ${service_type} ${cloud_owner} ${tenant_id}
${cloud_region_id}= Get Openstack Region
Create Service If Not Exists ${service_type}
- ${resp}= Create Customer ${customer_name} ${customer_id} ${customer_type} ${service_type} ${cloud_owner} ${cloud_region_id} ${TENANT_ID}
+ ${resp}= Create Customer ${customer_name} ${customer_id} ${customer_type} ${service_type} ${cloud_owner} ${cloud_region_id} ${tenant_id}
Should Be Equal As Strings ${resp} 201
Setup Orchestrate VNF
[Documentation] Called before each test case to ensure tenant and region data
... required by the Orchstrate VNF exists in A&AI
[Arguments] ${cloud_owner} ${cloud_type} ${owner_defined_type} ${cloud_region_version} ${cloud_zone}
- Initialize Tenant From Openstack
- Initialize Regions From Openstack
- :FOR ${region} IN @{REGIONS}
- \ Inventory Tenant If Not Exists ${cloud_owner} ${region} ${cloud_type} ${owner_defined_type} ${cloud_region_version} ${cloud_zone} ${TENANT_ID} ${TENANT_NAME}
+ ${tenant_id} ${tenant_name}= Initialize Tenant From Openstack
+ Run Openstack Auth Request auth
+ ${regs}= Get Openstack Regions auth
+ :FOR ${region} IN @{regs}
+ \ Inventory Tenant If Not Exists ${cloud_owner} ${region} ${cloud_type} ${owner_defined_type} ${cloud_region_version} ${cloud_zone} ${tenant_id} ${tenant_name}
Inventory Zone If Not Exists
Inventory Complex If Not Exists ${GLOBAL_AAI_COMPLEX_NAME} ${GLOBAL_AAI_PHYSICAL_LOCATION_ID} ${GLOBAL_AAI_CLOUD_OWNER} ${GLOBAL_INJECTED_REGION} ${GLOBAL_AAI_CLOUD_OWNER_DEFINED_TYPE}
Log Orchestrate VNF setup complete
+ [Return] ${tenant_id} ${tenant_name}
Initialize Tenant From Openstack
[Documentation] Initialize the tenant test variables
@@ -208,14 +201,7 @@ Initialize Tenant From Openstack
${tenants}= Get Current Openstack Tenant auth
${tenant_name}= Evaluate $tenants.get("name")
${tenant_id}= Evaluate $tenants.get("id")
- Set Test Variable ${TENANT_NAME} ${tenant_name}
- Set Test Variable ${TENANT_ID} ${tenant_id}
-
-Initialize Regions From Openstack
- [Documentation] Initialize the regions test variable
- Run Openstack Auth Request auth
- ${regs}= Get Openstack Regions auth
- Set Test Variable ${REGIONS} ${regs}
+ [Return] ${tenant_id} ${tenant_name}
Create VVG Server
[Documentation] For the VolumeGroup test case, create a server to attach the volume group to be orchestrated.
@@ -225,11 +211,12 @@ Create VVG Server
${server}= Add Server For Image Name auth ${vvg_server_name} ${GLOBAL_INJECTED_VM_IMAGE_NAME} ${GLOBAL_INJECTED_VM_FLAVOR} ${GLOBAL_INJECTED_PUBLIC_NET_ID}
${server}= Get From Dictionary ${server} server
${server_id}= Get From Dictionary ${server} id
- Set Test Variable ${VVG_SERVER_ID} ${server_id}
Wait for Server to Be Active auth ${server_id}
+ [Return] ${server_id}
Delete VNF
[Documentation] Called at the end of a test case to tear down the VNF created by Orchestrate VNF
+ [Arguments] ${tenant_name} ${server_id}
${lcp_region}= Get Openstack Region
${list}= Create List
# remove duplicates, sort vFW-> vPKG , revers to get vPKG > vFWSNK
@@ -240,9 +227,8 @@ Delete VNF
:FOR ${stack} IN @{sorted_stack_names}
\ ${keypair_name}= Get Stack Keypairs ${stack}
\ Append To List ${list} ${keypair_name}
- Teardown VVG Server
- #Teardown VLB Closed Loop Hack
- Run Keyword and Ignore Error Teardown VID ${SERVICE_INSTANCE_ID} ${lcp_region} ${TENANT_NAME} ${CUSTOMER_NAME}
+ Teardown VVG Server ${server_id}
+ Run Keyword and Ignore Error Teardown VID ${SERVICE_INSTANCE_ID} ${lcp_region} ${tenant_name} ${CUSTOMER_NAME}
#
:FOR ${stack} IN @{sorted_stack_names}
\ Run Keyword and Ignore Error Teardown Stack ${stack}
@@ -262,9 +248,10 @@ Teardown VNF
Teardown VVG Server
[Documentation] Teardown the server created as a place to mount the Volume Group.
- Return From Keyword if '${VVG_SERVER_ID}' == ''
- Delete Server auth ${VVG_SERVER_ID}
- Wait for Server To Be Deleted auth ${VVG_SERVER_ID}
+ [Arguments] ${server_id}
+ Return From Keyword if '${server_id}' == ''
+ Delete Server auth ${server_id}
+ Wait for Server To Be Deleted auth ${server_id}
Log Teardown VVG Server Completed
Get Stack Keypairs
diff --git a/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot b/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot
index 3040f02e..34a1be8f 100644
--- a/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot
@@ -40,29 +40,23 @@ ${so_uri_path} /onap/so/infra/serviceInstantiation/v7/serviceInstances
*** Variables ***
#**************** TEST CASE VARIABLES **************************
-${TENANT_NAME}
-${TENANT_ID}
-${REGIONS}
${CUSTOMER_NAME}
${STACK_NAME}
${STACK_NAMES}
-${SERVICE}
-${VVG_SERVER_ID}
${SERVICE_INSTANCE_ID}
*** Keywords ***
Orchestrate VNF With CDS Template
[Documentation] Use openECOMP to Orchestrate a service.
- [Arguments] ${customer_name} ${service} ${product_family} ${tenant}
- Orchestrate VNF With CDS ${customer_name} ${service} ${product_family} ${tenant}
+ [Arguments] ${customer_name} ${service} ${product_family}
+ Orchestrate VNF With CDS ${customer_name} ${service} ${product_family}
Orchestrate VNF With CDS
[Documentation] Use openECOMP to Orchestrate a service.
- [Arguments] ${customer_name} ${service} ${product_family} ${tenant} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration
+ [Arguments] ${customer_name} ${service} ${product_family} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration
${lcp_region}= Get Openstack Region
${uuid}= Generate UUID4
Set Test Variable ${CUSTOMER_NAME} ${customer_name}_${uuid}
- Set Test Variable ${SERVICE} ${service}
${list}= Create List
Set Test Variable ${STACK_NAMES} ${list}
${service_instance_name}= Catenate Service_Ete_Name${uuid}
diff --git a/robot/testsuites/cds.robot b/robot/testsuites/cds.robot
index 1cf7cbfd..640edb41 100644
--- a/robot/testsuites/cds.robot
+++ b/robot/testsuites/cds.robot
@@ -6,7 +6,7 @@ Resource ../resources/test_templates/vnf_orchestration_with_cds_test_tem
Test Template Orchestrate VNF With CDS Template
-*** Test Cases *** CUSTOMER SERVICE PRODUCT_FAMILY TENANT
-Instantiate Virtual vFW With CDS ETE_Customer vFW vFW ${TENANT_NAME}
+*** Test Cases *** CUSTOMER SERVICE PRODUCT_FAMILY
+Instantiate Virtual vFW With CDS ETE_Customer vFW vFW
[Tags] cds
diff --git a/robot/testsuites/demo.robot b/robot/testsuites/demo.robot
index 4dd8f68c..5f037723 100644
--- a/robot/testsuites/demo.robot
+++ b/robot/testsuites/demo.robot
@@ -15,7 +15,9 @@ ${HB_STACK}
${HB_SERVICE_INSTANCE_ID}
${HB_SERVICE}
${HB_IPV4_OAM_ADDRESS}
-
+${TENANT_NAME}
+${VVG_SERVER_ID}
+${SERVICE}
*** Test Cases ***
Initialize Customer And Models
@@ -37,7 +39,7 @@ Initialize Models
Preload VNF
[Tags] PreloadDemo
- Preload User Model ${VNF_NAME} ${MODULE_NAME}
+ Preload User Model ${VNF_NAME} ${MODULE_NAME} ${SERVICE}
Create APPC Mount Point
[Tags] APPCMountPointDemo
@@ -66,7 +68,7 @@ Delete Instantiated VNF
[Tags] deleteVNF
Setup Browser
Login To VID GUI
- Delete VNF
+ Delete VNF ${TENANT_NAME} ${VVG_SERVER_ID}
[Teardown] Teardown VNF
Run Heatbridge
diff --git a/robot/testsuites/vnf-orchestration.robot b/robot/testsuites/vnf-orchestration.robot
index d0810d74..5e254b85 100644
--- a/robot/testsuites/vnf-orchestration.robot
+++ b/robot/testsuites/vnf-orchestration.robot
@@ -4,22 +4,20 @@ Documentation Executes the VNF Orchestration Test cases including setup and te
Resource ../resources/test_templates/vnf_orchestration_test_template.robot
-Test Setup Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
Test Template Orchestrate VNF Template
-Test Teardown Teardown VNF
-*** Test Cases *** CUSTOMER SERVICE PRODUCT_FAMILY TENANT
-Instantiate Virtual DNS ETE_Customer vLB vLB ${TENANT_NAME}
+*** Test Cases *** CUSTOMER SERVICE PRODUCT_FAMILY
+Instantiate Virtual DNS ETE_Customer vLB vLB
[Tags] instantiate stability72hr
-Instantiate Virtual Volume Group ETE_Customer vVG vVG ${TENANT_NAME}
+Instantiate Virtual Volume Group ETE_Customer vVG vVG
[Tags] instantiate stability72hr
-Instantiate Virtual FirewallCL ETE_Customer vFWCL vFWCL ${TENANT_NAME}
+Instantiate Virtual FirewallCL ETE_Customer vFWCL vFWCL
[Tags] instantiate stability72hr
-Instantiate Virtual DNS No Delete ETE_Customer vLB vLB ${TENANT_NAME} KEEP
+Instantiate Virtual DNS No Delete ETE_Customer vLB vLB KEEP
[Tags] instantiateNoDelete
-Instantiate Virtual FirewallCL No Delete ETE_Customer vFWCL vFWCL ${TENANT_NAME} KEEP
+Instantiate Virtual FirewallCL No Delete ETE_Customer vFWCL vFWCL KEEP
[Tags] instantiateNoDelete
-Instantiate Virtual Firewall ETE_Customer vFW vFW ${TENANT_NAME}
+Instantiate Virtual Firewall ETE_Customer vFW vFW