summaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2019-09-30 14:20:02 -0500
committerDaniel Rose <dr695h@att.com>2019-10-07 14:35:29 +0000
commit7a8e3a8c62be623ef92007708dda6496bc15a0fb (patch)
treee5253be6964f1706b4013dab1665038caac61811 /robot/resources
parent66d6c330401f8ca6edf3457526f308c666195026 (diff)
Add repush policy
Add Undeploy before push Fix RESOURCE_ID in old template Issue-ID: INT-1272 Change-Id: If04e692f7927a1170b2d686a4f9e7b39a400973b Signed-off-by: Brian Freeman <bf1936@att.com> (cherry picked from commit e6c3d284755488212e993835e4fcb5d4230a2bdb)
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/policy_interface.robot11
1 files changed, 11 insertions, 0 deletions
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index 96867648..d3759193 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -116,6 +116,17 @@ Run Policy Pap Post Request
Log Received response from policy ${resp.text}
[Return] ${resp}
+Undeploy Policy
+ [Documentation] Runs Policy PAP Undeploy a Policy from PDP Groups
+ [Arguments] ${policy_name}
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Delete Request policy /policy/pap/v1/pdps/policies/${policy_name} headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
Run Policy Delete Request
[Documentation] Runs Policy Delete request