blob: 1797afd77900199ac8a724fdacdbe11da544c731 [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation The main interface for interacting with Policy. It handles low level stuff like managing the http request library and Policy required fields
3Library RequestsClientCert
4Library RequestsLibrary
5Library String
6Library JSONUtils
Brian Freeman55b96e22019-05-08 20:49:45 -05007Library Collections
DR695H910097e2019-05-08 13:55:32 -04008Library Collections
9Library SSHLibrary
10Library OperatingSystem
11Resource json_templater.robot
DR695Hccff30b2017-02-17 18:44:24 -050012Resource global_properties.robot
DR695H910097e2019-05-08 13:55:32 -040013Resource ssh/files.robot
DR695Hccff30b2017-02-17 18:44:24 -050014
15*** Variables ***
16${POLICY_HEALTH_CHECK_PATH} /healthcheck
DR695Hbf5a3a32017-06-30 13:09:57 -040017${POLICY_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_POLICY_SERVER_PORT}
Gary Wu251aa682018-07-30 15:22:20 -070018${POLICY_HEALTHCHECK_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_HEALTHCHECK_IP_ADDR}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Brian Freemanca5e32e2018-07-23 12:47:21 -050019${POLICY_TEMPLATES} robot/assets/templates/policy
Brian Freemand65e2aa2018-07-26 11:13:46 -050020${DROOLS_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_DROOLS_SERVER_PORT}
Bilal A461aa5b2019-05-06 14:00:57 -040021${POLICY_API_IP} ${GLOBAL_INJECTED_POLICY_API_IP_ADDR}
22${POLICY_PAP_IP} ${GLOBAL_INJECTED_POLICY_PAP_IP_ADDR}
23${POLICY_DISTRIBUTION_IP} ${GLOBAL_INJECTED_POLICY_DISTRIBUTION_IP_ADDR}
24${POLICY_PDPX_IP} ${GLOBAL_INJECTED_POLICY_PDPX_IP_ADDR}
25${POLICY_APEX_PDP_IP} ${GLOBAL_INJECTED_POLICY_APEX_PDP_IP_ADDR}
26${POLICY_HEALTHCHECK_USERNAME} ${GLOBAL_POLICY_HEALTHCHECK_USERNAME}
27${POLICY_HEALTHCHECK_PASSWORD} ${GLOBAL_POLICY_HEALTHCHECK_PASSWORD}
DR695Hccff30b2017-02-17 18:44:24 -050028
29*** Keywords ***
30
31Run Policy Health Check
32 [Documentation] Runs Policy Health check
Brian Freeman55b96e22019-05-08 20:49:45 -050033 ${auth}= Create List ${GLOBAL_POLICY_USERNAME} ${GLOBAL_POLICY_PASSWORD}
DR695Hbf5a3a32017-06-30 13:09:57 -040034 Log Creating session ${POLICY_ENDPOINT}
35 ${session}= Create Session policy ${POLICY_HEALTHCHECK_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -050036 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
37 ${resp}= Get Request policy ${POLICY_HEALTH_CHECK_PATH} headers=${headers}
38 Log Received response from policy ${resp.text}
39 Should Be Equal As Strings ${resp.status_code} 200
40 Should Be True ${resp.json()['healthy']}
41 @{ITEMS}= Copy List ${resp.json()['details']}
42 :FOR ${ELEMENT} IN @{ITEMS}
43 \ Should Be Equal As Strings ${ELEMENT['code']} 200
44 \ Should Be True ${ELEMENT['healthy']}
Brian Freeman55b96e22019-05-08 20:49:45 -050045
Brian Freemand65e2aa2018-07-26 11:13:46 -050046Run Drools Get Request
47 [Documentation] Runs Drools Get Request
48 [Arguments] ${data_path}
49 ${auth}= Create List ${GLOBAL_DROOLS_USERNAME} ${GLOBAL_DROOLS_PASSWORD}
50 Log Creating session ${POLICY_ENDPOINT}
51 ${session}= Create Session policy ${DROOLS_ENDPOINT} auth=${auth}
52 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
53 ${resp}= Get Request policy ${data_path} headers=${headers}
54 Log Received response from policy ${resp.text}
55 Should Be Equal As Strings ${resp.status_code} 200
56 [Return] ${resp}
57
DR695Hccff30b2017-02-17 18:44:24 -050058Run Policy Put Request
59 [Documentation] Runs Policy Put request
60 [Arguments] ${data_path} ${data}
DR695Hbf5a3a32017-06-30 13:09:57 -040061 Log Creating session ${POLICY_ENDPOINT}
62 ${session}= Create Session policy ${POLICY_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -050063 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
64 ${resp}= Put Request policy ${data_path} data=${data} headers=${headers}
65 Log Received response from policy ${resp.text}
66 [Return] ${resp}
Brian Freemane14d2572019-04-29 16:20:21 -050067
Brian Freemanc967dd62019-04-30 09:47:44 -050068Run Policy Get Request
69 [Documentation] Runs Policy Get request
70 [Arguments] ${data_path}
71 Log Creating session ${POLICY_ENDPOINT}
72 ${session}= Create Session policy ${POLICY_ENDPOINT}
73 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
74 ${resp}= Get Request policy ${data_path} headers=${headers}
75 Log Received response from policy ${resp.text}
76
Brian Freeman55b96e22019-05-08 20:49:45 -050077Run Policy Pap Get Request
78 [Documentation] Runs Policy Pap Get request
79 [Arguments] ${data_path}
80 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
81 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
82 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
83 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
84 ${resp}= Get Request policy ${data_path} headers=${headers}
85 Log Received response from Policy Pap ${resp.text}
86 [Return] ${resp}
87
88
Brian Freemane14d2572019-04-29 16:20:21 -050089Run Policy Post Request
90 [Documentation] Runs Policy Post request
91 [Arguments] ${data_path} ${data}
92 Log Creating session ${POLICY_ENDPOINT}
93 ${session}= Create Session policy ${POLICY_ENDPOINT}
94 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
95 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
96 Log Received response from policy ${resp.text}
97 [Return] ${resp}
Brian Freemanc967dd62019-04-30 09:47:44 -050098
Brian Freeman55b96e22019-05-08 20:49:45 -050099Run Policy Api Post Request
100 [Documentation] Runs Policy Api Post request
101 [Arguments] ${data_path} ${data}
102 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
103 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
104 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
105 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
106 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
107 Log Received response from policy ${resp.text}
108 [Return] ${resp}
109
110
111Run Policy Pap Post Request
112 [Documentation] Runs Policy Pap Post request
113 [Arguments] ${data_path} ${data}
114 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
115 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
116 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
117 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
118 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
119 Log Received response from policy ${resp.text}
120 [Return] ${resp}
121
122
DR695Hccff30b2017-02-17 18:44:24 -0500123Run Policy Delete Request
124 [Documentation] Runs Policy Delete request
125 [Arguments] ${data_path} ${data}
DR695Hbf5a3a32017-06-30 13:09:57 -0400126 Log Creating session ${POLICY_ENDPOINT}
127 ${session}= Create Session policy ${POLICY_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500128 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
129 ${resp}= Delete Request policy ${data_path} data=${data} headers=${headers}
130 Log Received response from policy ${resp.text}
131 [Return] ${resp}
Brian Freeman55b96e22019-05-08 20:49:45 -0500132
DR695Hccff30b2017-02-17 18:44:24 -0500133Run Policy Get Configs Request
134 [Documentation] Runs Policy Get Configs request
135 [Arguments] ${data_path} ${data}
DR695Hbf5a3a32017-06-30 13:09:57 -0400136 Log Creating session ${POLICY_ENDPOINT}
137 ${session}= Create Session policy ${POLICY_ENDPOINT}
Brian Freeman55b96e22019-05-08 20:49:45 -0500138 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH}
DR695Hccff30b2017-02-17 18:44:24 -0500139 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
140 Log Received response from policy ${resp.text}
Gary Wu76bc74f2018-03-22 13:25:49 -0700141 [Return] ${resp}
142
143
144
Brian Freemanc967dd62019-04-30 09:47:44 -0500145Update vVFWCL Policy Old
Gary Wu76bc74f2018-03-22 13:25:49 -0700146 [Arguments] ${resource_id}
Brian Freemanca5e32e2018-07-23 12:47:21 -0500147 Run Keyword and Ignore Error Delete vFWCL Policy
Gary Wu76bc74f2018-03-22 13:25:49 -0700148 Sleep 20s
Brian Freemand65e2aa2018-07-26 11:13:46 -0500149 Log To Console Create vFWCL Policy
Gary Wu76bc74f2018-03-22 13:25:49 -0700150 Create vFWCL Policy ${resource_id}
151 Sleep 5s
Brian Freemand65e2aa2018-07-26 11:13:46 -0500152 Log To Console Push vFWCL Policy
Gary Wu76bc74f2018-03-22 13:25:49 -0700153 Push vFWCL Policy
154 Sleep 20s
Brian Freemand65e2aa2018-07-26 11:13:46 -0500155 Log To Console Reboot Drools
Gary Wu76bc74f2018-03-22 13:25:49 -0700156 Reboot Drools
157 Sleep 20s
Brian Freemand65e2aa2018-07-26 11:13:46 -0500158 Log To Console Validate vFWCL Policy
Brian Freemanc967dd62019-04-30 09:47:44 -0500159 Validate the vFWCL Policy Old
160
161Update vVFWCL Policy
Brian Freeman0d866b52019-05-08 20:30:14 -0500162 [Arguments] ${resource_id}
Brian Freeman55b96e22019-05-08 20:49:45 -0500163 Log To Console Create vFWCL Monitoring Policy
Brian Freemanc967dd62019-04-30 09:47:44 -0500164 Create vFirewall Monitoring Policy
165 Sleep 5s
Brian Freeman55b96e22019-05-08 20:49:45 -0500166 Log To Console Create vFWCL Operational Policy
Brian Freeman75948282019-05-14 20:44:46 -0500167 ${op_policy_version}= Create vFirewall Operational Policy ${resource_id}
Brian Freemanc967dd62019-04-30 09:47:44 -0500168 Sleep 5s
Brian Freeman55b96e22019-05-08 20:49:45 -0500169 Log To Console Push vFWCL To PDP Group
Brian Freeman75948282019-05-14 20:44:46 -0500170 Push vFirewall Policies To PDP Group ${op_policy_version}
Brian Freemanc967dd62019-04-30 09:47:44 -0500171 Sleep 20s
172 Log To Console Validate vFWCL Policy
Gary Wu76bc74f2018-03-22 13:25:49 -0700173 Validate the vFWCL Policy
174
Brian Freemanc967dd62019-04-30 09:47:44 -0500175
Gary Wu76bc74f2018-03-22 13:25:49 -0700176Delete vFWCL Policy
177 ${data}= OperatingSystem.Get File ${POLICY_TEMPLATES}/FirewallPolicy_delete.template
178 ${resp}= Run Policy Delete Request /pdp/api/deletePolicy ${data}
179 Should Be Equal As Strings ${resp.status_code} 200
180
181Create vFWCL Policy
182 [Arguments] ${resource_id}
183 ${dict}= Create Dictionary RESOURCE_ID=${resource_id}
184 ${data}= Fill JSON Template File ${POLICY_TEMPLATES}/FirewallPolicy_update.template ${dict}
185 ${resp}= Run Policy Put Request /pdp/api/updatePolicy ${data}
186 Should Be Equal As Strings ${resp.status_code} 200
187
188Push vFWCL Policy
189 ${dict}= Create Dictionary
190 ${data}= Fill JSON Template File ${POLICY_TEMPLATES}/FirewallPolicy_push.template ${dict}
191 ${resp}= Run Policy Put Request /pdp/api/pushPolicy ${data}
192 Should Be Equal As Strings ${resp.status_code} 200
193
194Reboot Drools
195 ${stop}= Catenate docker exec -t -u policy drools bash -c "source /opt/app/policy/etc/profile.d/env.sh; policy stop"
196 ${start}= Catenate docker exec -t -u policy drools bash -c "source /opt/app/policy/etc/profile.d/env.sh; policy start"
197 Wait Until Keyword Succeeds 120 5 sec Open Connection And Log In ${GLOBAL_INJECTED_POLICY_IP_ADDR} root ${GLOBAL_VM_PRIVATE_KEY}
198 Write ${stop}
199 ${status} ${stdout}= Run Keyword And Ignore Error SSHLibrary.Read Until Regexp has stopped
200 Log ${status}: stdout=${stdout}
201 ${ctrlc}= Evaluate '\x03'
202 Run Keyword If '${status}' == 'FAIL' Write ${ctrlc}
203 Sleep 5s
204 Write ${start}
205 ${stdout}= SSHLibrary.Read Until Regexp is running
206 Log stdout=${stdout}
207 Should Contain ${stdout} is running
208
Brian Freemanc967dd62019-04-30 09:47:44 -0500209Validate the vFWCL Policy Old
Gary Wu76bc74f2018-03-22 13:25:49 -0700210 ${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools
211 Should Be Equal As Strings ${resp.status_code} 200
212 ${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam/org.onap.policy.controlloop.Params
213 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemane14d2572019-04-29 16:20:21 -0500214
Brian Freeman55b96e22019-05-08 20:49:45 -0500215Validate the vFWCL Policy
216 ${resp}= Run Policy Pap Get Request /policy/pap/v1/pdps
Brian Freemanc967dd62019-04-30 09:47:44 -0500217 Log Received response from policy ${resp.text}
218 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemane14d2572019-04-29 16:20:21 -0500219
220Create vFirewall Monitoring Policy
221 ${dict}= Create Dictionary
222 ${data}= Fill JSON Template File ${POLICY_TEMPLATES}/vFirewall_policy_monitoring_input_tosca.template ${dict}
Brian Freeman55b96e22019-05-08 20:49:45 -0500223 ${resp}= Run Policy Api Post Request /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies ${data}
Brian Freemane14d2572019-04-29 16:20:21 -0500224 Should Be Equal As Strings ${resp.status_code} 200
225
226
227Create vFirewall Operational Policy
228 [Arguments] ${resource_id}
229 ${dict}= Create Dictionary RESOURCE_ID=${resource_id}
230 ${data}= Fill JSON Template File ${POLICY_TEMPLATES}/vFirewall_policy_operational_input.template ${dict}
Brian Freeman55b96e22019-05-08 20:49:45 -0500231 ${resp}= Run Policy Api Post Request /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies ${data}
Brian Freemane14d2572019-04-29 16:20:21 -0500232 Should Be Equal As Strings ${resp.status_code} 200
Brian Freeman75948282019-05-14 20:44:46 -0500233 [Return] ${resp.json()['policy-version']}
Brian Freemane14d2572019-04-29 16:20:21 -0500234
235
236Push vFirewall Policies To PDP Group
Brian Freeman75948282019-05-14 20:44:46 -0500237 [Arguments] ${op_policy_version}
238 ${dict}= Create Dictionary OP_POLICY_VERSION=${op_policy_version}
Brian Freemane14d2572019-04-29 16:20:21 -0500239 ${data}= Fill JSON Template File ${POLICY_TEMPLATES}/vFirewall_push.template ${dict}
Brian Freeman55b96e22019-05-08 20:49:45 -0500240 #${resp}= Run Policy Post Request /policy/pap/v1/pdps/policies ${data}
241 ${resp}= Run Policy Pap Post Request /policy/pap/v1/pdps/policies ${data}
242 #Should Be Equal As Strings ${resp.status_code} 200
Brian Freemane14d2572019-04-29 16:20:21 -0500243
Bilal A461aa5b2019-05-06 14:00:57 -0400244Run Policy API Healthcheck
245 [Documentation] Runs Policy Api Health check
246 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
247 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Brian Freeman55b96e22019-05-08 20:49:45 -0500248 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
Bilal A461aa5b2019-05-06 14:00:57 -0400249 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
250 ${resp}= Get Request policy /policy/api/v1/healthcheck headers=${headers}
251 Log Received response from policy ${resp.text}
252 Should Be Equal As Strings ${resp.status_code} 200
253 Should Be Equal As Strings ${resp.json()['code']} 200
254
255Run Policy PAP Healthcheck
256 [Documentation] Runs Policy PAP Health check
257 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
258 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Brian Freeman55b96e22019-05-08 20:49:45 -0500259 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
Bilal A461aa5b2019-05-06 14:00:57 -0400260 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
261 ${resp}= Get Request policy /policy/pap/v1/healthcheck headers=${headers}
262 Log Received response from policy ${resp.text}
263 Should Be Equal As Strings ${resp.status_code} 200
264 Should Be Equal As Strings ${resp.json()['code']} 200
265
266Run Policy Distribution Healthcheck
267 [Documentation] Runs Policy Distribution Health check
268 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
269 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_DISTRIBUTION_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Brian Freeman55b96e22019-05-08 20:49:45 -0500270 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_DISTRIBUTION_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
Bilal A461aa5b2019-05-06 14:00:57 -0400271 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
272 ${resp}= Get Request policy /healthcheck headers=${headers}
273 Log Received response from policy ${resp.text}
274 Should Be Equal As Strings ${resp.status_code} 200
275 Should Be Equal As Strings ${resp.json()['code']} 200
276
277Run Policy XACML PDP Healthcheck
278 [Documentation] Runs Policy Xacml PDP Health check
279 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
280 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PDPX_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
281 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PDPX_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
282 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
283 ${resp}= Get Request policy /policy/pdpx/v1/healthcheck headers=${headers}
284 Log Received response from policy ${resp.text}
285 Should Be Equal As Strings ${resp.status_code} 200
286 Should Be Equal As Strings ${resp.json()['code']} 200
287
288Run Policy APEX PDP Healthcheck
289 [Documentation] Runs Policy Apex PDP Health check
290 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
291 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_APEX_PDP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Brian Freeman55b96e22019-05-08 20:49:45 -0500292 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_APEX_PDP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
Bilal A461aa5b2019-05-06 14:00:57 -0400293 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
294 ${resp}= Get Request policy /policy/apex-pdp/v1/healthcheck headers=${headers}
295 Log Received response from policy ${resp.text}
296 Should Be Equal As Strings ${resp.status_code} 200
297 Should Be Equal As Strings ${resp.json()['code']} 200
298