change properties to match what is in the new oom repo
[testsuite.git] / robot / resources / aaf_interface.robot
1 *** Settings ***
2 Documentation     The main interface for interacting with AAF. It handles low level stuff like managing the http request library and AAF required fields
3 Library               RequestsLibrary
4 Library           ONAPLibrary.Utilities   
5
6 Resource          global_properties.robot
7
8 *** Variables ***
9 ${AAF_HEALTH_CHECK_PATH}        /authz/perms/user/${GLOBAL_AAF_USERNAME}
10
11 *** Keywords ***
12 Run AAF Health Check
13      [Documentation]    Runs AAF Health check
14      ${resp}=    Run AAF Get Request    ${AAF_HEALTH_CHECK_PATH}    
15      Should Be Equal As Strings         ${resp.status_code}     200
16      #Should Contain    ${resp.json()}    access
17          
18 Run AAF Get Request
19      [Documentation]    Runs AAF Get request
20      [Arguments]    ${data_path}
21      ${session}=    Create Session      aaf     ${GLOBAL_AAF_SERVER}    auth=${GLOBAL_AAF_AUTHENTICATION}
22      ${uuid}=    Generate UUID4
23      ${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}
26      [Return]    ${resp}