2 Documentation Test suite to verify Inbound filtering functionality using manual policy
4 Library RequestsLibrary
6 Library ../../../libraries/Sxp.py
7 Library ../../../libraries/Common.py
8 Resource ../../../libraries/SxpLib.robot
9 Resource ../../../libraries/WaitForFailure.robot
10 Resource ../../../libraries/SXP/FilteringResources.robot
12 Suite Setup Setup SXP Environment 5
13 Suite Teardown Clean SXP Environment 5
14 Test Teardown Clean Nodes
19 [Documentation] Test ACL filter behaviour during filter update
21 ${peers} Add Peers 127.0.0.2 127.0.0.4
22 Add PeerGroup GROUP ${peers}
23 ${entry1} Get Filter Entry 10 permit acl=10.10.10.0,0.0.0.255
24 ${entry2} Get Filter Entry 20 permit acl=10.0.0.0,0.254.0.0
25 ${entries} Combine Strings ${entry1} ${entry2}
26 Add Filter GROUP inbound ${entries} policy=manual-update
27 Setup Topology Complex
28 Wait Until Keyword Succeeds 4 2 Check One Group 4-2
29 Delete Filter GROUP inbound
30 Verify Keyword Does Not Fail Within Timeout 4 1 Check One Group 4-2
32 ${entries} Get Filter Entry 10 permit acl=10.0.0.0,0.255.255.255
33 Add Filter GROUP inbound ${entries} policy=manual-update
35 Wait Until Keyword Succeeds 4 2 Check Two Group 4-2
36 Delete Filter GROUP inbound
37 Verify Keyword Does Not Fail Within Timeout 4 1 Check Two Group 4-2
39 ${entries} Get Filter Entry 10 deny acl=10.0.0.0,0.255.255.255
40 Add Filter GROUP inbound ${entries} policy=manual-update
42 Wait Until Keyword Succeeds 4 2 Check Three Group 4-2
44 Access List Sgt Filtering
45 [Documentation] Test ACL and SGT filter behaviour during filter update
47 ${peers} Add Peers 127.0.0.3 127.0.0.5
48 Add PeerGroup GROUP ${peers}
49 ${entry1} Get Filter Entry 10 permit sgt=30 acl=10.10.10.0,0.0.0.255
50 ${entry2} Get Filter Entry 20 permit sgt=50 acl=10.0.0.0,0.254.0.0
51 ${entries} Combine Strings ${entry1} ${entry2}
52 Add Filter GROUP inbound ${entries} policy=manual-update
53 Setup Topology Complex
54 Wait Until Keyword Succeeds 4 2 Check One Group 5-3
55 Delete Filter GROUP inbound
56 Verify Keyword Does Not Fail Within Timeout 4 1 Check One Group 5-3
58 ${entries} Get Filter Entry 10 permit esgt=20,40 acl=10.0.0.0,0.255.255.255
59 Add Filter GROUP inbound ${entries} policy=manual-update
61 Wait Until Keyword Succeeds 4 2 Check Two Group 5-3
64 [Documentation] Test Prefix List filter behaviour during filter update
66 ${peers} Add Peers 127.0.0.2 127.0.0.4
67 Add PeerGroup GROUP ${peers}
68 ${entry1} Get Filter Entry 10 permit pl=10.10.10.0/24
69 ${entry2} Get Filter Entry 20 permit epl=10.0.0.0/8,le,16
70 ${entries} Combine Strings ${entry1} ${entry2}
71 Add Filter GROUP inbound ${entries} policy=manual-update
72 Setup Topology Complex
73 Wait Until Keyword Succeeds 4 2 Check One Group 4-2
74 Delete Filter GROUP inbound
75 Verify Keyword Does Not Fail Within Timeout 4 1 Check One Group 4-2
77 ${entries} Get Filter Entry 10 permit pl=10.0.0.0/8
78 Add Filter GROUP inbound ${entries} policy=manual-update
80 Wait Until Keyword Succeeds 4 2 Check Two Group 4-2
81 Delete Filter GROUP inbound
82 Verify Keyword Does Not Fail Within Timeout 4 1 Check Two Group 4-2
84 ${entries} Get Filter Entry 10 deny pl=10.0.0.0/8
85 Add Filter GROUP inbound ${entries} policy=manual-update
87 Wait Until Keyword Succeeds 4 2 Check Three Group 4-2
89 Prefix List Sgt Filtering
90 [Documentation] Test Prefix List and SGT filter behaviour during filter update
92 ${peers} Add Peers 127.0.0.3 127.0.0.5
93 Add PeerGroup GROUP ${peers}
94 ${entry1} Get Filter Entry 10 permit sgt=30 pl=10.10.10.0/24
95 ${entry2} Get Filter Entry 20 permit pl=10.50.0.0/16
96 ${entries} Combine Strings ${entry1} ${entry2}
97 Add Filter GROUP inbound ${entries} policy=manual-update
98 Setup Topology Complex
99 Wait Until Keyword Succeeds 4 2 Check One Group 5-3
100 Delete Filter GROUP inbound
101 Verify Keyword Does Not Fail Within Timeout 4 1 Check One Group 5-3
103 ${entries} Get Filter Entry 10 permit esgt=20,40 pl=10.0.0.0/8
104 Add Filter GROUP inbound ${entries} policy=manual-update
106 Wait Until Keyword Succeeds 4 2 Check Two Group 5-3
111 [Documentation] Reconnect all peers connected to node containing filters
112 [Arguments] ${version}=version4 ${PASSWORD}=none
113 Clean Connections 127.0.0.1
114 FOR ${node} IN RANGE 2 6
115 Add Connection ${version} both 127.0.0.${node} 64999 127.0.0.1