blob: dba8d3ea7476e25d51f32c18358572458a89460c [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
DR695Hccff30b2017-02-17 18:44:24 -05003Library RequestsLibrary
4Library String
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +02005Library Collections
DR695H910097e2019-05-08 13:55:32 -04006Library SSHLibrary
7Library OperatingSystem
DR695Hd9794652019-07-19 18:20:40 -04008Library ONAPLibrary.Templating WITH NAME Templating
DR695Hccff30b2017-02-17 18:44:24 -05009Resource global_properties.robot
DR695H910097e2019-05-08 13:55:32 -040010Resource ssh/files.robot
DR695Hccff30b2017-02-17 18:44:24 -050011
12*** Variables ***
13${POLICY_HEALTH_CHECK_PATH} /healthcheck
DR695Hbf5a3a32017-06-30 13:09:57 -040014${POLICY_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_POLICY_SERVER_PORT}
Michal Ptacek6880b652019-07-08 16:13:02 +020015${POLICY_HEALTHCHECK_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_DROOLS_IP_ADDR}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
DR695H34409422019-06-20 10:56:46 -040016${POLICY_TEMPLATES} policy
Michal Ptacek6880b652019-07-08 16:13:02 +020017${DROOLS_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_DROOLS_IP_ADDR}:${GLOBAL_DROOLS_SERVER_PORT}
Bilal A461aa5b2019-05-06 14:00:57 -040018${POLICY_API_IP} ${GLOBAL_INJECTED_POLICY_API_IP_ADDR}
19${POLICY_PAP_IP} ${GLOBAL_INJECTED_POLICY_PAP_IP_ADDR}
20${POLICY_DISTRIBUTION_IP} ${GLOBAL_INJECTED_POLICY_DISTRIBUTION_IP_ADDR}
21${POLICY_PDPX_IP} ${GLOBAL_INJECTED_POLICY_PDPX_IP_ADDR}
22${POLICY_APEX_PDP_IP} ${GLOBAL_INJECTED_POLICY_APEX_PDP_IP_ADDR}
23${POLICY_HEALTHCHECK_USERNAME} ${GLOBAL_POLICY_HEALTHCHECK_USERNAME}
24${POLICY_HEALTHCHECK_PASSWORD} ${GLOBAL_POLICY_HEALTHCHECK_PASSWORD}
DR695Hccff30b2017-02-17 18:44:24 -050025
Brian Freeman88fbb992019-05-17 17:46:56 -050026
DR695Hccff30b2017-02-17 18:44:24 -050027*** Keywords ***
28
29Run Policy Health Check
30 [Documentation] Runs Policy Health check
Brian Freeman55b96e22019-05-08 20:49:45 -050031 ${auth}= Create List ${GLOBAL_POLICY_USERNAME} ${GLOBAL_POLICY_PASSWORD}
DR695Hbf5a3a32017-06-30 13:09:57 -040032 Log Creating session ${POLICY_ENDPOINT}
33 ${session}= Create Session policy ${POLICY_HEALTHCHECK_ENDPOINT} auth=${auth}
DR695Hccff30b2017-02-17 18:44:24 -050034 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
35 ${resp}= Get Request policy ${POLICY_HEALTH_CHECK_PATH} headers=${headers}
36 Log Received response from policy ${resp.text}
37 Should Be Equal As Strings ${resp.status_code} 200
38 Should Be True ${resp.json()['healthy']}
39 @{ITEMS}= Copy List ${resp.json()['details']}
40 :FOR ${ELEMENT} IN @{ITEMS}
41 \ Should Be Equal As Strings ${ELEMENT['code']} 200
42 \ Should Be True ${ELEMENT['healthy']}
Brian Freeman55b96e22019-05-08 20:49:45 -050043
Brian Freemand65e2aa2018-07-26 11:13:46 -050044Run Drools Get Request
45 [Documentation] Runs Drools Get Request
46 [Arguments] ${data_path}
47 ${auth}= Create List ${GLOBAL_DROOLS_USERNAME} ${GLOBAL_DROOLS_PASSWORD}
Michal Ptacek6880b652019-07-08 16:13:02 +020048 Log Creating session ${DROOLS_ENDPOINT}
Brian Freemand65e2aa2018-07-26 11:13:46 -050049 ${session}= Create Session policy ${DROOLS_ENDPOINT} auth=${auth}
50 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
51 ${resp}= Get Request policy ${data_path} headers=${headers}
52 Log Received response from policy ${resp.text}
53 Should Be Equal As Strings ${resp.status_code} 200
54 [Return] ${resp}
55
DR695Hccff30b2017-02-17 18:44:24 -050056Run Policy Put Request
57 [Documentation] Runs Policy Put request
58 [Arguments] ${data_path} ${data}
DR695Hbf5a3a32017-06-30 13:09:57 -040059 Log Creating session ${POLICY_ENDPOINT}
60 ${session}= Create Session policy ${POLICY_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -050061 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
62 ${resp}= Put Request policy ${data_path} data=${data} headers=${headers}
63 Log Received response from policy ${resp.text}
64 [Return] ${resp}
Brian Freemane14d2572019-04-29 16:20:21 -050065
Brian Freemanc967dd62019-04-30 09:47:44 -050066Run Policy Get Request
67 [Documentation] Runs Policy Get request
68 [Arguments] ${data_path}
69 Log Creating session ${POLICY_ENDPOINT}
70 ${session}= Create Session policy ${POLICY_ENDPOINT}
71 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
72 ${resp}= Get Request policy ${data_path} headers=${headers}
73 Log Received response from policy ${resp.text}
74
Brian Freeman55b96e22019-05-08 20:49:45 -050075Run Policy Pap Get Request
76 [Documentation] Runs Policy Pap Get request
77 [Arguments] ${data_path}
78 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
79 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +020080 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Brian Freeman55b96e22019-05-08 20:49:45 -050081 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
82 ${resp}= Get Request policy ${data_path} headers=${headers}
83 Log Received response from Policy Pap ${resp.text}
84 [Return] ${resp}
85
86
Brian Freemane14d2572019-04-29 16:20:21 -050087Run Policy Post Request
88 [Documentation] Runs Policy Post request
89 [Arguments] ${data_path} ${data}
90 Log Creating session ${POLICY_ENDPOINT}
91 ${session}= Create Session policy ${POLICY_ENDPOINT}
92 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
93 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
94 Log Received response from policy ${resp.text}
95 [Return] ${resp}
Brian Freemanc967dd62019-04-30 09:47:44 -050096
Brian Freeman55b96e22019-05-08 20:49:45 -050097Run Policy Api Post Request
98 [Documentation] Runs Policy Api Post request
99 [Arguments] ${data_path} ${data}
100 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200101 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Brian Freeman55b96e22019-05-08 20:49:45 -0500102 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
103 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
104 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
105 Log Received response from policy ${resp.text}
106 [Return] ${resp}
107
108
109Run Policy Pap Post Request
110 [Documentation] Runs Policy Pap Post request
111 [Arguments] ${data_path} ${data}
112 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200113 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Brian Freeman55b96e22019-05-08 20:49:45 -0500114 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
115 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
116 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
117 Log Received response from policy ${resp.text}
118 [Return] ${resp}
119
120
DR695Hccff30b2017-02-17 18:44:24 -0500121Run Policy Delete Request
122 [Documentation] Runs Policy Delete request
123 [Arguments] ${data_path} ${data}
DR695Hbf5a3a32017-06-30 13:09:57 -0400124 Log Creating session ${POLICY_ENDPOINT}
125 ${session}= Create Session policy ${POLICY_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500126 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
127 ${resp}= Delete Request policy ${data_path} data=${data} headers=${headers}
128 Log Received response from policy ${resp.text}
129 [Return] ${resp}
Brian Freeman55b96e22019-05-08 20:49:45 -0500130
DR695Hccff30b2017-02-17 18:44:24 -0500131Run Policy Get Configs Request
132 [Documentation] Runs Policy Get Configs request
133 [Arguments] ${data_path} ${data}
DR695Hbf5a3a32017-06-30 13:09:57 -0400134 Log Creating session ${POLICY_ENDPOINT}
135 ${session}= Create Session policy ${POLICY_ENDPOINT}
Brian Freeman55b96e22019-05-08 20:49:45 -0500136 ${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 -0500137 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
138 Log Received response from policy ${resp.text}
Gary Wu76bc74f2018-03-22 13:25:49 -0700139 [Return] ${resp}
140
Brian Freemanc967dd62019-04-30 09:47:44 -0500141Update vVFWCL Policy
Brian Freeman0d866b52019-05-08 20:30:14 -0500142 [Arguments] ${resource_id}
DR695H8e7028b2019-07-10 10:13:58 -0400143 Log Create vFWCL Monitoring Policy
Brian Freemanc967dd62019-04-30 09:47:44 -0500144 Create vFirewall Monitoring Policy
145 Sleep 5s
DR695H8e7028b2019-07-10 10:13:58 -0400146 Log Create vFWCL Operational Policy
Brian Freeman75948282019-05-14 20:44:46 -0500147 ${op_policy_version}= Create vFirewall Operational Policy ${resource_id}
Brian Freemanc967dd62019-04-30 09:47:44 -0500148 Sleep 5s
DR695H8e7028b2019-07-10 10:13:58 -0400149 Log Push vFWCL To PDP Group
Brian Freeman75948282019-05-14 20:44:46 -0500150 Push vFirewall Policies To PDP Group ${op_policy_version}
Brian Freemanc967dd62019-04-30 09:47:44 -0500151 Sleep 20s
DR695H8e7028b2019-07-10 10:13:58 -0400152 Log Validate vFWCL Policy
Gary Wu76bc74f2018-03-22 13:25:49 -0700153 Validate the vFWCL Policy
154
Brian Freemanc967dd62019-04-30 09:47:44 -0500155
Gary Wu76bc74f2018-03-22 13:25:49 -0700156Delete vFWCL Policy
DR695Hd9794652019-07-19 18:20:40 -0400157 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
DR695H34409422019-06-20 10:56:46 -0400158 ${dict}= Create Dictionary policyName=com.BRMSParamvFirewall
DR695Hd9794652019-07-19 18:20:40 -0400159 ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_delete.jinja ${dict}
DR695H34409422019-06-20 10:56:46 -0400160 ${resp}= Run Policy Delete Request /pdp/api/deletePolicy ${data}
161 Should Be Equal As Strings ${resp.status_code} 200
Gary Wu76bc74f2018-03-22 13:25:49 -0700162
163Create vFWCL Policy
164 [Arguments] ${resource_id}
165 ${dict}= Create Dictionary RESOURCE_ID=${resource_id}
DR695Hd9794652019-07-19 18:20:40 -0400166 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
167 ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_update.jinja ${dict}
Gary Wu76bc74f2018-03-22 13:25:49 -0700168 ${resp}= Run Policy Put Request /pdp/api/updatePolicy ${data}
169 Should Be Equal As Strings ${resp.status_code} 200
170
171Push vFWCL Policy
DR695Hd9794652019-07-19 18:20:40 -0400172 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
DR695H34409422019-06-20 10:56:46 -0400173 ${dict}= Create Dictionary
DR695Hd9794652019-07-19 18:20:40 -0400174 ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_push.jinja ${dict}
DR695H34409422019-06-20 10:56:46 -0400175 ${resp}= Run Policy Put Request /pdp/api/pushPolicy ${data}
176 Should Be Equal As Strings ${resp.status_code} 200
Gary Wu76bc74f2018-03-22 13:25:49 -0700177
Brian Freemanc967dd62019-04-30 09:47:44 -0500178Validate the vFWCL Policy Old
Gary Wu76bc74f2018-03-22 13:25:49 -0700179 ${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools
180 Should Be Equal As Strings ${resp.status_code} 200
181 ${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam/org.onap.policy.controlloop.Params
182 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemane14d2572019-04-29 16:20:21 -0500183
Brian Freeman55b96e22019-05-08 20:49:45 -0500184Validate the vFWCL Policy
185 ${resp}= Run Policy Pap Get Request /policy/pap/v1/pdps
Brian Freemanc967dd62019-04-30 09:47:44 -0500186 Log Received response from policy ${resp.text}
187 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemane14d2572019-04-29 16:20:21 -0500188
189Create vFirewall Monitoring Policy
190 ${dict}= Create Dictionary
DR695Hd9794652019-07-19 18:20:40 -0400191 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
192 ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/vFirewall_policy_monitoring_input_tosca.jinja ${dict}
Brian Freeman55b96e22019-05-08 20:49:45 -0500193 ${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 -0500194 Should Be Equal As Strings ${resp.status_code} 200
195
Brian Freeman88fbb992019-05-17 17:46:56 -0500196Create vFirewall Operational Policy
DR695H34409422019-06-20 10:56:46 -0400197 [Arguments] ${resource_id}
198 ${dict}= Create Dictionary RESOURCE_ID=${resource_id}
DR695Hd9794652019-07-19 18:20:40 -0400199 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
DR695H34409422019-06-20 10:56:46 -0400200 ${content_data} OperatingSystem.Get File ${POLICY_TEMPLATES}/vFirewall_policy_operational_content.yaml
201 ${content_data}= Replace String Using Regexp ${content_data} __RESOURCE_ID__ ${resource_id}
202 ${encoded_content_data}= Evaluate urllib.quote_plus('''${content_data}''') urllib
203 ${content_dictionary}= Create Dictionary URL_ENCODED_CONTENT ${encoded_content_data}
DR695Hd9794652019-07-19 18:20:40 -0400204 ${data_2}= Templating.Apply Template policy ${POLICY_TEMPLATES}/vFirewall_policy_operational_url_enc_content_input.jinja ${content_dictionary}
DR695H8e7028b2019-07-10 10:13:58 -0400205 Log ${data_2}
DR695H34409422019-06-20 10:56:46 -0400206 ${resp}= Run Policy Api Post Request /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies ${data_2}
207 Should Be Equal As Strings ${resp.status_code} 200
208 [Return] ${resp.json()['policy-version']}
Brian Freeman88fbb992019-05-17 17:46:56 -0500209
Brian Freemane14d2572019-04-29 16:20:21 -0500210Push vFirewall Policies To PDP Group
DR695H34409422019-06-20 10:56:46 -0400211 [Arguments] ${op_policy_version}
212 ${dict}= Create Dictionary OP_POLICY_VERSION=${op_policy_version}
DR695Hd9794652019-07-19 18:20:40 -0400213 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
214 ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/vFirewall_push.jinja ${dict}
DR695H34409422019-06-20 10:56:46 -0400215 ${resp}= Run Policy Pap Post Request /policy/pap/v1/pdps/policies ${data}
216 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemane14d2572019-04-29 16:20:21 -0500217
Bilal A461aa5b2019-05-06 14:00:57 -0400218Run Policy API Healthcheck
219 [Documentation] Runs Policy Api Health check
220 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
221 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200222 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Bilal A461aa5b2019-05-06 14:00:57 -0400223 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
224 ${resp}= Get Request policy /policy/api/v1/healthcheck headers=${headers}
225 Log Received response from policy ${resp.text}
226 Should Be Equal As Strings ${resp.status_code} 200
227 Should Be Equal As Strings ${resp.json()['code']} 200
228
229Run Policy PAP Healthcheck
230 [Documentation] Runs Policy PAP Health check
231 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
232 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200233 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Bilal A461aa5b2019-05-06 14:00:57 -0400234 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
235 ${resp}= Get Request policy /policy/pap/v1/healthcheck headers=${headers}
236 Log Received response from policy ${resp.text}
237 Should Be Equal As Strings ${resp.status_code} 200
238 Should Be Equal As Strings ${resp.json()['code']} 200
239
240Run Policy Distribution Healthcheck
241 [Documentation] Runs Policy Distribution Health check
242 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
243 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_DISTRIBUTION_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200244 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_DISTRIBUTION_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Bilal A461aa5b2019-05-06 14:00:57 -0400245 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
246 ${resp}= Get Request policy /healthcheck headers=${headers}
247 Log Received response from policy ${resp.text}
248 Should Be Equal As Strings ${resp.status_code} 200
249 Should Be Equal As Strings ${resp.json()['code']} 200
250
251Run Policy XACML PDP Healthcheck
252 [Documentation] Runs Policy Xacml PDP Health check
253 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
254 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PDPX_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
255 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PDPX_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
256 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
257 ${resp}= Get Request policy /policy/pdpx/v1/healthcheck headers=${headers}
258 Log Received response from policy ${resp.text}
259 Should Be Equal As Strings ${resp.status_code} 200
260 Should Be Equal As Strings ${resp.json()['code']} 200
261
262Run Policy APEX PDP Healthcheck
263 [Documentation] Runs Policy Apex PDP Health check
264 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
265 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_APEX_PDP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200266 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_APEX_PDP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Bilal A461aa5b2019-05-06 14:00:57 -0400267 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
268 ${resp}= Get Request policy /policy/apex-pdp/v1/healthcheck headers=${headers}
269 Log Received response from policy ${resp.text}
270 Should Be Equal As Strings ${resp.status_code} 200
271 Should Be Equal As Strings ${resp.json()['code']} 200
272