blob: 96867648034479ba079d73560f7bcd9efc688b31 [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}
Michal Ptacek6880b652019-07-08 16:13:02 +020047 Log Creating session ${DROOLS_ENDPOINT}
DR695H87b84d02019-08-02 17:18:13 -040048 ${session}= Create Session policy ${DROOLS_ENDPOINT} auth=${GLOBAL_DROOLS_AUTHENTICATION}
Brian Freemand65e2aa2018-07-26 11:13:46 -050049 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
50 ${resp}= Get Request policy ${data_path} headers=${headers}
51 Log Received response from policy ${resp.text}
52 Should Be Equal As Strings ${resp.status_code} 200
53 [Return] ${resp}
54
DR695Hccff30b2017-02-17 18:44:24 -050055Run Policy Put Request
56 [Documentation] Runs Policy Put request
57 [Arguments] ${data_path} ${data}
DR695Hbf5a3a32017-06-30 13:09:57 -040058 Log Creating session ${POLICY_ENDPOINT}
59 ${session}= Create Session policy ${POLICY_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -050060 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
61 ${resp}= Put Request policy ${data_path} data=${data} headers=${headers}
62 Log Received response from policy ${resp.text}
63 [Return] ${resp}
Brian Freemane14d2572019-04-29 16:20:21 -050064
Brian Freemanc967dd62019-04-30 09:47:44 -050065Run Policy Get Request
66 [Documentation] Runs Policy Get request
67 [Arguments] ${data_path}
68 Log Creating session ${POLICY_ENDPOINT}
69 ${session}= Create Session policy ${POLICY_ENDPOINT}
70 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
71 ${resp}= Get Request policy ${data_path} headers=${headers}
72 Log Received response from policy ${resp.text}
73
Brian Freeman55b96e22019-05-08 20:49:45 -050074Run Policy Pap Get Request
75 [Documentation] Runs Policy Pap Get request
76 [Arguments] ${data_path}
77 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
78 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +020079 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Brian Freeman55b96e22019-05-08 20:49:45 -050080 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
81 ${resp}= Get Request policy ${data_path} headers=${headers}
82 Log Received response from Policy Pap ${resp.text}
83 [Return] ${resp}
84
85
Brian Freemane14d2572019-04-29 16:20:21 -050086Run Policy Post Request
87 [Documentation] Runs Policy Post request
88 [Arguments] ${data_path} ${data}
89 Log Creating session ${POLICY_ENDPOINT}
90 ${session}= Create Session policy ${POLICY_ENDPOINT}
91 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
92 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
93 Log Received response from policy ${resp.text}
94 [Return] ${resp}
Brian Freemanc967dd62019-04-30 09:47:44 -050095
Brian Freeman55b96e22019-05-08 20:49:45 -050096Run Policy Api Post Request
97 [Documentation] Runs Policy Api Post request
98 [Arguments] ${data_path} ${data}
99 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200100 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Brian Freeman55b96e22019-05-08 20:49:45 -0500101 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
102 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
103 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
104 Log Received response from policy ${resp.text}
105 [Return] ${resp}
106
107
108Run Policy Pap Post Request
109 [Documentation] Runs Policy Pap Post request
110 [Arguments] ${data_path} ${data}
111 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200112 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Brian Freeman55b96e22019-05-08 20:49:45 -0500113 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
114 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
115 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
116 Log Received response from policy ${resp.text}
117 [Return] ${resp}
118
119
DR695Hccff30b2017-02-17 18:44:24 -0500120Run Policy Delete Request
121 [Documentation] Runs Policy Delete request
122 [Arguments] ${data_path} ${data}
DR695Hbf5a3a32017-06-30 13:09:57 -0400123 Log Creating session ${POLICY_ENDPOINT}
124 ${session}= Create Session policy ${POLICY_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -0500125 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
126 ${resp}= Delete Request policy ${data_path} data=${data} headers=${headers}
127 Log Received response from policy ${resp.text}
128 [Return] ${resp}
Brian Freeman55b96e22019-05-08 20:49:45 -0500129
DR695Hccff30b2017-02-17 18:44:24 -0500130Run Policy Get Configs Request
131 [Documentation] Runs Policy Get Configs request
132 [Arguments] ${data_path} ${data}
DR695Hbf5a3a32017-06-30 13:09:57 -0400133 Log Creating session ${POLICY_ENDPOINT}
134 ${session}= Create Session policy ${POLICY_ENDPOINT}
Brian Freeman55b96e22019-05-08 20:49:45 -0500135 ${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 -0500136 ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
137 Log Received response from policy ${resp.text}
Gary Wu76bc74f2018-03-22 13:25:49 -0700138 [Return] ${resp}
139
Brian Freemanc967dd62019-04-30 09:47:44 -0500140Update vVFWCL Policy
Brian Freeman0d866b52019-05-08 20:30:14 -0500141 [Arguments] ${resource_id}
DR695H8e7028b2019-07-10 10:13:58 -0400142 Log Create vFWCL Monitoring Policy
Brian Freemanc967dd62019-04-30 09:47:44 -0500143 Create vFirewall Monitoring Policy
144 Sleep 5s
DR695H8e7028b2019-07-10 10:13:58 -0400145 Log Create vFWCL Operational Policy
Brian Freeman75948282019-05-14 20:44:46 -0500146 ${op_policy_version}= Create vFirewall Operational Policy ${resource_id}
Brian Freemanc967dd62019-04-30 09:47:44 -0500147 Sleep 5s
DR695H8e7028b2019-07-10 10:13:58 -0400148 Log Push vFWCL To PDP Group
Brian Freeman75948282019-05-14 20:44:46 -0500149 Push vFirewall Policies To PDP Group ${op_policy_version}
Brian Freemanc967dd62019-04-30 09:47:44 -0500150 Sleep 20s
DR695H8e7028b2019-07-10 10:13:58 -0400151 Log Validate vFWCL Policy
Gary Wu76bc74f2018-03-22 13:25:49 -0700152 Validate the vFWCL Policy
153
Brian Freemanc967dd62019-04-30 09:47:44 -0500154
Gary Wu76bc74f2018-03-22 13:25:49 -0700155Delete vFWCL Policy
DR695Hd9794652019-07-19 18:20:40 -0400156 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
DR695H34409422019-06-20 10:56:46 -0400157 ${dict}= Create Dictionary policyName=com.BRMSParamvFirewall
DR695Hd9794652019-07-19 18:20:40 -0400158 ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_delete.jinja ${dict}
DR695H34409422019-06-20 10:56:46 -0400159 ${resp}= Run Policy Delete Request /pdp/api/deletePolicy ${data}
160 Should Be Equal As Strings ${resp.status_code} 200
Gary Wu76bc74f2018-03-22 13:25:49 -0700161
162Create vFWCL Policy
163 [Arguments] ${resource_id}
164 ${dict}= Create Dictionary RESOURCE_ID=${resource_id}
DR695Hd9794652019-07-19 18:20:40 -0400165 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
166 ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_update.jinja ${dict}
Gary Wu76bc74f2018-03-22 13:25:49 -0700167 ${resp}= Run Policy Put Request /pdp/api/updatePolicy ${data}
168 Should Be Equal As Strings ${resp.status_code} 200
169
170Push vFWCL Policy
DR695Hd9794652019-07-19 18:20:40 -0400171 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
DR695H34409422019-06-20 10:56:46 -0400172 ${dict}= Create Dictionary
DR695Hd9794652019-07-19 18:20:40 -0400173 ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/FirewallPolicy_push.jinja ${dict}
DR695H34409422019-06-20 10:56:46 -0400174 ${resp}= Run Policy Put Request /pdp/api/pushPolicy ${data}
175 Should Be Equal As Strings ${resp.status_code} 200
Gary Wu76bc74f2018-03-22 13:25:49 -0700176
Brian Freemanc967dd62019-04-30 09:47:44 -0500177Validate the vFWCL Policy Old
Gary Wu76bc74f2018-03-22 13:25:49 -0700178 ${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools
179 Should Be Equal As Strings ${resp.status_code} 200
180 ${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam/org.onap.policy.controlloop.Params
181 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemane14d2572019-04-29 16:20:21 -0500182
Brian Freeman55b96e22019-05-08 20:49:45 -0500183Validate the vFWCL Policy
184 ${resp}= Run Policy Pap Get Request /policy/pap/v1/pdps
Brian Freemanc967dd62019-04-30 09:47:44 -0500185 Log Received response from policy ${resp.text}
186 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemane14d2572019-04-29 16:20:21 -0500187
188Create vFirewall Monitoring Policy
189 ${dict}= Create Dictionary
DR695Hd9794652019-07-19 18:20:40 -0400190 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
191 ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/vFirewall_policy_monitoring_input_tosca.jinja ${dict}
Brian Freeman55b96e22019-05-08 20:49:45 -0500192 ${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 -0500193 Should Be Equal As Strings ${resp.status_code} 200
194
Brian Freeman88fbb992019-05-17 17:46:56 -0500195Create vFirewall Operational Policy
DR695H34409422019-06-20 10:56:46 -0400196 [Arguments] ${resource_id}
197 ${dict}= Create Dictionary RESOURCE_ID=${resource_id}
DR695Hd9794652019-07-19 18:20:40 -0400198 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
DR695H956f45b2019-09-09 16:17:07 -0400199 ${content_data} OperatingSystem.Get File ${GLOBAL_TEMPLATE_FOLDER}/${POLICY_TEMPLATES}/vFirewall_policy_operational_content.yaml
DR695H34409422019-06-20 10:56:46 -0400200 ${content_data}= Replace String Using Regexp ${content_data} __RESOURCE_ID__ ${resource_id}
201 ${encoded_content_data}= Evaluate urllib.quote_plus('''${content_data}''') urllib
202 ${content_dictionary}= Create Dictionary URL_ENCODED_CONTENT ${encoded_content_data}
DR695Hd9794652019-07-19 18:20:40 -0400203 ${data_2}= Templating.Apply Template policy ${POLICY_TEMPLATES}/vFirewall_policy_operational_url_enc_content_input.jinja ${content_dictionary}
DR695H8e7028b2019-07-10 10:13:58 -0400204 Log ${data_2}
DR695H34409422019-06-20 10:56:46 -0400205 ${resp}= Run Policy Api Post Request /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies ${data_2}
206 Should Be Equal As Strings ${resp.status_code} 200
207 [Return] ${resp.json()['policy-version']}
Brian Freeman88fbb992019-05-17 17:46:56 -0500208
Brian Freemane14d2572019-04-29 16:20:21 -0500209Push vFirewall Policies To PDP Group
DR695H34409422019-06-20 10:56:46 -0400210 [Arguments] ${op_policy_version}
211 ${dict}= Create Dictionary OP_POLICY_VERSION=${op_policy_version}
DR695Hd9794652019-07-19 18:20:40 -0400212 Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
213 ${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/vFirewall_push.jinja ${dict}
DR695H34409422019-06-20 10:56:46 -0400214 ${resp}= Run Policy Pap Post Request /policy/pap/v1/pdps/policies ${data}
215 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemane14d2572019-04-29 16:20:21 -0500216
Bilal A461aa5b2019-05-06 14:00:57 -0400217Run Policy API Healthcheck
218 [Documentation] Runs Policy Api Health check
219 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
220 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200221 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Bilal A461aa5b2019-05-06 14:00:57 -0400222 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
223 ${resp}= Get Request policy /policy/api/v1/healthcheck headers=${headers}
224 Log Received response from policy ${resp.text}
225 Should Be Equal As Strings ${resp.status_code} 200
226 Should Be Equal As Strings ${resp.json()['code']} 200
227
228Run Policy PAP Healthcheck
229 [Documentation] Runs Policy PAP Health check
230 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
231 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200232 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Bilal A461aa5b2019-05-06 14:00:57 -0400233 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
234 ${resp}= Get Request policy /policy/pap/v1/healthcheck headers=${headers}
235 Log Received response from policy ${resp.text}
236 Should Be Equal As Strings ${resp.status_code} 200
237 Should Be Equal As Strings ${resp.json()['code']} 200
238
239Run Policy Distribution Healthcheck
240 [Documentation] Runs Policy Distribution Health check
241 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
242 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_DISTRIBUTION_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200243 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_DISTRIBUTION_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
Bilal A461aa5b2019-05-06 14:00:57 -0400244 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
245 ${resp}= Get Request policy /healthcheck headers=${headers}
246 Log Received response from policy ${resp.text}
247 Should Be Equal As Strings ${resp.status_code} 200
248 Should Be Equal As Strings ${resp.json()['code']} 200
249
250Run Policy XACML PDP Healthcheck
251 [Documentation] Runs Policy Xacml PDP Health check
252 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
253 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PDPX_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
254 ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PDPX_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
255 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
256 ${resp}= Get Request policy /policy/pdpx/v1/healthcheck headers=${headers}
257 Log Received response from policy ${resp.text}
258 Should Be Equal As Strings ${resp.status_code} 200
259 Should Be Equal As Strings ${resp.json()['code']} 200
260
261Run Policy APEX PDP Healthcheck
262 [Documentation] Runs Policy Apex PDP Health check
263 ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
264 Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_APEX_PDP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
Sylvain Desbureaux2e33ff62019-05-15 14:41:18 +0200265 ${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 -0400266 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
267 ${resp}= Get Request policy /policy/apex-pdp/v1/healthcheck headers=${headers}
268 Log Received response from policy ${resp.text}
269 Should Be Equal As Strings ${resp.status_code} 200
270 Should Be Equal As Strings ${resp.json()['code']} 200
271