2 Documentation Test suite for Address in RESTCONF topology
3 Suite Setup Create Session session http://${CONTROLLER}:${PORT} auth=${AUTH} headers=${HEADERS_XML}
4 Suite Teardown Delete All Sessions
7 Library ../../../libraries/RequestsLibrary.py
8 Library ../../../libraries/Common.py
9 Variables ../../../variables/Variables.py
12 ${REST_TOPO} /restconf/operational/network-topology:network-topology
13 ${MAC_1} 00:00:00:00:00:01
14 ${MAC_2} 00:00:00:00:00:02
15 ${MAC_3} 00:00:00:00:00:03
21 Get list of host from network topology
22 [Documentation] Get the network topology, should not contain any host address
23 ${resp} Get session ${REST_TOPO}
24 Should Be Equal As Strings ${resp.status_code} 200
25 Should Contain ${resp.content} openflow:1
26 Should Contain ${resp.content} openflow:2
27 Should Contain ${resp.content} openflow:3
28 Should Contain X Times ${resp.content} link-id 4
29 Should Not Contain ${resp.content} ${MAC_1}
30 Should Not Contain ${resp.content} ${MAC_2}
31 Should Not Contain ${resp.content} ${MAC_3}
34 [Documentation] Pingall, verify no packet loss
37 ${result} Read Until mininet>
38 Should Contain ${result} 0% dropped
39 Should Not Contain ${result} X
43 [Documentation] Get the network topology,
44 ${resp} Get session ${REST_TOPO}/topology/flow:1
45 Should Be Equal As Strings ${resp.status_code} 200
47 Should Contain X Times ${resp.content} "node-id":"host:${MAC_1}" 1
48 Should Contain X Times ${resp.content} "node-id":"host:${MAC_2}" 1
49 Should Contain X Times ${resp.content} "node-id":"host:${MAC_3}" 1
51 Check host are deleted
52 [Documentation] Closing mininet this will remove the switch and the host should also be deleted
57 ${resp} Get session ${REST_TOPO}/topology/flow:1
58 Should Be Equal as Strings ${resp.status_code} 200
59 Should not Contain ${resp.content} "node-id":"host