Skip to content

Commit

Permalink
enhance QoS with class shaping attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
gertzakis committed Oct 18, 2024
1 parent acc8f69 commit 9a02965
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ntc_templates/templates/cisco_ios_show_policy-map.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}$$
Expand Down
12 changes: 11 additions & 1 deletion tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -139,4 +148,5 @@ parsed_sample:
class_service_policy: ""
policy_map: "db-systems-abc_class"
class_shape_cir: ""
class_shape_account: ""
class_shape_account: ""
class_shape_rate_type: ""

Check failure on line 152 in tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map.yml

View workflow job for this annotation

GitHub Actions / yamllint

152:30 [new-line-at-end-of-file] no new line character at the end of file
19 changes: 18 additions & 1 deletion tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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: ""
Expand All @@ -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"
Expand All @@ -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: ""
Expand All @@ -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: ""
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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: ""
Expand All @@ -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: ""
Expand All @@ -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: ""
Expand All @@ -237,4 +253,5 @@ parsed_sample:
class_service_policy: ""
policy_map: "systems-m2m_class"
class_shape_cir: ""
class_shape_account: ""
class_shape_account: ""
class_shape_rate_type: ""

Check failure on line 257 in tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map2.yml

View workflow job for this annotation

GitHub Actions / yamllint

257:30 [new-line-at-end-of-file] no new line character at the end of file

0 comments on commit 9a02965

Please sign in to comment.