aboutsummaryrefslogtreecommitdiffstats
path: root/resources/test_data/honeycomb
diff options
context:
space:
mode:
authorjan.hradil <jan.hradil@pantheon.tech>2017-04-11 09:28:07 +0200
committerTibor Frank <tifrank@cisco.com>2017-04-25 09:31:18 +0000
commit2659bfa861fd129b22b4769a9ed402517ef3db44 (patch)
treed2f76a9167db3e100199dfd10d4eb32e3197d717 /resources/test_data/honeycomb
parentb4a288b19aa838825eff803207d1fedd82cb62f3 (diff)
CSIT-534 HC Test: policer tests
Added empty lines where needed Repaired Phrasese "Given" --> "And" where necessary in mgmt-cfg-policer-apihc-func.robot Corrected English in mgmt-cfg-policer-apihc-func.robot - in TC07 Documentation Change-Id: Id99d7fd04d8f2dcae1820baa208ce338fad3a290 Signed-off-by: jan.hradil <jan.hradil@pantheon.tech>
Diffstat (limited to 'resources/test_data/honeycomb')
-rw-r--r--resources/test_data/honeycomb/policer_variables.py146
1 files changed, 146 insertions, 0 deletions
diff --git a/resources/test_data/honeycomb/policer_variables.py b/resources/test_data/honeycomb/policer_variables.py
new file mode 100644
index 0000000000..6c6c9a575a
--- /dev/null
+++ b/resources/test_data/honeycomb/policer_variables.py
@@ -0,0 +1,146 @@
+# Copyright (c) 2017 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 Policer test suite."""
+
+
+def get_variables():
+ """Create and return a dictionary of test variables for the specified
+ test case.
+
+ :returns: Dictionary of test variables - settings for Honeycomb's Policer.
+ :rtype: dict
+ """
+ policer_data = {
+ "policer_data": {
+ "name": "policy1",
+ "cir": 450,
+ "cb": 50000,
+ "rate-type": "kbps",
+ "round-type": "closest",
+ "type": "1r2c",
+ "conform-action": {
+ "meter-action-type": "meter-action-transmit"
+ },
+ "exceed-action": {
+ "meter-action-type": "meter-action-drop"
+ }
+ },
+ "policer_data_oper": {
+ "name": "policy1",
+ "cir": 450,
+ "cb": 50000,
+ "rate-type": "kbps",
+ "round-type": "closest",
+ "type": "1r2c",
+ "conform-action": {
+ "meter-action-type": "policer:meter-action-transmit"
+ },
+ "exceed-action": {
+ "meter-action-type": "policer:meter-action-drop"
+ }
+ },
+ "policer_data_2": {
+ "name": "policy1",
+ "cir": 900,
+ "cb": 50000,
+ "rate-type": "kbps",
+ "round-type": "closest",
+ "type": "1r2c",
+ "conform-action": {
+ "meter-action-type": "meter-action-transmit"
+ },
+ "exceed-action": {
+ "meter-action-type": "meter-action-drop"
+ }
+ },
+ "policer_data_oper_2": {
+ "name": "policy1",
+ "cir": 900,
+ "cb": 50000,
+ "rate-type": "kbps",
+ "round-type": "closest",
+ "type": "1r2c",
+ "conform-action": {
+ "meter-action-type": "policer:meter-action-transmit"
+ },
+ "exceed-action": {
+ "meter-action-type": "policer:meter-action-drop"
+ }
+ },
+ "policer_data_3": {
+ "name": "policy1",
+ "cir": 100,
+ "eir": 150,
+ "cb": 200,
+ "eb": 300,
+ "rate-type": "pps",
+ "round-type": "closest",
+ "type": "2r3c-2698",
+ "conform-action": {
+ "meter-action-type": "meter-action-transmit"
+ },
+ "exceed-action": {
+ "meter-action-type": "meter-action-mark-dscp",
+ "dscp": "AF22"
+ },
+ "violate-action": {
+ "meter-action-type": "meter-action-drop"
+ },
+ "color-aware": True
+ },
+ "policer_data_oper_3": {
+ "name": "policy1",
+ "cir": 100,
+ "eir": 150,
+ "cb": 200,
+ "eb": 300,
+ "rate-type": "pps",
+ "round-type": "closest",
+ "type": "2r3c-2698",
+ "conform-action": {
+ "meter-action-type": "policer:meter-action-transmit"
+ },
+ "exceed-action": {
+ "meter-action-type": "policer:meter-action-mark-dscp",
+ },
+ "violate-action": {
+ "meter-action-type": "policer:meter-action-drop"
+ },
+ "color-aware": True
+ },
+
+ "acl_tables": {
+ # settings for policer tables
+ "hc_acl_table": {
+ "name": "table0",
+ "nbuckets": 2,
+ "memory_size": 1048576,
+ "skip_n_vectors": 12,
+ "miss_next": "permit",
+ "mask": "00:00:00:00:00:00:00:00:00:00:00:00:ff:ff:ff:ff"
+ },
+ # setting for acl sessions
+ "hc_acl_session": {
+ "match": "00:00:00:00:00:00:00:00:00:00:00:00:C0:A8:7A:01",
+ "policer_hit_next": "policy1",
+ "color_classfier": "exceed-color",
+ },
+ "hc_acl_session2": {
+ "match": "00:00:00:00:00:00:00:00:00:00:00:00:C0:A8:7A:02",
+ "policer_hit_next": "policy1",
+ "color_classfier": "exceed-color",
+ },
+ },
+ }
+ return policer_data