2 Documentation Test suite for setting up infrastructure for demo-symmetric-chain
3 Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
4 Suite Teardown Delete All Sessions
5 Library RequestsLibrary
6 Library OperatingSystem
7 Variables ../../../../../variables/Variables.py
8 Resource ../../../../../libraries/Utils.robot
9 Resource ../Variables.robot
10 Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
14 [Documentation] Register Service Functions to ODL
15 ${json_to_edit} OperatingSystem.Get File ${SF_FILE}
16 ${edited_json} Replace String ${json_to_edit} _SF1 ${GBPSFC3}
17 ${edited_json} Replace String ${edited_json} _SF2 ${GBPSFC5}
18 Add Elements To URI And Verify ${SF_PATH} ${edited_json} ${HEADERS_YANG_JSON}
20 Put Service Function Forwarders
21 [Documentation] Register Service Function Forwarders to ODL
22 ${json_to_edit} OperatingSystem.Get File ${SFF_FILE}
23 ${edited_json} Replace String ${json_to_edit} _SFF1 ${GBPSFC2}
24 ${edited_json} Replace String ${edited_json} _SFF2 ${GBPSFC4}
25 Add Elements To URI And Verify ${SFF_PATH} ${edited_json} ${HEADERS_YANG_JSON}
28 Wait For Manager and Switch Connected on GBPSFC2
29 [Documentation] Making sure that manager is connected for further processing.
30 SSHLibrary.Open Connection ${GBPSFC2}
31 Utils.Flexible Mininet Login
32 Wait Until Keyword Succeeds 2min 3s Manager and Switch Connected sw_name=sw2
33 SSHLibrary.Close Connection
35 Wait For Manager and Switch Connected on GBPSFC4
36 [Documentation] Making sure that manager is connected for further processing.
37 SSHLibrary.Open Connection ${GBPSFC4}
38 Utils.Flexible Mininet Login
39 Wait Until Keyword Succeeds 2min 3s Manager and Switch Connected sw_name=sw4
40 SSHLibrary.Close Connection
42 Put Service Function Chains
43 [Documentation] Register Service Function Chains to ODL
44 Add Elements To URI From File And Verify ${SFC_PATH} ${SFC_SYMM_FILE} ${HEADERS_YANG_JSON}
46 Put Service Function Paths
47 [Documentation] Register Service Function Paths to ODL
48 Add Elements To URI From File And Verify ${SFP_PATH} ${SFP_SYMM_FILE} ${HEADERS_YANG_JSON}
51 [Documentation] Send tunnel augmentation to ODL
52 ${json_to_edit} OperatingSystem.Get File ${TUNNELS_FILE}
53 ${edited_json} Replace String ${json_to_edit} _CLASSIFIER1 ${GBPSFC1}
54 ${edited_json} Replace String ${edited_json} _CLASSIFIER2 ${GBPSFC6}
55 Add Elements To URI And Verify ${TUNNELS_PATH} ${edited_json} ${HEADERS_YANG_JSON}
58 [Documentation] Send Tenant Data to ODL
59 Add Elements To URI From File And Verify ${TENANT_PATH} ${TENANT_SYMM_FILE} ${HEADERS_YANG_JSON}
62 [Documentation] Endpoints registration
63 @{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_SYMM_DIR} vethl*.*json absolute
64 :FOR ${endpoint_file} IN @{endpoint_files}
65 \ Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
66 ${resp} RequestsLibrary.Get Request session ${ENDPOINTS_OPER_PATH}