aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/aai
diff options
context:
space:
mode:
authorjf9860 <jf9860@att.com>2017-03-04 13:14:09 -0500
committerjf9860 <jf9860@att.com>2017-03-04 13:14:21 -0500
commitde6a6e25c250cda0b41ed7c22483705b83acc980 (patch)
treed5b99431b437dd7fb2783d5f62e855c6fd83e0df /robot/resources/aai
parent5bf0e2da57adb05dc4b62dfc71acb4bee9ecd7ad (diff)
Complete vDNS closed loop teardown
Change-Id: I0c680349bb120f274465de08f1a02e5deb2e0c5d Signed-off-by: jf9860 <jf9860@att.com>
Diffstat (limited to 'robot/resources/aai')
-rw-r--r--robot/resources/aai/service_instance.robot22
1 files changed, 21 insertions, 1 deletions
diff --git a/robot/resources/aai/service_instance.robot b/robot/resources/aai/service_instance.robot
index 5fffa02f..adf59c2a 100644
--- a/robot/resources/aai/service_instance.robot
+++ b/robot/resources/aai/service_instance.robot
@@ -26,8 +26,10 @@ ${SERVICE INSTANCE} /service-instances?service-instance-id=
${SERVCE INSTANCE TEMPLATE} robot/assets/templates/aai/service_subscription.template
${GENERIC_VNF_PATH_TEMPLATE} /network/generic-vnfs/generic-vnf/\${vnf_id}/vf-modules/vf-module/\${vf_module_id}
+${GENERIC_VNF_QUERY_TEMPLATE} /network/generic-vnfs/generic-vnf/\${vnf_id}/vf-modules/vf-module?vf-module-name=\${vf_module_name}
${VLB_CLOSED_LOOP_HACK_BODY} robot/assets/templates/aai/vlb_closed_loop_hack.template
${VLB_CLOSED_LOOP_DELETE}
+${VLB_CLOSED_LOOP_VNF_ID}
*** Keywords ***
Validate Service Instance
@@ -57,13 +59,31 @@ VLB Closed Loop Hack
${vfmodule}= Get From List ${list} 0
${persona_model_id}= Get From Dictionary ${closedloop_vf_module} invariantUUID
${persona_model_version}= Get From Dictionary ${closedloop_vf_module} version
- ${dict}= Create Dictionary vnf_id=${vnf_id} vf_module_id=dummy persona_model_id=${persona_model_id} persona_model_version=${persona_model_version}
+ ${dummy}= Catenate dummy_${vnf_id}
+ ${dict}= Create Dictionary vnf_id=${vnf_id} vf_module_id=${dummy} persona_model_id=${persona_model_id} persona_model_version=${persona_model_version}
${datapath}= Template String ${GENERIC_VNF_PATH_TEMPLATE} ${dict}
${data}= Fill JSON Template File ${VLB_CLOSED_LOOP_HACK_BODY} ${dict}
${put_resp}= Run A&AI Put Request ${INDEX PATH}${datapath} ${data}
${status_string}= Convert To String ${put_resp.status_code}
Should Match Regexp ${status_string} ^(201|412)$
Set Test Variable ${VLB_CLOSED_LOOP_DELETE} ${datapath}
+ Set Test Variable ${VLB_CLOSED_LOOP_VNF_ID} ${vnf_id}
+
+
+VLB Closed Loop Hack Update
+ [Documentation] Update the A&AI vDNS scaling vf module to have persona-model-version 1 rather than 1.0
+ [Arguments] ${stack_name}
+ ${dict}= Create Dictionary vnf_id=${VLB_CLOSED_LOOP_VNF_ID} vf_module_name=${stack_name}
+ ${query}= Template String ${GENERIC_VNF_QUERY_TEMPLATE} ${dict}
+ ${get_resp}= Run A&AI Get Request ${INDEX_PATH}${query}
+ ${json}= Set Variable ${get_resp.json()}
+ Set to Dictionary ${json} persona-model-version 1
+ ${vf_module_id}= Get From Dictionary ${json} vf-module-id
+ Set to Dictionary ${dict} vf_module_id=${vf_module_id}
+ ${uri}= Template String ${GENERIC_VNF_PATH_TEMPLATE} ${dict}
+ ${resp}= Run A&AI Put Request ${INDEX_PATH}${uri} ${json}
+ ${get_resp}= Run A&AI Get Request ${INDEX_PATH}${query}
+
Teardown VLB Closed Loop Hack
Return From Keyword If ' ${VLB_CLOSED_LOOP_DELETE}' == ''