diff options
-rw-r--r-- | robot/assets/templates/policy/vFirewall_policy_operational_content.yaml | 4 | ||||
-rw-r--r-- | robot/resources/policy_interface.robot | 11 | ||||
-rw-r--r-- | robot/testsuites/closed-loop.robot | 5 |
3 files changed, 18 insertions, 2 deletions
diff --git a/robot/assets/templates/policy/vFirewall_policy_operational_content.yaml b/robot/assets/templates/policy/vFirewall_policy_operational_content.yaml index 6c326718..121c8b6e 100644 --- a/robot/assets/templates/policy/vFirewall_policy_operational_content.yaml +++ b/robot/assets/templates/policy/vFirewall_policy_operational_content.yaml @@ -1,6 +1,6 @@ controlLoop: version: 2.0.0 - controlLoopName: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a + controlLoopName: ControlLoop-vFirewall-__RESOURCE_ID__ trigger_policy: unique-policy-id-1-modifyConfig timeout: 1200 abatement: false @@ -22,4 +22,4 @@ policies: failure_timeout: final_failure_timeout failure_retries: final_failure_retries failure_exception: final_failure_exception - failure_guard: final_failure_guard
\ No newline at end of file + failure_guard: final_failure_guard 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 diff --git a/robot/testsuites/closed-loop.robot b/robot/testsuites/closed-loop.robot index bd26a623..c4ee203c 100644 --- a/robot/testsuites/closed-loop.robot +++ b/robot/testsuites/closed-loop.robot @@ -22,3 +22,8 @@ VFWCL Closed Loop Test VFWCL Low Test ${PACKET_GENERATOR_HOST} [Teardown] VFWCL Set To Medium ${PACKET_GENERATOR_HOST} +VFWCL Repush Operation Policy + [TAGS] repushpolicy + Undeploy Policy operational.modifyconfig + Update vVFWCL Policy ${MODEL_INVARIANT_ID} + |