summaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-07-31 16:28:55 -0400
committerDR695H <dr695h@att.com>2019-07-31 17:05:18 -0400
commit1496bf5bd69f534b8f58c61c3f6babff6171e76d (patch)
treeeb12f640b95b41a5bf7089510baa5ab5bb7b2f69 /robot
parent70861af6430f2bf04917e2e08925f85774668417 (diff)
cleaning up heatbridge1.5.0
Issue-ID: TEST-183 Change-Id: I07094b46868fd784f43d6ebfbbdd7ef1746b77b5 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/demo_preload.robot2
-rw-r--r--robot/resources/heatbridge.robot19
-rw-r--r--robot/resources/sdngc_interface.robot2
-rw-r--r--robot/resources/test_templates/vnf_orchestration_test_template.robot4
-rw-r--r--robot/testsuites/demo.robot3
5 files changed, 13 insertions, 17 deletions
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index 209be499..bf994f14 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -175,7 +175,7 @@ Instantiate VNF
[Arguments] ${service} ${vf_module_label}=NULL
${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
${uuid}= Generate UUID4
- ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id} ${catalog_resource_ids} ${catalog_service_id}= Orchestrate VNF DemoCust_${uuid} ${service} ${service} ${tenant_id} ${tenant_name}
+ ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id} ${catalog_resource_ids} ${catalog_service_id} ${uris_to_delete}= Orchestrate VNF DemoCust_${uuid} ${service} ${service} ${tenant_id} ${tenant_name}
${stack_name} = Get From List ${vf_module_name_list} -1
Save For Delete ${tenant_id} ${tenant_name} ${server_id} DemoCust_${uuid} ${service_instance_id} ${stack_name} ${catalog_service_id} ${catalog_resource_ids}
:FOR ${vf_module_name} IN @{vf_module_name_list}
diff --git a/robot/resources/heatbridge.robot b/robot/resources/heatbridge.robot
index a21b9168..1198529e 100644
--- a/robot/resources/heatbridge.robot
+++ b/robot/resources/heatbridge.robot
@@ -24,14 +24,13 @@ ${IMAGE_URI} ${BASE_URI}/images/image/\${image_id}
${FLAVOR_URI} ${BASE_URI}/flavors/flavor/\${flavor}
${VSERVER_URI} ${BASE_URI}/tenants/tenant/\${tenant}/vservers/vserver/\${vserver_id}
${L_INTERFACE_URI} ${VSERVER_URI}/l-interfaces/l-interface/\${linterface_id}
-${VSERVER_NAME} \${vserver_name}
*** Keywords ***
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} ${ipv4_oam_address}
+ [Arguments] ${stack_name} ${vnf} ${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}
@@ -60,7 +59,7 @@ Execute Heatbridge
${status_string}= Convert To String ${resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
${reverse_heatbridge}= Generate Reverse Heatbridge From Stack Info ${stack_info}
- Run Validation Query ${stack_info} ${service} ${vnf_id}
+ Run Validation Query ${stack_info} ${service} ${vnf}
[Return] ${reverse_heatbridge}
Run Create VNFC
@@ -70,19 +69,17 @@ Run Create VNFC
Return From Keyword If '${resp.status_code}' != '200'
${info}= Set Variable ${resp.json()}
${keys}= Create Dictionary
- ${vnfc_name}= Catenate \ ${info['server']['name']}
+ ${vnfc_name}= Catenate ${info['server']['name']}
${vnfc_nc}= Set Variable ${service}
${vnfc_func}= Set Variable ${service}
Create VNFC If Not Exists ${vnfc_name} ${vnfc_nc} ${vnfc_func}
Run Validation Query
[Documentation] Run A&AI query to validate the bulk add
- [Arguments] ${stack_info} ${service} ${vnf_id}
+ [Arguments] ${stack_info} ${service} ${vnf}
Return from Keyword If '${service}' == ''
ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
- ${payload}= Run Get Generic VNF by VnfId ${vnf_id}
- ${vnf_type}= Catenate ${payload.json()[vnf-type]}
- ${server_name_parameter}= ServiceMapping.Get Validate Name Mapping default ${service} ${vnf_type}
+ ${server_name_parameter}= ServiceMapping.Get Validate Name Mapping default ${service} ${vnf}
${vserver_name}= Get From Dictionary ${stack_info} ${server_name_parameter}
Run Vserver Query ${vserver_name}
@@ -95,14 +92,12 @@ Run Vserver Query
${resp}= AAI.Run Post Request ${AAI_FRONTEND_ENDPOINT} ${NAMED_QUERY_PATH} ${request} auth=${GLOBAL_AAI_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 200
-
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}=ACTIVE ${orch_status}=Active
${payload}= Run Get Generic VNF by VnfId ${vnf_id}
- ${vnf_type}= Catenate ${payload.json()[vnf-type]}
- #${payload_json}= evaluate json.loads('''${payload}''') json
- set to dictionary ${payload} vnf-type ${prov_status}
+ ${vnf_type}= Catenate ${payload['vnf-type']}
+ 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
diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot
index 828752c5..779611e3 100644
--- a/robot/resources/sdngc_interface.robot
+++ b/robot/resources/sdngc_interface.robot
@@ -92,7 +92,7 @@ Preload Vnf
${base_vf_module_type}= Catenate
${closedloop_vf_module}= Create Dictionary
ServiceMapping.Set Directory default ${GLOBAL_SERVICE_MAPPING_DIRECTORY}
- ${templates}= ServiceMapping.Get Service Template Mapping default ${service} ${generic_vnf_type}
+ ${templates}= ServiceMapping.Get Service Template Mapping default ${service} ${vnf}
:FOR ${vf_module} IN @{vf_modules}
\ ${vf_module_type}= Get From Dictionary ${vf_module} name
# need to pass in vnf_index if non-zero
diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot
index 8842b408..016fed20 100644
--- a/robot/resources/test_templates/vnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot
@@ -71,7 +71,7 @@ Orchestrate VNF
\ ${generic_vnf}= Validate Generic VNF ${vnf_name} ${vnf_type} ${service_instance_id}
\ Set To Dictionary ${generic_vnfs} ${vf_module_type} ${generic_vnf}
# TODO: Need to look at a better way to default ipv4_oam_interface search for Heatbridge
- \ ${uris_to_delete}= Execute Heatbridge ${vf_module_name} ${vnf} ipv4_oam_interface
+ \ ${uris_to_delete}= Execute Heatbridge ${vf_module_name} ${vnf} ${service} 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} ${generic_vnfs} ${server_id} ${service_instance_id} ${catalog_resource_ids} ${catalog_service_id} ${uris_to_delete}
@@ -113,7 +113,7 @@ Orchestrate Demo VNF
\ ${generic_vnf}= Validate Generic VNF ${vnf_name} ${vnf_type} ${service_instance_id}
\ Set To Dictionary ${generic_vnfs} ${vf_module_type} ${generic_vnf}
# TODO: Need to look at a better way to default ipv4_oam_interface search for Heatbridge
- \ Execute Heatbridge ${vf_module_name} ${vnf} ipv4_oam_interface
+ \ Execute Heatbridge ${vf_module_name} ${vnf} ${service} ipv4_oam_interface
\ Validate VF Module ${vf_module_name} ${vnf}
\ Append To List ${vf_module_name_list} ${vf_module_name}
[Return] ${vf_module_name} ${service} ${generic_vnfs}
diff --git a/robot/testsuites/demo.robot b/robot/testsuites/demo.robot
index b60921d3..6003434b 100644
--- a/robot/testsuites/demo.robot
+++ b/robot/testsuites/demo.robot
@@ -22,6 +22,7 @@ ${STACK_NAMES}
${CATALOG_SERVICE_ID}
${CATALOG_RESOURCE_IDS}
${REVERSE_HEATBRIDGE}
+${HB_VNF}
*** Test Cases ***
Initialize Customer And Models
@@ -81,7 +82,7 @@ Run Heatbridge
[Documentation]
... Try to run heatbridge
[Tags] heatbridge
- Execute Heatbridge ${HB_STACK} ${HB_SERVICE} ${HB_IPV4_OAM_ADDRESS}
+ Execute Heatbridge ${HB_STACK} ${HB_VNF} ${HB_SERVICE} ${HB_IPV4_OAM_ADDRESS}
Preload APPC CDT GUI
[Documentation]