2 Documentation Test suite for all Uni Manager operations
3 Suite Setup Setup Unimgr Test Environment
4 Suite Teardown Delete All Sessions
5 Library OperatingSystem
9 Library RequestsLibrary
10 Library ../../../libraries/Common.py
11 Variables ../../../variables/Variables.py
12 Resource ../../../libraries/Utils.robot
13 Resource ../../../libraries/UnimgrKeywords.robot
16 ${DEFAULT_LINUX_PROMPT}
17 ${Mininet1_IP} ${TOOLS_SYSTEM_IP}
18 ${Mininet2_IP} ${TOOLS_SYSTEM_2_IP}
19 ${UNI1_MAC} 68:5b:35:bb:f8:3e
20 ${UNI2_MAC} 52:7b:25:cb:a7:3c
21 ${Evc_topo_API} topology/unimgr:evc/link/evc:%2F%2F1
22 ${Uni_topo_API} topology/unimgr:uni/node/uni:%2F%2F
23 ${UniMgr_variables_DIR} ${CURDIR}/../../../variables/unimgr
27 Create source and destination UNIs at the OVS instances using Restconf API
28 [Documentation] Create source and destination UNIs
29 [Tags] UniMgr UNIs Create
30 ${uniSource} Get Add Uni Json ${Mininet1_IP} ${UNI1_MAC}
31 ${uniDest} Get Add Uni Json ${Mininet2_IP} ${UNI2_MAC}
32 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet1_IP} data=${uniSource}
34 Should Be Equal As Strings ${resp.status_code} 200
35 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet2_IP} data=${uniDest}
37 Should Be Equal As Strings ${resp.status_code} 200
38 ${elements} Create List ${Mininet1_IP} ${Mininet2_IP}
39 Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:uni/ ${elements}
43 [Documentation] Update the Unis source and destenation speed
44 [Tags] UniMgr UNIs Speed
45 ${speedJson} OperatingSystem.Get File ${UniMgr_variables_DIR}/uni_speed.json
46 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet1_IP}/cl-unimgr-mef:speed data=${speedJson}
48 Should Be Equal As Strings ${resp.status_code} 200
49 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet2_IP}/cl-unimgr-mef:speed data=${speedJson}
51 Should Be Equal As Strings ${resp.status_code} 200
52 ${elements} Create List speed-10G
53 Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:uni/ ${elements}
56 Create EVC tunnel between the Unis
57 [Documentation] Create EVC between Unis
58 [Tags] UniMgr EVC Create
59 ${evc} Get Add Evc Json ${Mininet1_IP} ${Mininet2_IP}
60 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Evc_topo_API} data=${evc}
62 Should Be Equal As Strings ${resp.status_code} 200
63 ${elements} Create List evc://1
64 Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:evc/ ${elements}
66 Update EVC Ingress and Egress Speed
67 [Documentation] Update the EVC connection Ingress and Egress Speed
68 [Tags] UniMgr EVC Speed
69 ${ingressJson} OperatingSystem.Get File ${UniMgr_variables_DIR}/evc_ingress_speed.json
70 ${egressJson} OperatingSystem.Get File ${UniMgr_variables_DIR}/evc_egress_speed.json
71 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Evc_topo_API}/cl-unimgr-mef:ingress-bw data=${ingressJson}
73 Should Be Equal As Strings ${resp.status_code} 200
74 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Evc_topo_API}/cl-unimgr-mef:egress-bw data=${egressJson}
76 Should Be Equal As Strings ${resp.status_code} 200
77 ${elements} Create List speed-1G
78 Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:evc/ ${elements}
81 Delete EVC tunnel between the Unis
82 [Documentation] Delete EVC
83 [Tags] UniMgr EVC Delete
84 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/${Evc_topo_API}
86 Should Be Equal As Strings ${resp.status_code} 200
87 ${elements} Create List evc://1
88 Wait Until Keyword Succeeds 16s 2s Check For Elements Not At URI ${CONFIG_TOPO_API}/topology/unimgr:evc/ ${elements}
90 Delete UNIs source and destination
91 [Documentation] Delete both UNIs source and destination
92 [Tags] UniMgr UNI Delete
93 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet1_IP}
95 Should Be Equal As Strings ${resp.status_code} 200
96 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet2_IP}
98 Should Be Equal As Strings ${resp.status_code} 200
99 ${elements} Create List ${Mininet1_IP} ${Mininet2_IP}
100 Wait Until Keyword Succeeds 16s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:uni/ ${elements}