2 Documentation Test suite for GBP Tenants, Operates functions from Restconf APIs.
3 Suite Teardown Delete All Sessions
4 Library RequestsLibrary
7 Library OperatingSystem
8 Variables ../../../variables/Variables.py
9 Resource ../../../libraries/Utils.robot
12 ${GBP_TENENT_ID} f5c7d344-d1c7-4208-8531-2c2693657e12
13 ${GBP_TENANT1_API} /restconf/config/policy:tenants/tenant/${GBP_TENENT_ID}
14 ${GBP_TENANT1_FILE} ${CURDIR}/../../../variables/gbp/tenant1.json
17 Add Tenant to one node
18 [Documentation] Add one Tenant from JSON file
19 Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
20 ${jsonbody} Read JSON From File ${GBP_TENANT1_FILE}
21 Add Elements To URI From File ${GBP_TENANT1_API} ${GBP_TENANT1_FILE}
22 ${resp} RequestsLibrary.Get session ${GBP_TENANT1_API}
23 Should Be Equal As Strings ${resp.status_code} 200
24 ${result} To JSON ${resp.content}
25 Lists Should be Equal ${result} ${jsonbody}
27 Read Tenant from other node
28 Create Session session http://${CONTROLLER1}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
29 ${jsonbody} Read JSON From File ${GBP_TENANT1_FILE}
30 ${resp} RequestsLibrary.Get session ${GBP_TENANT1_API}
31 Should Be Equal As Strings ${resp.status_code} 200
32 ${result} To JSON ${resp.content}
33 Lists Should be Equal ${result} ${jsonbody}
37 [Arguments] ${filepath}
38 ${body} OperatingSystem.Get File ${filepath}
39 ${jsonbody} To Json ${body}