blob: 28da33d2053b4059503c687a271755810f9e2ee2 [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
DR695Hccff30b2017-02-17 18:44:24 -05003Library RequestsLibrary
mrichomme3256fa22020-03-09 11:23:35 +01004Library ONAPLibrary.Utilities
DR695Hccff30b2017-02-17 18:44:24 -05005
6Resource global_properties.robot
7
8*** Variables ***
Brian Freemana966f032018-04-30 14:01:14 -05009${AAF_HEALTH_CHECK_PATH} /authz/perms/user/${GLOBAL_AAF_USERNAME}
DR695Hccff30b2017-02-17 18:44:24 -050010
11*** Keywords ***
12Run AAF Health Check
13 [Documentation] Runs AAF Health check
mrichomme3256fa22020-03-09 11:23:35 +010014 ${resp}= Run AAF Get Request ${AAF_HEALTH_CHECK_PATH}
DR695Hccff30b2017-02-17 18:44:24 -050015 Should Be Equal As Strings ${resp.status_code} 200
Brian Freemana966f032018-04-30 14:01:14 -050016 #Should Contain ${resp.json()} access
mrichomme3256fa22020-03-09 11:23:35 +010017
DR695Hccff30b2017-02-17 18:44:24 -050018Run AAF Get Request
19 [Documentation] Runs AAF Get request
20 [Arguments] ${data_path}
DR695Hc6184272019-07-26 15:50:23 -040021 ${session}= Create Session aaf ${GLOBAL_AAF_SERVER} auth=${GLOBAL_AAF_AUTHENTICATION}
DR695H18872bc2019-06-13 16:16:52 -040022 ${uuid}= Generate UUID4
DR695Hccff30b2017-02-17 18:44:24 -050023 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
24 ${resp}= Get Request aaf ${data_path} headers=${headers}
25 Log Received response from aaf ${resp.text}
Brian Freemana966f032018-04-30 14:01:14 -050026 [Return] ${resp}