Updates for vFWCL Setup
Issue-ID: TEST-110
Change-Id: If230afd903c51a01dad5a6204dca1a1eee1f8adc
Signed-off-by: Brian Freeman <bf1936@att.com>
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index 8bc9c3b..49590c0 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -12,6 +12,7 @@
${POLICY_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_POLICY_SERVER_PORT}
${POLICY_HEALTHCHECK_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
${POLICY_TEMPLATES} robot/assets/templates/policy
+${DROOLS_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_DROOLS_SERVER_PORT}
*** Keywords ***
@@ -30,6 +31,18 @@
\ Should Be Equal As Strings ${ELEMENT['code']} 200
\ Should Be True ${ELEMENT['healthy']}
+Run Drools Get Request
+ [Documentation] Runs Drools Get Request
+ [Arguments] ${data_path}
+ ${auth}= Create List ${GLOBAL_DROOLS_USERNAME} ${GLOBAL_DROOLS_PASSWORD}
+ Log Creating session ${POLICY_ENDPOINT}
+ ${session}= Create Session policy ${DROOLS_ENDPOINT} auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy ${data_path} headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp}
+
Run Policy Put Request
[Documentation] Runs Policy Put request
[Arguments] ${data_path} ${data}
@@ -66,12 +79,16 @@
[Arguments] ${resource_id}
Run Keyword and Ignore Error Delete vFWCL Policy
Sleep 20s
+ Log To Console Create vFWCL Policy
Create vFWCL Policy ${resource_id}
Sleep 5s
+ Log To Console Push vFWCL Policy
Push vFWCL Policy
Sleep 20s
+ Log To Console Reboot Drools
Reboot Drools
Sleep 20s
+ Log To Console Validate vFWCL Policy
Validate the vFWCL Policy
Delete vFWCL Policy