summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--robot/assets/service_mappings.py5
-rw-r--r--robot/assets/templates/aai/add_complex_body.template6
-rw-r--r--robot/resources/heatbridge.robot24
3 files changed, 31 insertions, 4 deletions
diff --git a/robot/assets/service_mappings.py b/robot/assets/service_mappings.py
index 52f1ca1e..2cdc0d59 100644
--- a/robot/assets/service_mappings.py
+++ b/robot/assets/service_mappings.py
@@ -42,6 +42,11 @@ GLOBAL_VALIDATE_NAME_MAPPING = {"vFW" : 'vfw_name_0',
"vLB" : 'vlb_name_0',
"vVG" : '',
"vCPE" : 'vgw_name_0',
+ "vCPEvGW" : 'vgw_name_0',
+ "vCPEvDNS" : 'vdns_name_0',
+ "vCPEvAAA" : 'vaaa_name_0',
+ "vCPEvWEB" : 'vweb_name_0',
+ "vCPEvDHCP" : 'vdhcp_name_0',
"vFWSNK" : 'vfw_name_0',
"vPKG" : 'vpg_name_0',
}
diff --git a/robot/assets/templates/aai/add_complex_body.template b/robot/assets/templates/aai/add_complex_body.template
index 136a620b..8ef8927d 100644
--- a/robot/assets/templates/aai/add_complex_body.template
+++ b/robot/assets/templates/aai/add_complex_body.template
@@ -8,12 +8,12 @@
"street2": "example-street2-val-99210",
"city": "example-city-val-27150",
"state": "example-state-val-59487",
- "postal-code": "example-postal-code-val-68871",
+ "postal-code": "68871",
"country": "example-country-val-94173",
"region": "example-region-val-13893",
"latitude": "example-latitude-val-89101",
- "longitude": "example-longitude-val-66229",
- "elevation": "example-elevation-val-30253",
+ "longitude": "32.89948",
+ "elevation": "97.045443",
"lata": "example-lata-val-46073",
"relationship-list": {
"relationship": [
diff --git a/robot/resources/heatbridge.robot b/robot/resources/heatbridge.robot
index 515ae391..b881da8f 100644
--- a/robot/resources/heatbridge.robot
+++ b/robot/resources/heatbridge.robot
@@ -38,6 +38,7 @@ Execute Heatbridge
${stack_id}= Get From Dictionary ${stack_info} id
${tenant_id}= Get From Dictionary ${stack_info} OS::project_id
${vnf_id}= Get From Dictionary ${stack_info} vnf_id
+ Run Set VNF ProvStatus ${vnf_id} PROV
${url} ${path}= Get Keystone Url And Path
${openstack_identity_url}= Catenate ${url}${path}
${region}= Get Openstack Region
@@ -45,7 +46,7 @@ Execute Heatbridge
Init Bridge ${openstack_identity_url} ${user} ${pass} ${tenant_id} ${region} ${GLOBAL_AAI_CLOUD_OWNER}
${request}= Bridge Data ${stack_id}
Log ${request}
- ${resp}= Run A&AI Put Request ${VERSIONED_INDEX_PATH}${MULTIPART_PATH} ${request}
+ ${resp}= Run A&AI Put Request ${VERSIONED_INDEX_PATH}${MULTIPART_PATH} ${request}
${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}
@@ -71,6 +72,27 @@ Run Vserver Query
Should Be Equal As Strings ${resp.status_code} 200
+Run Set VNF ProvStatus
+ [Documentation] Run A&A GET and PUT to set prov-status
+ [Arguments] ${vnf_id} ${prov_status}=PROV
+ ${payload}= Run Get Generic VNF by VnfId ${vnf_id}
+
+ #${payload_json}= evaluate json.loads('''${payload}''') json
+ set to dictionary ${payload} prov-status ${prov_status}
+ ${payload_string}= evaluate json.dumps(${payload}) json
+
+ ${put_resp}= Run A&AI Put Request ${VERSIONED_INDEX_PATH}/network/generic-vnfs/generic-vnf/${vnf_id} ${payload_string}
+ ${status_string}= Convert To String ${put_resp.status_code}
+ Should Match Regexp ${status_string} ^(200|201)$
+ Log To Console Set VNF ProvStatus: ${vnf_id} to ${prov_status}
+
+Run Get Generic VNF By VnfId
+ [Documentation] Get VNF GET Payload with resource ID
+ [Arguments] ${vnf_id}
+ ${resp}= Run A&AI Get Request ${VERSIONED_INDEX_PATH}/network/generic-vnfs/generic-vnf?vnf-id=${vnf_id}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()}
+
Execute Reverse Heatbridge
[Documentation] VID has already torn down the stack, reverse HB
Return From Keyword If len(${REVERSE_HEATBRIDGE}) == 0