diff --git a/ntc_templates/templates/cisco_ios_show_policy-map.textfsm b/ntc_templates/templates/cisco_ios_show_policy-map.textfsm new file mode 100644 index 0000000000..37e0e8b911 --- /dev/null +++ b/ntc_templates/templates/cisco_ios_show_policy-map.textfsm @@ -0,0 +1,34 @@ +Value Required,Filldown POLICY_MAP (\S+) +Value Required CLASS (\S+) +Value CLASS_BW_RATIO (\d+) +Value CLASS_BW_ACCOUNT (\d+) +Value CLASS_SERVICE_POLICY (\S+) +Value CLASS_QUEUE_LIMIT (\d+) +Value CLASS_POLICE_CIR (\d+) +Value CLASS_POLICE_BC (\d+) +Value CLASS_POLICE_ACTION_CONFORM (\S+) +Value CLASS_POLICE_ACTION_EXCEED (\S+) +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 + ^\s+Class\s\S+$$ -> Continue.Record + ^\s+bandwidth\sremaining\sratio\s${CLASS_BW_RATIO}\saccount\suser-defined\s${CLASS_BW_ACCOUNT}$$ + ^\s+service-policy\s${CLASS_SERVICE_POLICY}$$ + ^\s+queue-limit\s${CLASS_QUEUE_LIMIT}\sms$$ + ^\s+police\scir\s${CLASS_POLICE_CIR}\sbc\s${CLASS_POLICE_BC}$$ + ^\s+conform-action\s${CLASS_POLICE_ACTION_CONFORM}$$ + ^\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}$$ + ^[\S\s]*$$ + ^\s*$$ + ^. -> Error PolicyMap diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 2275b93311..2c44ccda18 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -310,6 +310,7 @@ cisco_ios_show_ap_summary.textfsm, .*, cisco_ios, sh[[ow]] ap sum[[mary]] cisco_ios_show_dhcp_lease.textfsm, .*, cisco_ios, sh[[ow]] dh[[cp]] l[[ease]] cisco_ios_show_interfaces.textfsm, .*, cisco_ios, sh[[ow]] int[[erfaces]](?: (?:\S+))? cisco_ios_show_ipv6_route.textfsm, .*, cisco_ios, sh[[ow]] ipv6 r[[oute]] +cisco_ios_show_policy-map.textfsm, .*, cisco_ios, sh[[ow]] pol[[icy-map]] cisco_ios_show_redundancy.textfsm, .*, cisco_ios, sh[[ow]] redu[[ndancy]] cisco_ios_show_snmp_group.textfsm, .*, cisco_ios, sh[[ow]] snm[[p]] g[[roup]] cisco_ios_show_vrf_detail.textfsm, .*, cisco_ios, sh[[ow]] vrf detail @@ -502,7 +503,7 @@ cisco_xr_show_bgp_instance_all_summary.textfsm, .*, cisco_xr, sh[[ow]] bg[[p]] i cisco_xr_admin_show_environment_power.textfsm, .*, cisco_xr, adm[[in]] sh[[ow]] env[[ironment]] p[[ower]] cisco_xr_show_dhcp_ipv4_proxy_binding.textfsm, .*, cisco_xr, sh[[ow]] dh[[cp]] ipv4 p[[roxy]] b[[inding]] cisco_xr_show_mpls_ldp_neighbor_brief.textfsm, .*, cisco_xr, sh[[ow]] mp[[ls]] ld[[p]] neigh[[bor]] br[[ief]] -cisco_xr_show_running-config_hostname.textfsm, .*, cisco_xr, sh[[ow]] run[[ning-config]] host[[name]] +cisco_xr_show_running-config_hostname.textfsm, .*, cisco_xr, sh[[ow]] run[[ning-config]] host[[name]] cisco_xr_show_interfaces_description.textfsm, .*, cisco_xr, sh[[ow]] int[[erfaces]](?: (?:\S+))? des[[cription]] cisco_xr_admin_show_environment_fan.textfsm, .*, cisco_xr, adm[[in]] sh[[ow]] env[[ironment]] f[[an]] cisco_xr_show_lldp_neighbors_detail.textfsm, .*, cisco_xr, sh[[ow]] ll[[dp]] ne[[ighbors]] de[[tail]] @@ -816,7 +817,7 @@ paloalto_panos_show_interface_management.textfsm, .*, paloalto_panos, sh[[ow]] i paloalto_panos_show_interface_hardware.textfsm, .*, paloalto_panos, sh[[ow]] int[[erface]] hard[[ware]] paloalto_panos_show_running_nat-policy.textfsm, .*, paloalto_panos, sh[[ow]] runn[[ing]] nat[[-policy]] paloalto_panos_show_interface_logical.textfsm, .*, paloalto_panos, sh[[ow]] int[[erface]] logi[[cal]] -paloalto_panos_request_license_info.textfsm, .*, paloalto_panos, request license info +paloalto_panos_request_license_info.textfsm, .*, paloalto_panos, request license info paloalto_panos_show_counter_global.textfsm, .*, paloalto_panos, sh[[ow]] coun[[ter]] glo[[bal]] paloalto_panos_debug_swm_status.textfsm, .*, paloalto_panos, de[[bug]] s[[wm]] status paloalto_panos_show_system_info.textfsm, .*, paloalto_panos, sh[[ow]] sys[[tem]] in[[fo]] diff --git a/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map.raw b/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map.raw new file mode 100644 index 0000000000..6ef4fe4c3e --- /dev/null +++ b/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map.raw @@ -0,0 +1,33 @@ + Policy Map vpn-bandwidths + Class internet-private + bandwidth remaining ratio 5 account user-defined 4 + service-policy internet-private_class + Class systems-m2m + bandwidth remaining ratio 5 account user-defined 4 + service-policy systems-m2m_class + Class internal-office + bandwidth remaining ratio 5 account user-defined 4 + service-policy internal-office_class + Class db-net-lst + bandwidth remaining ratio 5 account user-defined 4 + service-policy db-net-lst_class + Class db-systems-abc + bandwidth remaining ratio 5 account user-defined 4 + service-policy db-systems-abc_class + Class iot-systems + bandwidth remaining ratio 5 account user-defined 4 + service-policy iot-systems_class + Class class-default + bandwidth remaining ratio 6 account user-defined 4 + service-policy db-systems-net_class + + Policy Map db-systems-abc_class + Class premium + bandwidth remaining ratio 10 account user-defined 1 + queue-limit 50 ms + Class classic + bandwidth remaining ratio 20 account user-defined 2 + queue-limit 50 ms + Class class-default + bandwidth remaining ratio 60 account user-defined 3 + queue-limit 50 ms 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 new file mode 100644 index 0000000000..6a532b4591 --- /dev/null +++ b/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map.yml @@ -0,0 +1,152 @@ +--- +parsed_sample: + - class: "internet-private" + class_bw_account: "4" + class_bw_ratio: "5" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "internet-private_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "systems-m2m_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "internal-office_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "db-net-lst_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "db-systems-abc_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "iot-systems_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "db-systems-net_class" + policy_map: "vpn-bandwidths" + class_shape_cir: "" + class_shape_account: "" + class_shape_rate_type: "" + - class: "premium" + class_bw_account: "1" + class_bw_ratio: "10" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "50" + class_service_policy: "" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "50" + class_service_policy: "" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "50" + class_service_policy: "" + policy_map: "db-systems-abc_class" + class_shape_cir: "" + class_shape_account: "" + class_shape_rate_type: "" diff --git a/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map2.raw b/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map2.raw new file mode 100644 index 0000000000..3ab98bbeda --- /dev/null +++ b/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map2.raw @@ -0,0 +1,71 @@ + Policy Map vpn-bandwidths + Class db-internet-private + bandwidth remaining ratio 5 account user-defined 4 + service-policy db-internet-private_class + Class systems-m2m + bandwidth remaining ratio 5 account user-defined 4 + service-policy systems-m2m_class + Class internal-office + bandwidth remaining ratio 5 account user-defined 4 + service-policy internal-office_class + Class db-netz-lst + bandwidth remaining ratio 5 account user-defined 4 + service-policy db-net-list_class + Class db-systems-abc + bandwidth remaining ratio 5 account user-defined 4 + service-policy db-systems-abc_class + Class db-iot-konzern + bandwidth remaining ratio 5 account user-defined 4 + service-policy db-iot-konzern_class + Class class-default + bandwidth remaining ratio 6 account user-defined 4 + service-policy internal-systems-net_class + + Policy Map db-net-list_class + Class network + police cir 200000 bc 6250 + conform-action transmit + exceed-action drop + account user-defined 4 + priority level 2 + Class class-default + bandwidth remaining ratio 1 account user-defined 4 + queue-limit 50 ms + + Policy Map db-systems-abc_class + Class prioritaet + police cir 290000 bc 9062 + conform-action transmit + exceed-action drop + account user-defined 4 + priority level 1 + Class network + police cir 200000 bc 6250 + conform-action transmit + exceed-action drop + account user-defined 4 + priority level 2 + Class premium + bandwidth remaining ratio 10 account user-defined 4 + queue-limit 50 ms + Class classic + bandwidth remaining ratio 20 account user-defined 4 + queue-limit 50 ms + Class class-default + bandwidth remaining ratio 60 account user-defined 4 + queue-limit 50 ms + + Policy Map location-bandwidth + Class class-default + Average Rate Traffic Shaping + cir 3510000 (bps) account user-defined 4 + service-policy vpn-bandwidths + + Policy Map systems-m2m_class + Class network + police cir 200000 bc 6250 + conform-action transmit + exceed-action drop + account user-defined 4 + priority level 2 + Class class-default 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 new file mode 100644 index 0000000000..180ef41d01 --- /dev/null +++ b/tests/cisco_ios/show_policy-map/cisco_ios_show_policy-map2.yml @@ -0,0 +1,257 @@ +--- +parsed_sample: + - class: "db-internet-private" + class_bw_account: "4" + class_bw_ratio: "5" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "db-internet-private_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "systems-m2m_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "internal-office_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "db-net-list_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "db-systems-abc_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "db-iot-konzern_class" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "internal-systems-net_class" + policy_map: "vpn-bandwidths" + class_shape_cir: "" + class_shape_account: "" + class_shape_rate_type: "" + - class: "network" + class_bw_account: "" + class_bw_ratio: "" + class_police_account: "4" + class_police_action_conform: "transmit" + class_police_action_exceed: "drop" + class_police_bc: "6250" + class_police_cir: "200000" + class_police_priority: "2" + class_queue_limit: "" + class_service_policy: "" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "50" + class_service_policy: "" + policy_map: "db-net-list_class" + class_shape_cir: "" + class_shape_account: "" + class_shape_rate_type: "" + - class: "prioritaet" + class_bw_account: "" + class_bw_ratio: "" + class_police_account: "4" + class_police_action_conform: "transmit" + class_police_action_exceed: "drop" + class_police_bc: "9062" + class_police_cir: "290000" + class_police_priority: "1" + class_queue_limit: "" + class_service_policy: "" + policy_map: "db-systems-abc_class" + class_shape_cir: "" + class_shape_account: "" + class_shape_rate_type: "" + - class: "network" + class_bw_account: "" + class_bw_ratio: "" + class_police_account: "4" + class_police_action_conform: "transmit" + class_police_action_exceed: "drop" + class_police_bc: "6250" + class_police_cir: "200000" + class_police_priority: "2" + class_queue_limit: "" + class_service_policy: "" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "50" + class_service_policy: "" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "50" + class_service_policy: "" + 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" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "50" + class_service_policy: "" + 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: "" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "vpn-bandwidths" + policy_map: "location-bandwidth" + class_shape_cir: "3510000" + class_shape_account: "4" + class_shape_rate_type: "" + - class: "network" + class_bw_account: "" + class_bw_ratio: "" + class_police_account: "4" + class_police_action_conform: "transmit" + class_police_action_exceed: "drop" + class_police_bc: "6250" + class_police_cir: "200000" + class_police_priority: "2" + class_queue_limit: "" + class_service_policy: "" + policy_map: "systems-m2m_class" + class_shape_cir: "" + class_shape_account: "" + class_shape_rate_type: "" + - class: "class-default" + class_bw_account: "" + class_bw_ratio: "" + class_police_account: "" + class_police_action_conform: "" + class_police_action_exceed: "" + class_police_bc: "" + class_police_cir: "" + class_police_priority: "" + class_queue_limit: "" + class_service_policy: "" + policy_map: "systems-m2m_class" + class_shape_cir: "" + class_shape_account: "" + class_shape_rate_type: ""