From 2659bfa861fd129b22b4769a9ed402517ef3db44 Mon Sep 17 00:00:00 2001 From: "jan.hradil" Date: Tue, 11 Apr 2017 09:28:07 +0200 Subject: 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 --- resources/test_data/honeycomb/policer_variables.py | 146 +++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 resources/test_data/honeycomb/policer_variables.py (limited to 'resources/test_data') 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 -- cgit 1.2.3-korg