e7a864e4730510cc8e6434a40baa68d4feeade8b
[csit.git] / tests / func / honeycomb / 080_access_control_lists.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Variables ***
15 # Interface to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17
18 *** Settings ***
19 | Resource | resources/libraries/robot/default.robot
20 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
21 | Resource | resources/libraries/robot/honeycomb/access_control_lists.robot
22 | Variables | resources/test_data/honeycomb/acl.py
23 | Suite Teardown | Run keywords
24 | ... | Run Keyword If Any Tests Failed
25 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
26 | ... | AND | Clear all ACL settings | ${node}
27 | Documentation | *Honeycomb access control lists test suite.*
28 | Force Tags | Honeycomb_sanity
29
30 *** Test Cases ***
31 | Honeycomb can create ACL classify table
32 | | [Documentation] | Check if Honeycomb API can create an ACL table.
33 | | Given ACL table from Honeycomb should not exist
34 | | ... | ${node} | ${hc_acl_table['name']}
35 | | And ACL table from VAT should not exist
36 | | ... | ${node} | ${table_index}
37 | | When Honeycomb creates ACL table
38 | | ... | ${node} | ${hc_acl_table}
39 | | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
40 | | And ACL table from VAT should be
41 | | ... | ${node} | ${table_index} | ${vat_acl_table}
42
43 | Honeycomb manages more than one ACL table
44 | | [Documentation] | Check if Honeycomb API can create another ACL table.
45 | | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
46 | | And ACL table from VAT should be
47 | | ... | ${node} | ${table_index} | ${vat_acl_table}
48 | | And Honeycomb creates ACL table | ${node} | ${hc_acl_table2}
49 | | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
50 | | And ACL table from VAT should be
51 | | ... | ${node} | ${table_index} | ${vat_acl_table}
52 | | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2}
53 | | And ACL table from VAT should be
54 | | ... | ${node} | ${table_index2} | ${vat_acl_table2}
55
56 | Honeycomb can add ACL session to table
57 | | [Documentation] | Check if Honeycomb API can add an ACL session to a table.
58 | | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
59 | | And ACL table from VAT should be
60 | | ... | ${node} | ${table_index} | ${vat_acl_table}
61 | | When Honeycomb adds ACL session
62 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
63 | | Then ACL session from Honeycomb should be
64 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
65 | | And ACL session from VAT should be
66 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
67
68 | Honeycomb manages more than one ACL session on one table
69 | | [Documentation] | Check if Honeycomb API can add another ACL session\
70 | | ... | to a table.
71 | | Given ACL session from Honeycomb should be
72 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
73 | | And ACL session from VAT should be
74 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
75 | | When Honeycomb adds ACL session
76 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2}
77 | | Then ACL session from Honeycomb should be
78 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
79 | | And ACL session from VAT should be
80 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
81 | | And ACL session from Honeycomb should be
82 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2}
83 | | And ACL session from VAT should be
84 | | ... | ${node} | ${table_index} | ${session_index2} | ${vat_acl_session2}
85
86 | Honeycomb enables ACL on interface
87 | | [Documentation] | Check if Honeycomb API can enable ACL on an interface.
88 | | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
89 | | And ACL table from VAT should be
90 | | ... | ${node} | ${table_index} | ${vat_acl_table}
91 | | And ACL session from Honeycomb should be
92 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
93 | | And ACL session from VAT should be
94 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
95 | | When Honeycomb enables ACL on interface
96 | | ... | ${node} | ${interface} | ${hc_acl_table['name']}
97 | | Then Interface ACL settings from Honeycomb should be
98 | | ... | ${node} | ${interface} | ${hc_acl_table['name']}
99 | | And Interface ACL settings from VAT should be
100 | | ... | ${node} | ${interface} | ${table_index}
101
102 | Honeycomb disables ACL on interface
103 | | [Documentation] | Check if Honeycomb API can disable ACL on an interface.
104 | | Given Interface ACL settings from Honeycomb should be
105 | | ... | ${node} | ${interface} | ${hc_acl_table['name']}
106 | | And Interface ACL settings from VAT should be
107 | | ... | ${node} | ${interface} | ${table_index}
108 | | When Honeycomb disables ACL on interface | ${node} | ${interface}
109 | | Then Interface ACL settings from Honeycomb should be empty
110 | | ... | ${node} | ${interface}
111 | | And Interface ACL settings from VAT should be empty
112 | | ... | ${node} | ${interface}
113
114 | Honeycomb can remove ACL session
115 | | [Documentation] | Check if Honeycomb API can remove an ACL session.
116 | | Given ACL session from Honeycomb should be
117 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
118 | | And ACL session from VAT should be
119 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
120 | | And ACL session from Honeycomb should be
121 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2}
122 | | And ACL session from VAT should be
123 | | ... | ${node} | ${table_index} | ${session_index2} | ${vat_acl_session2}
124 | | When Honeycomb removes ACL session
125 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2['match']}
126 | | Then ACL session from Honeycomb should be
127 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
128 | | And ACL session from VAT should be
129 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
130 | | And ACL session from Honeycomb should not exist
131 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2['match']}
132 | | And ACL session from VAT should not exist
133 | | ... | ${node} | ${table_index} | ${session_index2}
134
135 | Honeycomb can remove ACL table
136 | | [Documentation] | Check if Honeycomb API can delete an ACL table.
137 | | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
138 | | And ACL table from VAT should be
139 | | ... | ${node} | ${table_index} | ${vat_acl_table}
140 | | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2}
141 | | And ACL table from VAT should be
142 | | ... | ${node} | ${table_index2} | ${vat_acl_table2}
143 | | When Honeycomb removes ACL table | ${node} | ${hc_acl_table2['name']}
144 | | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
145 | | And ACL table from VAT should be
146 | | ... | ${node} | ${table_index} | ${vat_acl_table}
147 | | And ACL table from Honeycomb should not exist
148 | | ... | ${node} | ${hc_acl_table2['name']}
149 | | And ACL table from VAT should not exist
150 | | ... | ${node} | ${table_index2}