Update Robot Framework format - step 14
[integration/test.git] / csit / suites / sxp / filtering / 010_Inbound_Filtering.robot
1 *** Settings ***
2 Documentation       Test suite to verify Inbound filtering functionality
3
4 Library             RequestsLibrary
5 Library             SSHLibrary
6 Library             ../../../libraries/Sxp.py
7 Library             ../../../libraries/Common.py
8 Resource            ../../../libraries/SxpLib.robot
9 Resource            ../../../libraries/SXP/FilteringResources.robot
10
11 Suite Setup         Setup SXP Environment    5
12 Suite Teardown      Clean SXP Environment    5
13 Test Teardown       Clean Nodes
14
15
16 *** Test Cases ***
17 Access List Filtering
18     [Documentation]    Test ACL filter behaviour during filter update
19     [Tags]    sxp    filtering
20     ${peers}    Add Peers    127.0.0.2    127.0.0.4
21     Add PeerGroup    GROUP    ${peers}
22     ${entry1}    Get Filter Entry    10    permit    acl=10.10.10.0,0.0.0.255
23     ${entry2}    Get Filter Entry    20    permit    acl=10.0.0.0,0.254.0.0
24     ${entries}    Combine Strings    ${entry1}    ${entry2}
25     Add Filter    GROUP    inbound    ${entries}
26     Setup Topology Complex
27     Wait Until Keyword Succeeds    4    2    Check One Group 4-2
28     Delete Filter    GROUP    inbound
29     ${entries}    Get Filter Entry    10    permit    acl=10.0.0.0,0.255.255.255
30     Add Filter    GROUP    inbound    ${entries}
31     Wait Until Keyword Succeeds    4    2    Check Two Group 4-2
32     Delete Filter    GROUP    inbound
33     ${entries}    Get Filter Entry    10    deny    acl=10.0.0.0,0.255.255.255
34     Add Filter    GROUP    inbound    ${entries}
35     Wait Until Keyword Succeeds    4    2    Check Three Group 4-2
36
37 Access List Sgt Filtering
38     [Documentation]    Test ACL and SGT filter behaviour during filter update
39     [Tags]    sxp    filtering
40     ${peers}    Add Peers    127.0.0.3    127.0.0.5
41     Add PeerGroup    GROUP    ${peers}
42     ${entry1}    Get Filter Entry    10    permit    sgt=30    acl=10.10.10.0,0.0.0.255
43     ${entry2}    Get Filter Entry    20    permit    sgt=50    acl=10.0.0.0,0.254.0.0
44     ${entries}    Combine Strings    ${entry1}    ${entry2}
45     Add Filter    GROUP    inbound    ${entries}
46     Setup Topology Complex
47     Wait Until Keyword Succeeds    4    2    Check One Group 5-3
48     Delete Filter    GROUP    inbound
49     ${entries}    Get Filter Entry    10    permit    esgt=20,40    acl=10.0.0.0,0.255.255.255
50     Add Filter    GROUP    inbound    ${entries}
51     Wait Until Keyword Succeeds    4    2    Check Two Group 5-3
52
53 Prefix List Filtering
54     [Documentation]    Test Prefix List filter behaviour during filter update
55     [Tags]    sxp    filtering
56     ${peers}    Add Peers    127.0.0.2    127.0.0.4
57     Add PeerGroup    GROUP    ${peers}
58     ${entry1}    Get Filter Entry    10    permit    pl=10.10.10.0/24
59     ${entry2}    Get Filter Entry    20    permit    epl=10.0.0.0/8,le,16
60     ${entries}    Combine Strings    ${entry1}    ${entry2}
61     Add Filter    GROUP    inbound    ${entries}
62     Setup Topology Complex
63     Wait Until Keyword Succeeds    4    2    Check One Group 4-2
64     Delete Filter    GROUP    inbound
65     ${entries}    Get Filter Entry    10    permit    pl=10.0.0.0/8
66     Add Filter    GROUP    inbound    ${entries}
67     Wait Until Keyword Succeeds    4    2    Check Two Group 4-2
68     Delete Filter    GROUP    inbound
69     ${entries}    Get Filter Entry    10    deny    pl=10.0.0.0/8
70     Add Filter    GROUP    inbound    ${entries}
71     Wait Until Keyword Succeeds    4    2    Check Three Group 4-2
72
73 Prefix List Sgt Filtering
74     [Documentation]    Test Prefix List and SGT filter behaviour during filter update
75     [Tags]    sxp    filtering
76     ${peers}    Add Peers    127.0.0.3    127.0.0.5
77     Add PeerGroup    GROUP    ${peers}
78     ${entry1}    Get Filter Entry    10    permit    sgt=30    pl=10.10.10.0/24
79     ${entry2}    Get Filter Entry    20    permit    pl=10.50.0.0/16
80     ${entries}    Combine Strings    ${entry1}    ${entry2}
81     Add Filter    GROUP    inbound    ${entries}
82     Setup Topology Complex
83     Wait Until Keyword Succeeds    4    2    Check One Group 5-3
84     Delete Filter    GROUP    inbound
85     ${entries}    Get Filter Entry    10    permit    esgt=20,40    pl=10.0.0.0/8
86     Add Filter    GROUP    inbound    ${entries}
87     Wait Until Keyword Succeeds    4    2    Check Two Group 5-3