2 Documentation Test suite for setting up infrastructure for demo-asymmetric-chain
3 Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_YANG_JSON}
4 Suite Teardown Delete All Sessions
5 Library RequestsLibrary
6 Library OperatingSystem
7 Variables ../../../../../variables/Variables.py
8 Resource ../../../../../libraries/SSHKeywords.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}
27 Wait For Manager and Switch Connected on GBPSFC2
28 [Documentation] Making sure that manager is connected for further processing.
29 SSHLibrary.Open Connection ${GBPSFC2}
30 SSHKeywords.Flexible Mininet Login
31 Wait Until Keyword Succeeds 2min 3s Manager and Switch Connected sw_name=sw2
32 SSHLibrary.Close Connection
34 Wait For Manager and Switch Connected on GBPSFC4
35 [Documentation] Making sure that manager is connected for further processing.
36 SSHLibrary.Open Connection ${GBPSFC4}
37 SSHKeywords.Flexible Mininet Login
38 Wait Until Keyword Succeeds 2min 3s Manager and Switch Connected sw_name=sw4
39 SSHLibrary.Close Connection
41 Put Service Function Chains
42 [Documentation] Register Service Function Chains to ODL
43 Add Elements To URI From File And Verify ${SFC_PATH} ${SFC_ASYMM_FILE} ${HEADERS_YANG_JSON}
45 Put Service Function Paths
46 [Documentation] Register Service Function Paths to ODL
47 Add Elements To URI From File And Verify ${SFP_PATH} ${SFP_ASYMM_FILE} ${HEADERS_YANG_JSON}
50 [Documentation] Send tunnel augmentation to ODL
51 ${json_to_edit} OperatingSystem.Get File ${TUNNELS_FILE}
52 ${edited_json} Replace String ${json_to_edit} _CLASSIFIER1 ${GBPSFC1}
53 ${edited_json} Replace String ${edited_json} _CLASSIFIER2 ${GBPSFC6}
54 Add Elements To URI And Verify ${TUNNELS_PATH} ${edited_json} ${HEADERS_YANG_JSON}
57 [Documentation] Send Tenant Data to ODL
58 Add Elements To URI From File And Verify ${TENANT_PATH} ${TENANT_ASYMM_FILE} ${HEADERS_YANG_JSON}
61 [Documentation] Endpoints registration
62 @{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_ASYMM_DIR} vethl*.*json absolute
63 FOR ${endpoint_file} IN @{endpoint_files}
64 Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON}
66 ${resp} RequestsLibrary.Get Request session ${ENDPOINTS_OPER_PATH}