blob: 29205292e78d80b4b680c1aba75fcb897c7480a5 [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation The main interface for interacting with Portal. It handles low level stuff like managing the http request library and Portal required fields
3Library RequestsClientCert
4Library RequestsLibrary
5Library UUID
6
7Resource global_properties.robot
8
9*** Variables ***
10${PORTAL_HEALTH_CHECK_PATH} /ECOMPPORTAL/portalApi/healthCheck
DR695Hbf5a3a32017-06-30 13:09:57 -040011${PORTAL_ENDPOINT} ${GLOBAL_PORTAL_SERVER_PROTOCOL}://${GLOBAL_INJECTED_PORTAL_IP_ADDR}:${GLOBAL_PORTAL_SERVER_PORT}
DR695Hccff30b2017-02-17 18:44:24 -050012
13*** Keywords ***
14Run Portal Health Check
15 [Documentation] Runs Portal Health check
16 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
17 Should Be Equal As Strings ${resp.status_code} 200
18 Should Be Equal As Strings ${resp.json()['statusCode']} 200
19
20Run Portal Get Request
21 [Documentation] Runs Portal Get request
22 [Arguments] ${data_path}
DR695Hbf5a3a32017-06-30 13:09:57 -040023 ${session}= Create Session portal ${PORTAL_ENDPOINT}
DR695Hccff30b2017-02-17 18:44:24 -050024 ${uuid}= Generate UUID
25 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
26 ${resp}= Get Request portal ${data_path} headers=${headers}
27 Log Received response from portal ${resp.text}
28 [Return] ${resp}
29