New L2Switch suite to catch standing issues
[integration/test.git] / test / csit / suites / l2switch / Host_Tracking_OF13 / 010__restconf_topo_nodes.robot
1 *** Settings ***
2 Documentation     Test suite for Address in RESTCONF topology
3 Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
4 Suite Teardown    Delete All Sessions
5 Library           RequestsLibrary
6 Resource          ../../../libraries/Utils.txt
7 Variables         ../../../variables/Variables.py
8
9 *** Variables ***
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
13 ${IP_1}           10.0.0.1
14 ${IP_2}           10.0.0.2
15 ${IP_3}           10.0.0.3
16
17 *** Test Cases ***
18 Check Stats for node 1
19     [Documentation]    Get the stats for a node
20     Wait Until Keyword Succeeds    30s    2s    Check Nodes Stats    openflow:1
21
22 Check Stats for node 2
23     [Documentation]    Get the stats for a node
24     Wait Until Keyword Succeeds    30s    2s    Check Nodes Stats    openflow:2
25
26 Check Stats for node 3
27     [Documentation]    Get the stats for a node
28     Wait Until Keyword Succeeds    30s    2s    Check Nodes Stats    openflow:3
29
30 Check Switch Links
31     [Documentation]    Get the topology and check links
32     Wait Until Keyword Succeeds    30s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_TOPO_API}    link-id    4
33
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    30s    2s    Check For Elements Not At URI    ${OPERATIONAL_TOPO_API}    ${list}
38     Wait Until Keyword Succeeds    30s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_TOPO_API}    link-id    4
39
40 Ping All
41     [Documentation]    Pingall, verify no packet loss
42     Write    pingall
43     ${result}    Read Until    mininet>
44     Should Contain    ${result}    Results: 0% dropped
45
46 Check Host Links
47     [Documentation]    Get the topology and check links
48     Wait Until Keyword Succeeds    30s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_TOPO_API}    link-id    10
49
50 Host Tracker host1
51     [Documentation]    Get the network topology,
52     Wait Until Keyword Succeeds    30s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_TOPO_API}    "node-id":"host:${MAC_1}"    1
53
54 Host Tracker host2
55     [Documentation]    Get the network topology,
56     Wait Until Keyword Succeeds    30s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_TOPO_API}    "node-id":"host:${MAC_2}"    1
57
58 Host Tracker host3
59     [Documentation]    Get the network topology,
60     Wait Until Keyword Succeeds    30s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_TOPO_API}    "node-id":"host:${MAC_3}"    1