2 Documentation Test suite to verify Inbound filtering functionality using manual policy
3 Suite Setup Setup SXP Environment 5
4 Suite Teardown Clean SXP Environment 5
5 Test Teardown Clean Nodes
6 Library RequestsLibrary
8 Library ../../../libraries/Sxp.py
9 Library ../../../libraries/Common.py
10 Resource ../../../libraries/SxpLib.robot
11 Resource ../../../libraries/WaitForFailure.robot
12 Resource ../../../libraries/SXP/FilteringResources.robot
18 [Documentation] Test ACL filter behaviour during filter update
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} policy=manual-update
26 Setup Topology Complex
27 Wait Until Keyword Succeeds 4 2 Check One Group 4-2
28 Delete Filter GROUP inbound
29 Verify Keyword Does Not Fail Within Timeout 4 1 Check One Group 4-2
31 ${entries} Get Filter Entry 10 permit acl=10.0.0.0,0.255.255.255
32 Add Filter GROUP inbound ${entries} policy=manual-update
34 Wait Until Keyword Succeeds 4 2 Check Two Group 4-2
35 Delete Filter GROUP inbound
36 Verify Keyword Does Not Fail Within Timeout 4 1 Check Two Group 4-2
38 ${entries} Get Filter Entry 10 deny acl=10.0.0.0,0.255.255.255
39 Add Filter GROUP inbound ${entries} policy=manual-update
41 Wait Until Keyword Succeeds 4 2 Check Three Group 4-2
43 Access List Sgt Filtering
44 [Documentation] Test ACL and SGT filter behaviour during filter update
46 ${peers} Add Peers 127.0.0.3 127.0.0.5
47 Add PeerGroup GROUP ${peers}
48 ${entry1} Get Filter Entry 10 permit sgt=30 acl=10.10.10.0,0.0.0.255
49 ${entry2} Get Filter Entry 20 permit sgt=50 acl=10.0.0.0,0.254.0.0
50 ${entries} Combine Strings ${entry1} ${entry2}
51 Add Filter GROUP inbound ${entries} policy=manual-update
52 Setup Topology Complex
53 Wait Until Keyword Succeeds 4 2 Check One Group 5-3
54 Delete Filter GROUP inbound
55 Verify Keyword Does Not Fail Within Timeout 4 1 Check One Group 5-3
57 ${entries} Get Filter Entry 10 permit esgt=20,40 acl=10.0.0.0,0.255.255.255
58 Add Filter GROUP inbound ${entries} policy=manual-update
60 Wait Until Keyword Succeeds 4 2 Check Two Group 5-3
63 [Documentation] Test Prefix List filter behaviour during filter update
65 ${peers} Add Peers 127.0.0.2 127.0.0.4
66 Add PeerGroup GROUP ${peers}
67 ${entry1} Get Filter Entry 10 permit pl=10.10.10.0/24
68 ${entry2} Get Filter Entry 20 permit epl=10.0.0.0/8,le,16
69 ${entries} Combine Strings ${entry1} ${entry2}
70 Add Filter GROUP inbound ${entries} policy=manual-update
71 Setup Topology Complex
72 Wait Until Keyword Succeeds 4 2 Check One Group 4-2
73 Delete Filter GROUP inbound
74 Verify Keyword Does Not Fail Within Timeout 4 1 Check One Group 4-2
76 ${entries} Get Filter Entry 10 permit pl=10.0.0.0/8
77 Add Filter GROUP inbound ${entries} policy=manual-update
79 Wait Until Keyword Succeeds 4 2 Check Two Group 4-2
80 Delete Filter GROUP inbound
81 Verify Keyword Does Not Fail Within Timeout 4 1 Check Two Group 4-2
83 ${entries} Get Filter Entry 10 deny pl=10.0.0.0/8
84 Add Filter GROUP inbound ${entries} policy=manual-update
86 Wait Until Keyword Succeeds 4 2 Check Three Group 4-2
88 Prefix List Sgt Filtering
89 [Documentation] Test Prefix List and SGT filter behaviour during filter update
91 ${peers} Add Peers 127.0.0.3 127.0.0.5
92 Add PeerGroup GROUP ${peers}
93 ${entry1} Get Filter Entry 10 permit sgt=30 pl=10.10.10.0/24
94 ${entry2} Get Filter Entry 20 permit pl=10.50.0.0/16
95 ${entries} Combine Strings ${entry1} ${entry2}
96 Add Filter GROUP inbound ${entries} policy=manual-update
97 Setup Topology Complex
98 Wait Until Keyword Succeeds 4 2 Check One Group 5-3
99 Delete Filter GROUP inbound
100 Verify Keyword Does Not Fail Within Timeout 4 1 Check One Group 5-3
102 ${entries} Get Filter Entry 10 permit esgt=20,40 pl=10.0.0.0/8
103 Add Filter GROUP inbound ${entries} policy=manual-update
105 Wait Until Keyword Succeeds 4 2 Check Two Group 5-3
109 [Arguments] ${version}=version4 ${PASSWORD}=none
110 [Documentation] Reconnect all peers connected to node containing filters
111 Clean Connections 127.0.0.1
112 FOR ${node} IN RANGE 2 6
113 Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1