aboutsummaryrefslogtreecommitdiffstats
path: root/tests/suites/honeycomb/resources/acl.py
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2016-07-12 16:19:05 +0200
committerSamuel Eliáš <samelias@cisco.com>2016-07-21 13:44:42 +0000
commit5d2ce55a8641a030ec6984089c51aa9313f46af1 (patch)
tree850db9abc3f1ca83a42c420eea158459fedd337c /tests/suites/honeycomb/resources/acl.py
parent80532e03b9d223407c4b9d2245449dbdc4c03c1b (diff)
CSIT-49: HC Test: Policy - security groups
- add test suite for ACLs - add keywords used in tests - add resource file with variables used in ACL tests - add methods and VAT templates for reading VPP ACL data Change-Id: I98c78bfbce67309ae33ebb05c04640f5029bf4e2 Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'tests/suites/honeycomb/resources/acl.py')
-rw-r--r--tests/suites/honeycomb/resources/acl.py82
1 files changed, 82 insertions, 0 deletions
diff --git a/tests/suites/honeycomb/resources/acl.py b/tests/suites/honeycomb/resources/acl.py
new file mode 100644
index 0000000000..227330c2a9
--- /dev/null
+++ b/tests/suites/honeycomb/resources/acl.py
@@ -0,0 +1,82 @@
+# Copyright (c) 2016 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.
+
+"""Test variables for access control list test suite."""
+
+# settings for acl tables
+hc_acl_table = {
+ "name": "acl_table_test",
+ "nbuckets": 1,
+ "memory_size": 100000,
+ "skip_n_vectors": 0,
+ "miss_next": "permit",
+ "mask": "00:00:00:00:00:00:ff:ff:ff:ff:ff:ff:00:00:00:00"
+}
+
+hc_acl_table2 = {
+ "name": "acl_table_test2",
+ "nbuckets": 2,
+ "memory_size": 100000,
+ "skip_n_vectors": 1,
+ "next_table": "acl_table_test",
+ "miss_next": "deny",
+ "mask": "ff:ff:ff:00:00:00:ff:ff:ff:ff:ff:ff:00:00:00:00"
+}
+# representation of table settings in VAT
+table_index = 0
+vat_acl_table = {
+ "nbuckets": hc_acl_table['nbuckets'],
+ "skip": 0,
+ "match": 1,
+ "nextnode": -1,
+ "nexttbl": -1,
+ "mask": hc_acl_table['mask'].replace(":", ""),
+}
+table_index2 = 1
+vat_acl_table2 = {
+ "nbuckets": hc_acl_table2['nbuckets'],
+ "skip": 1,
+ "match": 1,
+ "nextnode": 0,
+ "nexttbl": table_index,
+ "mask": hc_acl_table2['mask'].replace(":", ""),
+}
+# setting for acl sessions
+hc_acl_session = {
+ "match": "00:00:00:00:00:00:01:02:03:04:05:06:00:00:00:00",
+ "hit_next": "permit",
+ "opaque_index": "1",
+ "advance": 1
+}
+
+hc_acl_session2 = {
+ "match": "00:00:00:00:00:00:06:05:04:03:02:01:00:00:00:00",
+ "hit_next": "deny",
+ "opaque_index": "2",
+ "advance": 1
+}
+# representation of session settings in VAT
+session_index = 0
+vat_acl_session = {
+ "match": hc_acl_session['match'].replace(":", ""),
+ "advance": hc_acl_session['advance'],
+ "opaque": 1,
+ "next_index": -1
+}
+session_index2 = 1
+vat_acl_session2 = {
+ "match": hc_acl_session2['match'].replace(":", ""),
+ "advance": hc_acl_session2['advance'],
+ "opaque": 2,
+ "next_index": session_index
+}