2 Documentation Test suite for setting up infrastructure for demo-asymmetric-chain
4 Library RequestsLibrary
5 Library OperatingSystem
6 Variables ../../../../../variables/Variables.py
7 Resource ../../../../../libraries/SSHKeywords.robot
8 Resource ../Variables.robot
9 Resource ../../../../../libraries/GBP/OpenFlowUtils.robot
11 Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
12 Suite Teardown Delete All Sessions
17 [Documentation] Register Service Functions to ODL
18 ${json_to_edit} OperatingSystem.Get File ${SF_FILE}
19 ${edited_json} Replace String ${json_to_edit} _SF1 ${GBPSFC3}
20 ${edited_json} Replace String ${edited_json} _SF2 ${GBPSFC5}
21 Add Elements To URI And Verify ${SF_PATH} ${edited_json} ${HEADERS_YANG_JSON}
23 Put Service Function Forwarders
24 [Documentation] Register Service Function Forwarders to ODL
25 ${json_to_edit} OperatingSystem.Get File ${SFF_FILE}
26 ${edited_json} Replace String ${json_to_edit} _SFF1 ${GBPSFC2}
27 ${edited_json} Replace String ${edited_json} _SFF2 ${GBPSFC4}
28 Add Elements To URI And Verify ${SFF_PATH} ${edited_json} ${HEADERS_YANG_JSON}
30 Wait For Manager and Switch Connected on GBPSFC2
31 [Documentation] Making sure that manager is connected for further processing.
32 SSHLibrary.Open Connection ${GBPSFC2}
33 SSHKeywords.Flexible Mininet Login
34 Wait Until Keyword Succeeds 2min 3s Manager and Switch Connected sw_name=sw2
35 SSHLibrary.Close Connection
37 Wait For Manager and Switch Connected on GBPSFC4
38 [Documentation] Making sure that manager is connected for further processing.
39 SSHLibrary.Open Connection ${GBPSFC4}
40 SSHKeywords.Flexible Mininet Login
41 Wait Until Keyword Succeeds 2min 3s Manager and Switch Connected sw_name=sw4
42 SSHLibrary.Close Connection
44 Put Service Function Chains
45 [Documentation] Register Service Function Chains to ODL
46 Add Elements To URI From File And Verify ${SFC_PATH} ${SFC_ASYMM_FILE} ${HEADERS_YANG_JSON}
48 Put Service Function Paths
49 [Documentation] Register Service Function Paths to ODL
50 Add Elements To URI From File And Verify ${SFP_PATH} ${SFP_ASYMM_FILE} ${HEADERS_YANG_JSON}
53 [Documentation] Send tunnel augmentation to ODL
54 ${json_to_edit} OperatingSystem.Get File ${TUNNELS_FILE}
55 ${edited_json} Replace String ${json_to_edit} _CLASSIFIER1 ${GBPSFC1}
56 ${edited_json} Replace String ${edited_json} _CLASSIFIER2 ${GBPSFC6}
57 Add Elements To URI And Verify ${TUNNELS_PATH} ${edited_json} ${HEADERS_YANG_JSON}
60 [Documentation] Send Tenant Data to ODL
61 Add Elements To URI From File And Verify ${TENANT_PATH} ${TENANT_ASYMM_FILE} ${HEADERS_YANG_JSON}
64 [Documentation] Endpoints registration
65 @{endpoint_files} OperatingSystem.List Files In Directory ${ENDPOINTS_ASYMM_DIR} vethl*.*json absolute
66 FOR ${endpoint_file} IN @{endpoint_files}
67 Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
69 ${resp} RequestsLibrary.Get Request session ${ENDPOINTS_OPER_PATH}