ee7f9525b87d9e8ff15679c29176fb89370606dd
[csit.git] / resources / test_data / honeycomb / acl.py
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 """Test variables for access control list test suite."""
15
16 # settings for acl tables
17 hc_acl_table = {
18     "name": "acl_table_test",
19     "nbuckets": 1,
20     "skip_n_vectors": 0,
21     "miss_next": "permit",
22     "mask": "00:00:00:00:00:00:ff:ff:ff:ff:ff:ff:00:00:00:00"
23 }
24
25 hc_acl_table2 = {
26     "name": "acl_table_test2",
27     "nbuckets": 2,
28     "skip_n_vectors": 1,
29     "next_table": "acl_table_test",
30     "miss_next": "deny",
31     "mask": "ff:ff:ff:00:00:00:ff:ff:ff:ff:ff:ff:00:00:00:00"
32 }
33 # representation of table settings in VAT
34 table_index = 0
35 vat_acl_table = {
36     "nbuckets": hc_acl_table['nbuckets'],
37     "skip": 0,
38     "match": 1,
39     "nextnode": -1,
40     "nexttbl": -1,
41     "mask": hc_acl_table['mask'].replace(":", ""),
42 }
43 table_index2 = 1
44 vat_acl_table2 = {
45     "nbuckets": hc_acl_table2['nbuckets'],
46     "skip": 1,
47     "match": 1,
48     "nextnode": 0,
49     "nexttbl": table_index,
50     "mask": hc_acl_table2['mask'].replace(":", ""),
51 }
52 # setting for acl sessions
53 hc_acl_session = {
54     "match": "00:00:00:00:00:00:01:02:03:04:05:06:00:00:00:00",
55     "hit_next": "permit",
56     "opaque_index": "1",
57     "advance": 1
58 }
59
60 hc_acl_session2 = {
61     "match": "00:00:00:00:00:00:06:05:04:03:02:01:00:00:00:00",
62     "hit_next": "deny",
63     "opaque_index": "2",
64     "advance": 1
65 }
66 # representation of session settings in VAT
67 session_index = 0
68 vat_acl_session = {
69     "match": hc_acl_session['match'].replace(":", ""),
70     "advance": hc_acl_session['advance'],
71     "opaque": 1,
72     "next_index": -1
73 }
74 session_index2 = 1
75 vat_acl_session2 = {
76     "match": hc_acl_session2['match'].replace(":", ""),
77     "advance": hc_acl_session2['advance'],
78     "opaque": 2,
79     "next_index": session_index
80 }