blob: c6a5e6f7cdae425c30cb3ab9e9464a117fc30437 [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation The main interface for interacting with AAF. It handles low level stuff like managing the http request library and AAF required fields
3Library RequestsClientCert
4Library RequestsLibrary
5Library UUID
6
7Resource global_properties.robot
8
9*** Variables ***
10${AAF_HEALTH_CHECK_PATH} /authz/nss/org.openecomp
11
12*** Keywords ***
13Run AAF Health Check
14 [Documentation] Runs AAF Health check
15 ${resp}= Run AAF Get Request ${AAF_HEALTH_CHECK_PATH}
16 Should Be Equal As Strings ${resp.status_code} 200
17 Should Contain ${resp.json()} ns
18
19Run AAF Get Request
20 [Documentation] Runs AAF Get request
21 [Arguments] ${data_path}
22 ${auth}= Create List ${GLOBAL_AAF_USERNAME} ${GLOBAL_AAF_PASSWORD}
23 ${session}= Create Session aaf ${GLOBAL_AAF_SERVER} auth=${auth}
DR695H4964a1b2017-10-18 11:43:23 -040024 ${session_client}= Add Client Cert ${session} cert
DR695Hccff30b2017-02-17 18:44:24 -050025 ${uuid}= Generate UUID
26 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
27 ${resp}= Get Request aaf ${data_path} headers=${headers}
28 Log Received response from aaf ${resp.text}
DR695Hce07d412018-04-11 22:28:41 -040029 [Return] ${resp}