From 9a029658c13cd7ec68d80f7911868d81e1f65a73 Mon Sep 17 00:00:00 2001 From: Gerasimos Tzakis Date: Fri, 18 Oct 2024 14:00:11 +0300 Subject: [PATCH] enhance QoS with class shaping attrs --- .../cisco_ios_show_policy-map.textfsm | 2 ++ .../cisco_ios_show_policy-map.yml | 12 +++++++++++- .../cisco_ios_show_policy-map2.yml | 19 ++++++++++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ntc_templates/templates/cisco_ios_show_policy-map.textfsm b/ntc_templates/templates/cisco_ios_show_policy-map.textfsm index 5b237c2017..9d5d84a657 100644 --- a/ntc_templates/templates/cisco_ios_show_policy-map.textfsm +++ b/ntc_templates/templates/cisco_ios_show_policy-map.textfsm @@ -12,6 +12,7 @@ Value CLASS_POLICE_ACCOUNT (\d+) Value CLASS_POLICE_PRIORITY (\d+) Value CLASS_SHAPE_CIR (\d+) Value CLASS_SHAPE_ACCOUNT (\d+) +Value CLASS_SHAPE_RATE_TYPE (\S+) Start ^\s+Policy\sMap\s\S+$$ -> Continue.Record @@ -24,6 +25,7 @@ Start ^\s+exceed-action\s${CLASS_POLICE_ACTION_EXCEED}$$ ^\s+account\suser-defined\s${CLASS_POLICE_ACCOUNT}$$ ^\s+priority\slevel\s${CLASS_POLICE_PRIORITY}$$ + ^\s+${CLASS_SHAPE_RATE_TYPE}\sRate\sTraffic\sShaping$$` ^\s+cir\s${CLASS_SHAPE_CIR}\s+\S+\s+account\suser-defined\s${CLASS_SHAPE_ACCOUNT}$$ ^\s+Policy\sMap\s${POLICY_MAP}$$ ^\s+Class\s${CLASS}$$ diff --git a/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map.yml b/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map.yml index 1630da2065..b0b835a5e8 100644 --- a/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map.yml +++ b/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map.yml @@ -14,6 +14,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "systems-m2m" class_bw_account: "4" class_bw_ratio: "5" @@ -28,6 +29,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "internal-office" class_bw_account: "4" class_bw_ratio: "5" @@ -42,6 +44,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "db-net-lst" class_bw_account: "4" class_bw_ratio: "5" @@ -56,6 +59,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "db-systems-abc" class_bw_account: "4" class_bw_ratio: "5" @@ -70,6 +74,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "iot-systems" class_bw_account: "4" class_bw_ratio: "5" @@ -84,6 +89,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "class-default" class_bw_account: "4" class_bw_ratio: "6" @@ -98,6 +104,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "premium" class_bw_account: "1" class_bw_ratio: "10" @@ -112,6 +119,7 @@ parsed_sample: policy_map: "db-systems-abc_class" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "classic" class_bw_account: "2" class_bw_ratio: "20" @@ -126,6 +134,7 @@ parsed_sample: policy_map: "db-systems-abc_class" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "class-default" class_bw_account: "3" class_bw_ratio: "60" @@ -139,4 +148,5 @@ parsed_sample: class_service_policy: "" policy_map: "db-systems-abc_class" class_shape_cir: "" - class_shape_account: "" \ No newline at end of file + class_shape_account: "" + class_shape_rate_type: "" \ No newline at end of file diff --git a/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map2.yml b/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map2.yml index 2b75866f56..ffe1d30cfa 100644 --- a/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map2.yml +++ b/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map2.yml @@ -14,6 +14,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "systems-m2m" class_bw_account: "4" class_bw_ratio: "5" @@ -28,6 +29,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "internal-office" class_bw_account: "4" class_bw_ratio: "5" @@ -42,6 +44,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "db-netz-lst" class_bw_account: "4" class_bw_ratio: "5" @@ -56,6 +59,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "db-systems-abc" class_bw_account: "4" class_bw_ratio: "5" @@ -70,6 +74,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "db-iot-konzern" class_bw_account: "4" class_bw_ratio: "5" @@ -84,6 +89,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "class-default" class_bw_account: "4" class_bw_ratio: "6" @@ -98,6 +104,7 @@ parsed_sample: policy_map: "vpn-bandwidths" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "network" class_bw_account: "" class_bw_ratio: "" @@ -112,6 +119,7 @@ parsed_sample: policy_map: "db-net-list_class" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "class-default" class_bw_account: "4" class_bw_ratio: "1" @@ -126,6 +134,7 @@ parsed_sample: policy_map: "db-net-list_class" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "prioritaet" class_bw_account: "" class_bw_ratio: "" @@ -140,6 +149,7 @@ parsed_sample: policy_map: "db-systems-abc_class" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "network" class_bw_account: "" class_bw_ratio: "" @@ -154,6 +164,7 @@ parsed_sample: policy_map: "db-systems-abc_class" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "premium" class_bw_account: "4" class_bw_ratio: "10" @@ -168,6 +179,7 @@ parsed_sample: policy_map: "db-systems-abc_class" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "classic" class_bw_account: "4" class_bw_ratio: "20" @@ -182,6 +194,7 @@ parsed_sample: policy_map: "db-systems-abc_class" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "class-default" class_bw_account: "4" class_bw_ratio: "60" @@ -196,6 +209,7 @@ parsed_sample: policy_map: "db-systems-abc_class" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "class-default" class_bw_account: "" class_bw_ratio: "" @@ -210,6 +224,7 @@ parsed_sample: policy_map: "location-bandwidth" class_shape_cir: "3510000" class_shape_account: "4" + class_shape_rate_type: "" - class: "network" class_bw_account: "" class_bw_ratio: "" @@ -224,6 +239,7 @@ parsed_sample: policy_map: "systems-m2m_class" class_shape_cir: "" class_shape_account: "" + class_shape_rate_type: "" - class: "class-default" class_bw_account: "" class_bw_ratio: "" @@ -237,4 +253,5 @@ parsed_sample: class_service_policy: "" policy_map: "systems-m2m_class" class_shape_cir: "" - class_shape_account: "" \ No newline at end of file + class_shape_account: "" + class_shape_rate_type: "" \ No newline at end of file