diff options
author | Brian Freeman <bf1936@att.com> | 2018-05-22 13:13:05 -0500 |
---|---|---|
committer | Brian Freeman <bf1936@att.com> | 2018-05-22 13:31:14 -0500 |
commit | 108048b0fad139324ae651548aacf967e7fe627f (patch) | |
tree | bfe4b626bd2aa833fb7b0e34488af2cea5d36f30 /robot | |
parent | abf7ac2cf14563b502352e0f5d4ad4cfc878c614 (diff) |
Set PROV with Heatbridge
Issue-ID: TEST-94
Change-Id: I9b29fae3b8b95131f68df7deea5131e431d70629
Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'robot')
-rw-r--r-- | robot/assets/service_mappings.py | 5 | ||||
-rw-r--r-- | robot/resources/heatbridge.robot | 24 |
2 files changed, 28 insertions, 1 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/resources/heatbridge.robot b/robot/resources/heatbridge.robot index 515ae391..d77e9fb3 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 ${AAI_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 |