Replace deprecated variables in suites/openflowplugin (1).
[integration/test.git] / csit / suites / openflowplugin / Flows_OF13 / 315__timeout_vlan_pcp_vlan.robot
1 *** Settings ***
2 Documentation     Test suite for Time our values and Vlan and PCP Vlan
3 Suite Setup       Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
4 Suite Teardown    Delete All Sessions
5 Library           SSHLibrary
6 Library           Collections
7 Library           OperatingSystem
8 Library           RequestsLibrary
9 Library           ../../../libraries/Common.py
10 Variables         ../../../variables/Variables.py
11
12 *** Variables ***
13 ${REST_CON}       /restconf/config/opendaylight-inventory:nodes
14 ${FILE}           ${CURDIR}/../../../variables/xmls/f16.xml
15 ${FLOW}           139
16 ${TABLE}          2
17 @{FLOWELMENTS}    table=2    priority=16    dl_vlan=78    dl_vlan_pcp=3    dl_src=00:00:00:11:23:ae    dl_dst=ff:ff:29:01:19:61    dec_ttl
18
19 *** Test Cases ***
20 Add a flow - Output to physical port#
21     [Documentation]    Push a flow through REST-API
22     [Tags]    Push
23     ${body}    OperatingSystem.Get File    ${FILE}
24     Set Suite Variable    ${body}
25     ${resp}    RequestsLibrary.Put    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${HEADERS_XML}    data=${body}
26     Should Be Equal As Strings    ${resp.status_code}    200
27
28 Verify after adding flow config - Output to physical port#
29     [Documentation]    Verify the flow
30     [Tags]    Get
31     ${resp}    RequestsLibrary.Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}    headers=${ACCEPT_XML}
32     Should Be Equal As Strings    ${resp.status_code}    200
33     compare xml    ${body}    ${resp.content}
34
35 Verify flows after adding flow config on OVS
36     [Documentation]    Checking Flows on switch
37     [Tags]    Switch
38     sleep    1
39     write    dpctl dump-flows -O OpenFlow13
40     ${switchoutput}    Read Until    mininet>
41     : FOR    ${flowElement}    IN    @{FLOWELMENTS}
42     \    should Contain    ${switchoutput}    ${flowElement}
43
44 Remove a flow - Output to physical port#
45     [Documentation]    Remove a flow
46     [Tags]    remove
47     ${resp}    RequestsLibrary.Delete    session    ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
48     Should Be Equal As Strings    ${resp.status_code}    200
49
50 Verify after deleting flow config - Output to physical port#
51     [Documentation]    Verify the flow
52     [Tags]    Get
53     ${resp}    RequestsLibrary.Get    session    ${REST_CON}/node/openflow:1/table/${TABLE}
54     Should Not Contain    ${resp.content}    ${FLOW}
55
56 Verify flows after deleting flow config on OVS
57     [Documentation]    Checking Flows on switch
58     [Tags]    Switch
59     Sleep    1
60     write    dpctl dump-flows -O OpenFlow13
61     ${switchoutput}    Read Until    mininet>
62     : FOR    ${flowElement}    IN    @{FLOWELMENTS}
63     \    should Not Contain    ${switchoutput}    ${flowElement}