aboutsummaryrefslogtreecommitdiffstats
path: root/tests/honeycomb/func/mgmt-cfg-acl-apihc-apivat-func.robot
blob: 86e878804416f7372e429b86d77138d8f7d3c96d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

*** Variables ***
# Interface to run tests on.
| ${interface}= | ${node['interfaces']['port1']['name']}

*** Settings ***
| Resource | resources/libraries/robot/shared/default.robot
| Resource | resources/libraries/robot/honeycomb/honeycomb.robot
| Resource | resources/libraries/robot/honeycomb/access_control_lists.robot
| Variables | resources/test_data/honeycomb/acl.py
| ...
| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node}
| ...
| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
| ...
| Documentation | *Honeycomb access control lists test suite.*
| ...
| Force Tags | HC_FUNC

*** Test Cases ***
| TC01: Honeycomb can create ACL classify table
| | [Documentation] | Check if Honeycomb API can create an ACL table.
| | ...
| | Given ACL table from Honeycomb should not exist
| | ... | ${node} | ${hc_acl_table['name']}
| | And ACL table from VAT should not exist
| | ... | ${node} | ${table_index}
| | When Honeycomb creates ACL table
| | ... | ${node} | ${hc_acl_table}
| | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper}
| | And ACL table from VAT should be
| | ... | ${node} | ${table_index} | ${vat_acl_table}

| TC02: Honeycomb can remove ACL table
| | [Documentation] | Check if Honeycomb API can delete an ACL table.
| | ...
| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper}
| | And ACL table from VAT should be
| | ... | ${node} | ${table_index} | ${vat_acl_table}
| | When Honeycomb removes ACL table | ${node} | ${hc_acl_table['name']}
| | Then ACL table from Honeycomb should not exist
| | ... | ${node} | ${hc_acl_table['name']}
| | And ACL table from VAT should not exist
| | ... | ${node} | ${table_index}

| TC03: Honeycomb manages more than one ACL table
| | [Documentation] | Check if Honeycomb API can create another ACL table.
| | ...
| | Given ACL table from Honeycomb should not exist
| | ... | ${node} | ${hc_acl_table['name']}
| | And ACL table from VAT should not exist
| | ... | ${node} | ${table_index}
| | When Honeycomb creates ACL table | ${node} | ${hc_acl_table}
| | And Honeycomb creates ACL table | ${node} | ${hc_acl_table2}
| | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper}
| | And ACL table from VAT should be
| | ... | ${node} | ${table_index} | ${vat_acl_table}
| | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2_oper}
| | And ACL table from VAT should be
| | ... | ${node} | ${table_index2} | ${vat_acl_table2}

| TC04: Honeycomb can add ACL session to table
| | [Documentation] | Check if Honeycomb API can add an ACL session to a table.
| | ...
| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper}
| | And ACL table from VAT should be
| | ... | ${node} | ${table_index} | ${vat_acl_table}
| | When Honeycomb adds ACL session
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
| | Then ACL session from Honeycomb should be
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
| | And ACL session from PAPI should be
| | ... | ${node} | ${table_index} | ${vat_acl_session}

| TC05: Honeycomb can remove ACL session
| | [Documentation] | Check if Honeycomb API can remove an ACL session.
| | ...
| | Given ACL session from Honeycomb should be
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
| | And ACL session from PAPI should be
| | ... | ${node} | ${table_index} | ${vat_acl_session}
| | When Honeycomb removes ACL session
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session['match']}
| | Then ACL session from Honeycomb should not exist
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session['match']}
| | And ACL session from PAPI should not exist
| | ... | ${node} | ${table_index}

| TC06: Honeycomb manages more than one ACL session on one table
| | [Documentation] | Check if Honeycomb API can add another ACL session\
| | ... | to a table.
| | ...
| | Given ACL session from Honeycomb should not exist
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session['match']}
| | And ACL session from PAPI should not exist
| | ... | ${node} | ${table_index}
| | When Honeycomb adds ACL session
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
| | And Honeycomb adds ACL session
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2}
| | Then ACL session from Honeycomb should be
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
| | And ACL session from PAPI should be
| | ... | ${node} | ${table_index} | ${vat_acl_session}
| | And ACL session from Honeycomb should be
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2}
| | And ACL session from PAPI should be
| | ... | ${node} | ${table_index} | ${vat_acl_session2}

| TC07: Honeycomb enables ACL on interface
| | [Documentation] | Check if Honeycomb API can enable ACL on an interface.
| | ...
| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper}
| | And ACL table from VAT should be
| | ... | ${node} | ${table_index} | ${vat_acl_table}
| | And ACL session from Honeycomb should be
| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session}
| | And ACL session from PAPI should be
| | ... | ${node} | ${table_index} | ${vat_acl_session}
| | When Honeycomb enables ACL on interface
| | ... | ${node} | ${interface} | ${hc_acl_table['name']}
| | Then Interface ACL configuration from Honeycomb should be
| | ... | ${node} | ${interface} | ${hc_acl_table['name']}
| | And Interface ACL configuration from VAT should be
| | ... | ${node} | ${interface} | ${table_index}

| TC08: Honeycomb disables ACL on interface
| | [Documentation] | Check if Honeycomb API can disable ACL on an interface.
| | ...
| | Given Interface ACL configuration from Honeycomb should be
| | ... | ${node} | ${interface} | ${hc_acl_table['name']}
| | And Interface ACL configuration from VAT should be
| | ... | ${node} | ${interface} | ${table_index}
| | When Honeycomb disables ACL on interface | ${node} | ${interface}
| | Then Interface ACL configuration from Honeycomb should be empty
| | ... | ${node} | ${interface}
| | And Interface ACL configuration from VAT should be empty
| | ... | ${node} | ${interface}

| TC09: Honeycomb can remove one out of multiple ACL tables
| | [Documentation] | Check if Honeycomb API can delete an ACL table if more\
| | ... | than one table exists.
| | ...
| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper}
| | And ACL table from VAT should be
| | ... | ${node} | ${table_index} | ${vat_acl_table}
| | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2_oper}
| | And ACL table from VAT should be
| | ... | ${node} | ${table_index2} | ${vat_acl_table2}
| | When Honeycomb removes ACL table | ${node} | ${hc_acl_table2['name']}
| | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper}
| | And ACL table from VAT should be
| | ... | ${node} | ${table_index} | ${vat_acl_table}
| | And ACL table from Honeycomb should not exist
| | ... | ${node} | ${hc_acl_table2['name']}
| | And ACL table from VAT should not exist
| | ... | ${node} | ${table_index2}