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
14 Resource ../../../libraries/TemplatedRequests.robot
17 ${DEFAULT_LINUX_PROMPT} ${EMPTY}
18 ${Mininet1_IP} ${TOOLS_SYSTEM_IP}
19 ${Mininet2_IP} ${TOOLS_SYSTEM_2_IP}
20 ${UNI1_MAC} 68:5b:35:bb:f8:3e
21 ${UNI2_MAC} 52:7b:25:cb:a7:3c
22 ${Evc_topo_API} topology/unimgr:evc/link/evc:%2F%2F1
23 ${Uni_topo_API} topology/unimgr:uni/node/uni:%2F%2F
24 ${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 Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
35 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet2_IP} data=${uniDest}
37 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
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}
42 [Documentation] Update the Unis source and destenation speed
43 [Tags] UniMgr UNIs Speed
44 ${speedJson} OperatingSystem.Get File ${UniMgr_variables_DIR}/uni_speed.json
45 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet1_IP}/cl-unimgr-mef:speed data=${speedJson}
47 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
48 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet2_IP}/cl-unimgr-mef:speed data=${speedJson}
50 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
51 ${elements} Create List speed-10G
52 Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:uni/ ${elements}
54 Create EVC tunnel between the Unis
55 [Documentation] Create EVC between Unis
56 [Tags] UniMgr EVC Create
57 ${evc} Get Add Evc Json ${Mininet1_IP} ${Mininet2_IP}
58 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Evc_topo_API} data=${evc}
60 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
61 ${elements} Create List evc://1
62 Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:evc/ ${elements}
64 Update EVC Ingress and Egress Speed
65 [Documentation] Update the EVC connection Ingress and Egress Speed
66 [Tags] UniMgr EVC Speed
67 ${ingressJson} OperatingSystem.Get File ${UniMgr_variables_DIR}/evc_ingress_speed.json
68 ${egressJson} OperatingSystem.Get File ${UniMgr_variables_DIR}/evc_egress_speed.json
69 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Evc_topo_API}/cl-unimgr-mef:ingress-bw data=${ingressJson}
71 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
72 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Evc_topo_API}/cl-unimgr-mef:egress-bw data=${egressJson}
74 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
75 ${elements} Create List speed-1G
76 Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:evc/ ${elements}
78 Delete EVC tunnel between the Unis
79 [Documentation] Delete EVC
80 [Tags] UniMgr EVC Delete
81 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/${Evc_topo_API}
83 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
84 ${elements} Create List evc://1
85 Wait Until Keyword Succeeds 16s 2s Check For Elements Not At URI ${CONFIG_TOPO_API}/topology/unimgr:evc/ ${elements}
87 Delete UNIs source and destination
88 [Documentation] Delete both UNIs source and destination
89 [Tags] UniMgr UNI Delete
90 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet1_IP}
92 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
93 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet2_IP}
95 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
96 ${elements} Create List ${Mininet1_IP} ${Mininet2_IP}
97 Wait Until Keyword Succeeds 16s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:uni/ ${elements}