Cleaning robot repo + creating testplans
[integration/test.git] / test / csit / suites / l2switch / Host_Tracking_OF13 / 010__restconf_topo_nodes.txt
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           SSHLibrary
6 Library           Collections
7 Library           ../../../libraries/RequestsLibrary.py
8 Library           ../../../libraries/Common.py
9 Variables         ../../../variables/Variables.py
10
11 *** Variables ***
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
16 ${IP_1}           10.0.0.1
17 ${IP_2}           10.0.0.2
18 ${IP_3}           10.0.0.3
19
20 *** Test Cases ***
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}
32
33 Ping All
34     [Documentation]    Pingall, verify no packet loss
35     Write    pingall
36     ${result}    Read Until    mininet>
37     Should Contain    ${result}    0% dropped
38     Should Not Contain    ${result}    X
39     Sleep    3
40
41 Host Tracker
42     [Documentation]    Get the network topology,
43     ${resp}    Get    session    ${REST_TOPO}/topology/flow:1
44     Should Be Equal As Strings    ${resp.status_code}    200
45     Log    ${resp.content}
46     Should Contain X Times    ${resp.content}    "node-id":"host:${MAC_1}"    1
47     Should Contain X Times    ${resp.content}    "node-id":"host:${MAC_2}"    1
48     Should Contain X Times    ${resp.content}    "node-id":"host:${MAC_3}"    1
49
50 Check host are deleted
51     [Documentation]    Closing mininet this will remove the switch and the host should also be deleted
52     Log    closing mininet
53     write    exit
54     Read Until    >
55     sleep    5
56     ${resp}    Get    session    ${REST_TOPO}/topology/flow:1
57     Should Be Equal as Strings    ${resp.status_code}    200
58     Should not Contain    ${resp.content}    "node-id":"host
59     Log    ${resp.content}