summaryrefslogtreecommitdiffstats
path: root/robot/resources/vid/teardown_vid.robot
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-07-22 12:37:45 -0400
committerDR695H <dr695h@att.com>2019-07-22 17:17:28 -0400
commitc1103fba68e3461b136b044daec3339d0e6575f7 (patch)
treeaeef2cbf58858d236d8dfa4b17c463fab83b5b6a /robot/resources/vid/teardown_vid.robot
parentd979465ec6720dffbebd22bd83104ea5a5f4e65e (diff)
remove the last of the global variables
Issue-ID: TEST-174 Change-Id: I1997bd0e4b693f3560f2cfc254c93537c96ed444 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/vid/teardown_vid.robot')
-rw-r--r--robot/resources/vid/teardown_vid.robot29
1 files changed, 13 insertions, 16 deletions
diff --git a/robot/resources/vid/teardown_vid.robot b/robot/resources/vid/teardown_vid.robot
index d6880289..f1b6daa8 100644
--- a/robot/resources/vid/teardown_vid.robot
+++ b/robot/resources/vid/teardown_vid.robot
@@ -11,35 +11,33 @@ Resource ../heatbridge.robot
*** Variables ***
${VID_ENV} /vid
${VID_SERVICE_MODELS_SEARCH_URL} ${GLOBAL_VID_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VID_IP_ADDR}:${GLOBAL_VID_SERVER_PORT}${VID_ENV}/serviceModels.htm#/instances/services
-${TEARDOWN_STATUS} FAIL
*** Keywords ***
-
Teardown VID
[Documentation] Teardown the VID This assumes that the any runnign stacks have been torn down
- [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${customer}
+ [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${customer} ${uris_to_delete}
Return From Keyword If len('${service_instance_id}') == 0
# Keep going to the VID service instance until we get the pop-up alert that there is no service instance
- Set Test Variable ${TEARDOWN_STATUS} FAIL
- Wait Until Keyword Succeeds 300s 1s Delete VID ${service_instance_id} ${lcp_region} ${tenant} ${customer}
- Return From Keyword If '${TEARDOWN_STATUS}' == 'PASS'
- Fail ${TEARDOWN_STATUS}
+ ${status} Catenate FAIL
+ ${status} ${vfmodule}= Wait Until Keyword Succeeds 300s 1s Delete VID ${service_instance_id} ${lcp_region} ${tenant} ${customer} ${uris_to_delete}
+ Return From Keyword If '${status}' == 'PASS'
+ Fail ${status}
Delete VID
[Documentation] Teardown the next VID entity that has a Remove icon.
- [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${customer}
+ [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${customer} ${uris_to_delete}
# For vLB closed loop, we may have 2 vf modules and the vDNS one needs to be removed first.
${remove_order}= Create List vDNS_Ete vPKG Vfmodule_Ete
# FAIL status is returned in ${vfmodule} because FAIL are ignored during teardown
${status} ${vfmodule}= Run Keyword and Ignore Error Delete Next VID Entity ${service_instance_id} ${lcp_region} ${tenant} ${remove_order} ${customer}
- Return From Keyword If '${status}' == 'FAIL'
- Return From Keyword If '${vfmodule}' == 'FAIL'
+ Return From Keyword If '${status}' == 'FAIL' ${status} ${vfmodule}
+ Return From Keyword If '${vfmodule}' == 'FAIL' ${status} ${vfmodule}
# After tearing down a VF module, execute the reverse HB for it to remove the references from A&AI
- Run Keyword If 'Vfmodule_Ete' in '${vfmodule}' Execute Reverse Heatbridge
+ Run Keyword If 'Vfmodule_Ete' in '${vfmodule}' Execute Reverse Heatbridge ${uris_to_delete}
Fail Continue with Next Remove
-
+
Delete Next VID Entity
[Documentation] Teardown the next VID entity that has a Remove icon.
[Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${remove_order} ${customer}
@@ -55,13 +53,12 @@ Delete Next VID Entity
# When Handle VID Alert detects a pop-up. it will return FAIL and we are done
# Return from Keyword is required because FAIL is inored during teardown
- Set Test Variable ${TEARDOWN_STATUS} PASS
+ ${teardown_status}= Catenate PASS
${status} ${value} Run Keyword And Ignore Error Handle VID Alert
Return From Keyword If '${status}' == 'FAIL' ${status}
${status} ${value} Run Keyword And Ignore Error Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Return From Keyword If '${status}' == 'FAIL' ${status}
- Set Test Variable ${TEARDOWN_STATUS} FAIL
-
+ ${teardown_status}= Catenate FAIL
Click Element link=View/Edit
Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
@@ -85,7 +82,7 @@ Delete Next VID Entity
${request_id}= Parse Request Id ${response text}
Click Element xpath=//div[@class='ng-scope']/div[@class = 'buttonRow']/button[text() = 'Close']
Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
- [Return] ${vfmodule}
+ [Return] ${teardown_status} ${vfmodule}
Handle VID Alert
[Documentation] When service instance has been deleted, an alert will be triggered on the search to end the loop