diff --git a/example-config.txt b/example-config.txt index 7a8cddf..81dc40d 100644 --- a/example-config.txt +++ b/example-config.txt @@ -321,6 +321,28 @@ no ip http secure-server ! snmp-server community cat RO snmp-server community test RO +snmp-server enable traps snmp authentication linkdown linkup coldstart warmstart +snmp-server enable traps ospf state-change if-state-change neighbor-state-change +snmp-server enable traps bgp state-changes all +snmp-server enable traps config-copy +snmp-server enable traps config +snmp-server enable traps isis state-change +snmp-server enable traps ipsla +snmp-server enable traps ether-oam +snmp-server enable traps memory bufferpeak +snmp-server enable traps entity-state +snmp-server enable traps entity +snmp-server enable traps cpu threshold +snmp-server enable traps rep +snmp-server enable traps entity-sensor +snmp-server enable traps resource-policy +snmp-server enable traps flash insertion +snmp-server enable traps flash removal +snmp-server enable traps mpls ldp session-up session-down +snmp-server enable traps pw vc +snmp-server enable traps bulkstat collection transfer +snmp-server enable traps mac-notification +snmp-server enable traps transceiver all no cdp log mismatch duplex ! ! diff --git a/example-result.json b/example-result.json index 6bd4a56..00a07ec 100644 --- a/example-result.json +++ b/example-result.json @@ -791,7 +791,7 @@ "match": { "type": "dscp", "value": [ - "af41" + "af41 " ] } }, @@ -801,7 +801,7 @@ "match": { "type": "dscp", "value": [ - "ef" + "ef " ] } }, @@ -811,7 +811,7 @@ "match": { "type": "dscp", "value": [ - "af32" + "af32 " ] } }, @@ -821,7 +821,7 @@ "match": { "type": "dscp", "value": [ - "af22" + "af22 " ] } }, @@ -831,7 +831,7 @@ "match": { "type": "dscp", "value": [ - "default" + "default " ] } }, @@ -841,7 +841,7 @@ "match": { "type": "dscp", "value": [ - "af11" + "af11 " ] } }, @@ -871,19 +871,28 @@ "match": { "type": "cos", "value": [ - "5" + "5 " ] } }, { "match_type": "any", "class_name": "CM-GROUP6", - "match": { - "type": "qos-group", - "value": [ - "6" - ] - } + "match": [ + { + "type": "qos-group", + "value": [ + "6" + ] + }, + { + "type": "dscp", + "value": [ + "cs6", + "cs7 " + ] + } + ] }, { "match_type": "all", @@ -891,7 +900,7 @@ "match": { "type": "cos", "value": [ - "4" + "4 " ] } }, @@ -901,7 +910,7 @@ "match": { "type": "cos", "value": [ - "3" + "3 " ] } }, @@ -911,7 +920,7 @@ "match": { "type": "cos", "value": [ - "2" + "2 " ] } }, @@ -931,7 +940,7 @@ "match": { "type": "cos", "value": [ - "1" + "1 " ] } }, @@ -951,7 +960,7 @@ "match": { "type": "cos", "value": [ - "0" + "0 " ] } }, @@ -988,7 +997,7 @@ { "type": "dscp", "value": [ - "cs4" + "cs4 " ] } ] @@ -1095,7 +1104,119 @@ }, { "community": "test", - "mode": "RO" + "mode": "RO", + "enabled_traps": [ + { + "traps": [ + "snmp authentication linkdown linkup coldstart warmstart" + ] + }, + { + "traps": [ + "ospf state-change if-state-change neighbor-state-change" + ] + }, + { + "traps": [ + "bgp state-changes all" + ] + }, + { + "traps": [ + "config-copy" + ] + }, + { + "traps": [ + "config" + ] + }, + { + "traps": [ + "isis state-change" + ] + }, + { + "traps": [ + "ipsla" + ] + }, + { + "traps": [ + "ether-oam" + ] + }, + { + "traps": [ + "memory bufferpeak" + ] + }, + { + "traps": [ + "entity-state" + ] + }, + { + "traps": [ + "entity" + ] + }, + { + "traps": [ + "cpu threshold" + ] + }, + { + "traps": [ + "rep" + ] + }, + { + "traps": [ + "entity-sensor" + ] + }, + { + "traps": [ + "resource-policy" + ] + }, + { + "traps": [ + "flash insertion" + ] + }, + { + "traps": [ + "flash removal" + ] + }, + { + "traps": [ + "mpls ldp session-up session-down" + ] + }, + { + "traps": [ + "pw vc" + ] + }, + { + "traps": [ + "bulkstat collection transfer" + ] + }, + { + "traps": [ + "mac-notification" + ] + }, + { + "traps": [ + "transceiver all" + ] + } + ] } ], "line": [ diff --git a/show_run.ttp b/show_run.ttp index 323f4a2..da68307 100644 --- a/show_run.ttp +++ b/show_run.ttp @@ -306,7 +306,7 @@ policy-map {{ policy_map | re(".+") | record(vrf) }} class-map match-{{match_type}} {{class_name}} - match {{type}} {{ value | unrange(rangechar='-', joinchar=' ' ) | split(' ') }} + match {{type}} {{ value | | re(".+") | unrange(rangechar='-', joinchar=' ' ) | split(' ') }}