CSIT-158: Tap interface tests
[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/access_control_lists.robot
21 | Variables | resources/test_data/honeycomb/acl.py
22 | Suite Teardown | Clear all ACL settings | ${node}
23 | Documentation | *Honeycomb access control lists test suite.*
24 | Force Tags | Honeycomb_sanity
25
26 *** Test Cases ***
27 | Honeycomb can create ACL classify table
28 | | [Documentation] | Check if Honeycomb API can create an ACL table.
29 | | Given ACL table from Honeycomb should not exist
30 | | ... | ${node} | ${hc_acl_table['name']}
31 | | And ACL table from VAT should not exist
32 | | ... | ${node} | ${table_index}
33 | | When Honeycomb creates ACL table
34 | | ... | ${node} | ${hc_acl_table}
35 | | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
36 | | And ACL table from VAT should be
37 | | ... | ${node} | ${table_index} | ${vat_acl_table}
38
39 | Honeycomb manages more than one ACL table
40 | | [Documentation] | Check if Honeycomb API can create another ACL table.
41 | | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
42 | | And ACL table from VAT should be
43 | | ... | ${node} | ${table_index} | ${vat_acl_table}
44 | | And Honeycomb creates ACL table | ${node} | ${hc_acl_table2}
45 | | Then 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 ACL table from Honeycomb should be | ${node} | ${hc_acl_table2}
49 | | And ACL table from VAT should be
50 | | ... | ${node} | ${table_index2} | ${vat_acl_table2}
51
52 | Honeycomb can add ACL session to table
53 | | [Documentation] | Check if Honeycomb API can add an ACL session to a table.
54 | | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
55 | | And ACL table from VAT should be
56 | | ... | ${node} | ${table_index} | ${vat_acl_table}
57 | | When Honeycomb adds ACL session
58 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
59 | | Then ACL session from Honeycomb should be
60 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
61 | | And ACL session from VAT should be
62 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
63
64 | Honeycomb manages more than one ACL session on one table
65 | | [Documentation] | Check if Honeycomb API can add another ACL session\
66 | | ... | to a table.
67 | | Given ACL session from Honeycomb should be
68 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
69 | | And ACL session from VAT should be
70 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
71 | | When Honeycomb adds ACL session
72 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2}
73 | | Then ACL session from Honeycomb should be
74 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
75 | | And ACL session from VAT should be
76 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
77 | | And ACL session from Honeycomb should be
78 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2}
79 | | And ACL session from VAT should be
80 | | ... | ${node} | ${table_index} | ${session_index2} | ${vat_acl_session2}
81
82 | Honeycomb enables ACL on interface
83 | | [Documentation] | Check if Honeycomb API can enable ACL on an interface.
84 | | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
85 | | And ACL table from VAT should be
86 | | ... | ${node} | ${table_index} | ${vat_acl_table}
87 | | And ACL session from Honeycomb should be
88 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
89 | | And ACL session from VAT should be
90 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
91 | | When Honeycomb enables ACL on interface
92 | | ... | ${node} | ${interface} | ${hc_acl_table['name']}
93 | | Then Interface ACL settings from Honeycomb should be
94 | | ... | ${node} | ${interface} | ${hc_acl_table['name']}
95 | | And Interface ACL settings from VAT should be
96 | | ... | ${node} | ${interface} | ${table_index}
97
98 | Honeycomb disables ACL on interface
99 | | [Documentation] | Check if Honeycomb API can disable ACL on an interface.
100 | | Given Interface ACL settings from Honeycomb should be
101 | | ... | ${node} | ${interface} | ${hc_acl_table['name']}
102 | | And Interface ACL settings from VAT should be
103 | | ... | ${node} | ${interface} | ${table_index}
104 | | When Honeycomb disables ACL on interface | ${node} | ${interface}
105 | | Then Interface ACL settings from Honeycomb should be empty
106 | | ... | ${node} | ${interface}
107 | | And Interface ACL settings from VAT should be empty
108 | | ... | ${node} | ${interface}
109
110 | Honeycomb can remove ACL session
111 | | [Documentation] | Check if Honeycomb API can remove an ACL session.
112 | | Given ACL session from Honeycomb should be
113 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
114 | | And ACL session from VAT should be
115 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
116 | | And ACL session from Honeycomb should be
117 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2}
118 | | And ACL session from VAT should be
119 | | ... | ${node} | ${table_index} | ${session_index2} | ${vat_acl_session2}
120 | | When Honeycomb removes ACL session
121 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2['match']}
122 | | Then ACL session from Honeycomb should be
123 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
124 | | And ACL session from VAT should be
125 | | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session}
126 | | And ACL session from Honeycomb should not exist
127 | | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2['match']}
128 | | And ACL session from VAT should not exist
129 | | ... | ${node} | ${table_index} | ${session_index2}
130
131 | Honeycomb can remove ACL table
132 | | [Documentation] | Check if Honeycomb API can delete an ACL table.
133 | | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
134 | | And ACL table from VAT should be
135 | | ... | ${node} | ${table_index} | ${vat_acl_table}
136 | | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2}
137 | | And ACL table from VAT should be
138 | | ... | ${node} | ${table_index2} | ${vat_acl_table2}
139 | | When Honeycomb removes ACL table | ${node} | ${hc_acl_table2['name']}
140 | | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table}
141 | | And ACL table from VAT should be
142 | | ... | ${node} | ${table_index} | ${vat_acl_table}
143 | | And ACL table from Honeycomb should not exist
144 | | ... | ${node} | ${hc_acl_table2['name']}
145 | | And ACL table from VAT should not exist
146 | | ... | ${node} | ${table_index2}