cleaning up heatbridge 13/92413/2 1.5.0
authorDR695H <dr695h@att.com>
Wed, 31 Jul 2019 20:28:55 +0000 (16:28 -0400)
committerDR695H <dr695h@att.com>
Wed, 31 Jul 2019 21:05:18 +0000 (17:05 -0400)
Issue-ID: TEST-183
Change-Id: I07094b46868fd784f43d6ebfbbdd7ef1746b77b5
Signed-off-by: DR695H <dr695h@att.com>
robot/resources/demo_preload.robot
robot/resources/heatbridge.robot
robot/resources/sdngc_interface.robot
robot/resources/test_templates/vnf_orchestration_test_template.robot
robot/testsuites/demo.robot

index 209be49..bf994f1 100644 (file)
@@ -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}
index a21b916..1198529 100644 (file)
@@ -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
index 828752c..779611e 100644 (file)
@@ -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
index 8842b40..016fed2 100644 (file)
@@ -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}
index b60921d..6003434 100644 (file)
@@ -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]