2 Documentation Test suite for Address in RESTCONF topology
3 Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
4 Suite Teardown Delete All Sessions
5 Library RequestsLibrary
6 Resource ../../../libraries/Utils.robot
7 Variables ../../../variables/Variables.py
10 ${MAC_1} 00:00:00:00:00:01
11 ${MAC_2} 00:00:00:00:00:02
12 ${MAC_3} 00:00:00:00:00:03
18 Check Stats for node 1
19 [Documentation] Get the stats for a node
20 Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:1
22 Check Stats for node 2
23 [Documentation] Get the stats for a node
24 Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:2
26 Check Stats for node 3
27 [Documentation] Get the stats for a node
28 Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:3
31 [Documentation] Get the topology and check links
32 Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} link-id 4
34 Check No Host Is Present
35 [Documentation] Get the network topology, should not contain any host address
36 @{list} Create List ${MAC_1} ${MAC_2} ${MAC_3}
37 Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
38 Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} link-id 4
41 [Documentation] Pingall, verify no packet loss
42 Wait Until Keyword Succeeds 10s 2s Ping All Works Good
45 [Documentation] Get the topology and check links
46 Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} link-id 10
49 [Documentation] Get the network topology, should contain host1 one time
50 Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} "node-id":"host:${MAC_1}" 1
53 [Documentation] Get the network topology, should contain host 2 one time
54 Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} "node-id":"host:${MAC_2}" 1
57 [Documentation] Get the network topology, should contain hos 3 one time
58 Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} "node-id":"host:${MAC_3}" 1
61 [Documentation] Take link s1-h1 down and verify host1 goes away
65 @{list} Create List "link-down":true
66 Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${list}
67 @{list} Create List ${MAC_1}
68 Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
71 [Documentation] Take link s1-h1 up and verify host1 comes back
75 @{list} Create List "link-down":false
76 Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${list}
79 Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} "node-id":"host:${MAC_1}" 1
82 [Documentation] Remove port s1-eth1 and verify host1 goes away
83 Write sh ovs-vsctl del-port s1 s1-eth1
85 @{list} Create List ${MAC_1}
86 Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
89 [Documentation] Add port s2-eth1 and verify host1 comes back
90 Write sh ovs-vsctl add-port s1 s1-eth1 -- set interface s1-eth1 ofport=1
92 @{list} Create List "link-down":false
93 Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${list}
96 Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} "node-id":"host:${MAC_1}" 1
101 ${result} Read Until mininet>
102 Should Contain ${result} Results: 0% dropped