GIT restructure - Adding project folders and features
[integration/test.git] / test / csit / suites / openflowplugin / Flows_OF13 / 324__ipv6_flow_label.txt
1 *** Settings ***
2 Documentation     Test suite for IPv6 Flow label and ICMP type
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           OperatingSystem
8 Library           ../../../libraries/RequestsLibrary.py
9 Library           ../../../libraries/Common.py
10 Variables         ../../../variables/Variables.py
11
12 *** Variables ***
13 ${REST_CON}       /restconf/config/opendaylight-inventory:nodes
14 ${REST_OPR}       /restconf/operational/opendaylight-inventory:nodes
15 ${FILE}           ${CURDIR}/../../../variables/xmls/f25.xml
16 ${FLOW}           148
17 ${TABLE}          2
18 @{FLOWELMENTS}    icmp6    metadata=0x3039    ipv6_src=1234:5678:9abc:def0:fdc0::/76    ipv6_dst=fe80:2acf:e9ff:fe21::/94    dec_ttl    ipv6_label=0x00021    nw_tos=240
19 ...               nw_ecn=3    icmp_type=6    icmp_code=3    # ipv6_dst=fe80:2acf:e9ff:fe21::/94
20
21 *** Test Cases ***
22 Add a flow - Output to physical port#
23     [Documentation]    Push a flow through REST-API
24     [Tags]    Push
25     ${body}    OperatingSystem.Get File    ${FILE}
26     Set Suite Variable    ${body}
27     ${resp}    Putxml    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    data=${body}
28     Should Be Equal As Strings    ${resp.status_code}    200
29
30 Verify after adding flow config - Output to physical port#
31     [Documentation]    Verify the flow
32     [Tags]    Get
33     ${resp}    get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
34     Should Be Equal As Strings    ${resp.status_code}    200
35     compare xml    ${body}    ${resp.content}
36
37 Verify flows after adding flow config on OVS
38     [Documentation]    Checking Flows on switch
39     [Tags]    Switch
40     sleep    1
41     write    dpctl dump-flows -O OpenFlow13
42     ${body}    OperatingSystem.Get File    ${FILE}
43     ${switchouput}    Read Until    >
44     : FOR    ${flowElement}    IN    @{FLOWELMENTS}
45     \    should Contain    ${switchouput}    ${flowElement}
46
47 Remove a flow - Output to physical port#
48     [Documentation]    Remove a flow
49     [Tags]    remove
50     ${resp}    Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
51     Should Be Equal As Strings    ${resp.status_code}    200
52
53 Verify after deleting flow config - Output to physical port#
54     [Documentation]    Verify the flow
55     [Tags]    Get
56     ${resp}    Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
57     Should Not Contain    ${resp.content}    ${FLOW}
58
59 Verify flows after deleting flow config on OVS
60     [Documentation]    Checking Flows on switch
61     [Tags]    Switch
62     Sleep    1
63     write    dpctl dump-flows -O OpenFlow13
64     ${body}    OperatingSystem.Get File    ${FILE}
65     ${switchouput}    Read Until    >
66     : FOR    ${flowElement}    IN    @{FLOWELMENTS}
67     \    should Not Contain    ${switchouput}    ${flowElement}