aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/policy_interface.robot
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2017-06-30 13:09:57 -0400
committerDR695H <dr695h@att.com>2017-06-30 13:17:56 -0400
commitbf5a3a3745c9669dd6eeea3d2ef5b3bbaa3e9f74 (patch)
treeac51047b1768056c71e7f67ec22cbb8d391cb741 /robot/resources/policy_interface.robot
parente2a48d77875821fc4786b33f8a96d41c79d71224 (diff)
[TEST-45] support injectable ips
today onap ips are hard coded so we should support having them injectable from external sources Change-Id: Id7911df331207a9198e9bf43168b9a6843db6f48 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/policy_interface.robot')
-rw-r--r--robot/resources/policy_interface.robot18
1 files changed, 10 insertions, 8 deletions
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index 3bd51f5a..a622ae6c 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -9,14 +9,16 @@ Resource global_properties.robot
*** Variables ***
${POLICY_HEALTH_CHECK_PATH} /healthcheck
+${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}
*** Keywords ***
Run Policy Health Check
[Documentation] Runs Policy Health check
${auth}= Create List ${GLOBAL_POLICY_USERNAME} ${GLOBAL_POLICY_PASSWORD}
- Log Creating session ${GLOBAL_POLICY_SERVER_URL}
- ${session}= Create Session policy ${GLOBAL_POLICY_HEALTHCHECK_URL} auth=${auth}
+ Log Creating session ${POLICY_ENDPOINT}
+ ${session}= Create Session policy ${POLICY_HEALTHCHECK_ENDPOINT} auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
${resp}= Get Request policy ${POLICY_HEALTH_CHECK_PATH} headers=${headers}
Log Received response from policy ${resp.text}
@@ -30,8 +32,8 @@ Run Policy Health Check
Run Policy Put Request
[Documentation] Runs Policy Put request
[Arguments] ${data_path} ${data}
- Log Creating session ${GLOBAL_POLICY_SERVER_URL}
- ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_URL}
+ Log Creating session ${POLICY_ENDPOINT}
+ ${session}= Create Session policy ${POLICY_ENDPOINT}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
${resp}= Put Request policy ${data_path} data=${data} headers=${headers}
Log Received response from policy ${resp.text}
@@ -40,8 +42,8 @@ Run Policy Put Request
Run Policy Delete Request
[Documentation] Runs Policy Delete request
[Arguments] ${data_path} ${data}
- Log Creating session ${GLOBAL_POLICY_SERVER_URL}
- ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_URL}
+ Log Creating session ${POLICY_ENDPOINT}
+ ${session}= Create Session policy ${POLICY_ENDPOINT}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
${resp}= Delete Request policy ${data_path} data=${data} headers=${headers}
Log Received response from policy ${resp.text}
@@ -50,8 +52,8 @@ Run Policy Delete Request
Run Policy Get Configs Request
[Documentation] Runs Policy Get Configs request
[Arguments] ${data_path} ${data}
- Log Creating session ${GLOBAL_POLICY_SERVER_URL}
- ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_URL}
+ Log Creating session ${POLICY_ENDPOINT}
+ ${session}= Create Session policy ${POLICY_ENDPOINT}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH}
${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
Log Received response from policy ${resp.text}