Skip to content

Commit

Permalink
2.45.0 -> 2.46.0
Browse files Browse the repository at this point in the history
  • Loading branch information
heyglen committed Jun 21, 2020
1 parent 35cda29 commit 38e7c4a
Show file tree
Hide file tree
Showing 5 changed files with 280 additions and 13 deletions.
245 changes: 236 additions & 9 deletions cisco-ios.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,121 @@ variables:
route_target: '\d+:\d+'
type_5_password: \S+
type_7_password: \S+
snmp_notification_types: |
(?xi)
(?:
(?:aaa\s+server)|
(?:adslline)|
(?:atm)|
(?:auth-framework)|
(?:authenticate-fail)|
(?:bgp)|
(?:bridge)|
(?:bstun)|
(?:bulkstat)|
(?:c6kxbar)|
(?:callhome)|
(?:calltracker)|
(?:casa)|
(?:ccme)|
(?:cef)|
(?:chassis)|
(?:cnpd)|
(?:config)|
(?:config-copy)|
(?:config-ctid)|
(?:cpu)|
(?:csg)|
(?:deauthenticate)|
(?:dhcp-snooping)|
(?:director)|
(?:disassociate)|
(?:dlsw)|
(?:dnis)|
(?:dot11-mibs)|
(?:dot11-qos)|
(?:dot1x)|
(?:ds1)|
(?:ds1-loopback)|
(?:dspu)|
(?:eigrp)|
(?:energywise)|
(?:entity)|
(?:entity-diag)|
(?:envmon)|
(?:errdisable)|
(?:ethernet-cfm)|
(?:event-manager)|
(?:firewall)|
(?:flash)|
(?:flexlinks)|
(?:flowmon)|
(?:frame-relay)|
(?:fru-ctrl)|
(?:hsrp)|
(?:icsudsu)|
(?:iplocalpool)|
(?:ipmobile)|
(?:ipmulticast)|
(?:ipsec)|
(?:isakmp)|
(?:isdn)|
(?:l2tc)|
(?:l2tun-pseudowire-status)|
(?:l2tun-session)|
(?:license)|
(?:llc2)|
(?:mac-notification)|
(?:memory)|
(?:module)|
(?:module-auto-shutdown)|
(?:mpls-fast-reroute)|
(?:mpls-ldp)|
(?:mpls-traffic-eng)|
(?:mpls-vpn)|
(?:msdp)|
(?:mvpn)|
(?:nhrp)|
(?:ospf)|
(?:p2mp-traffic-eng)|
(?:pim)|
(?:port-security)|
(?:power-ethernet)|
(?:public storm-control)|
(?:pw-vc)|
(?:repeater)|
(?:resource-policy)|
(?:rf)|
(?:rogue-ap)|
(?:rsrb)|
(?:rsvp)|
(?:rtr)|
(?:sdlc)|
(?:sdllc)|
(?:slb)|
(?:snmp)|
(?:sonet)|
(?:srp)|
(?:srst)|
(?:stpx)|
(?:stun)|
(?:switch-over)|
(?:syslog)|
(?:syslog)|
(?:tty)|
(?:udp-port)|
(?:vlan-mac-limit)|
(?:vlancreate)|
(?:vlandelete)|
(?:voice)|
(?:vrrp)|
(?:vsimaster)|
(?:vswitch)|
(?:vtp)|
(?:wlan-wep)|
(?:x25)|
(?:xgcp)
)
ascii_character: |
(?xi)
(?:[\x00-\x7F])
Expand Down Expand Up @@ -117,6 +232,23 @@ variables:
)
\b
)
number_range_0_42949671: |
(?xi)
(?:
\b
(?:
(?:4294967[0-1])|
(?:429496[0-6]\d)|
(?:42949[0-5]\d{2})|
(?:4294[0-8]\d{3})|
(?:429[0-3]\d{4})|
(?:42[0-8]\d{5})|
(?:4[0-1]\d{6})|
(?:[0-3]\d{7})|
(?:\d{1,7})
)
\b
)
number_range_1_1440: |
(?xi)
(?:
Expand Down Expand Up @@ -155,6 +287,17 @@ variables:
)
\b
)
number_range_1_100: |
(?xi)
(?:
\b
(?:
(?:100)|
(?:[1-9]\d)|
(?:[1-9])
)
\b
)
number_range_1_31: |
(?xi)
(?:
Expand Down Expand Up @@ -305,6 +448,27 @@ variables:
)
\b
)
number_32_bit_wo_zero: |
(?xi)
(?:
\b
(?:
(?:4294967295)|
(?:[0-3]\d{9})|
(?:4[0-1]\d{8})|
(?:42[0-8]\d{7})|
(?:429[0-3]\d{6})|
(?:4294[0-8]\d{5})|
(?:42949[0-5]\d{4})|
(?:429496[0-6]\d{3})|
(?:4294967[0-1]\d{2})|
(?:42949672[0-8]\d{1})|
(?:429496729[0-5])|
(?:\d{2,9})|
(?:[1-9])
)
\b
)
authentication_methods: |
(?xi)
(?:
Expand Down Expand Up @@ -1423,8 +1587,9 @@ contexts:
2: support.constant
snmp:
- include: snmp_trap
- include: snmp_host
- include: snmp_poll
- include: snmp_inform
- include: snmp_contact_location
- include: snmp_engine_id
- include: snmp_file_transfer_access_group
Expand Down Expand Up @@ -1591,7 +1756,7 @@ contexts:
16: constant.numeric # destination analysis-module data-port id
snmp_poll:
- match: >
- match: |
(?xi)
\s*
(snmp-server)\s+
Expand All @@ -1606,22 +1771,84 @@ contexts:
4: support.constant # RO / RW
5: string.unquoted # ACL value
snmp_trap:
snmp_inform:
- match: >
(?xi)
\s*
(snmp-server)\s+
(inform)
(?:\s+(pending)\s+({{number_32_bit_wo_zero}}))?
(?:\s+(retries)\s+({{number_range_1_100}}))?
(?:\s+(timeout)\s+({{number_range_0_42949671}}))?
captures:
1: support.constant
2: support.constant
3: support.constant
4: constant.numeric
5: support.constant
6: constant.numeric
7: support.constant
8: constant.numeric
snmp_host:
- match: >
(?xi)
\s*
(snmp-server)\s+
(host)\s+
({{ip}})\s+
(?:(version)\s+((?:1)|(?:2c))\s+)?
(?:
({{ip}})|
({{hostname}})
)
\s+
(?:
(?:(vrf)\s+(\S+))|
(?:(informs))|
(?:(traps))|
(?:
(version)\s+
(?:
(1)|
(2c)|
(?:
(3)\s+
(
(?:auth)|
(?:noauth)|
(?:priv)
)
)
)
)
)
\s+
(\S+)
(?:
\s+
(?:
(?:(udp-port)\s+({{port_numbers}})(?:\s+({{snmp_notification_types}}))?)|
({{snmp_notification_types}})
)
)?
captures:
1: support.constant # snmp-server
2: support.constant # host
3: constant.numeric.ip.ipv4.address # ip
4: support.constant # version
5: constant.numeric # version number
6: string.unquoted # trap community
3: constant.numeric.ip.ipv4.address
4: constant.language
5: support.constant
6: string.unquoted
7: support.constant
8: support.constant
9: support.constant
10: constant.language
11: constant.language
12: constant.language
13: entity.other.attribute-name
14: string.unquoted
15: support.constant
16: constant.numeric
17: entity.other.attribute-name
18: entity.other.attribute-name
hostname:
- match: ^\s*(hostname)\s*(\S+)
Expand Down
12 changes: 12 additions & 0 deletions cisco/ios/ios.configure_terminal.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@
"trigger": "snmp-server group\tv3 priv",
"contents": "snmp-server group ${1:NAME} v3 priv"
},
{
"trigger": "snmp-server inform\tpending",
"contents": "snmp-server inform pending ${1:25}"
},
{
"trigger": "snmp-server inform\tretries",
"contents": "snmp-server inform retries ${1:3}"
},
{
"trigger": "snmp-server inform\ttimeout",
"contents": "snmp-server inform timeout ${1:15}"
},
"end",
"exit",
]
Expand Down
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
"2.43.0": "messages/2.43.0.md",
"2.44.0": "messages/2.44.0.md",
"2.44.1": "messages/2.44.1.md",
"2.45.0": "messages/2.45.0.md"
"2.45.0": "messages/2.45.0.md",
"2.46.0": "messages/2.46.0.md"
}
9 changes: 9 additions & 0 deletions messages/2.46.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [2.46.0] - 2020.06.21

## Fixed

### Cisco IOS

* snmp-server host [#9](https://github.com/heyglen/network_tech/issues/9)

* snmp-server inform [#9](https://github.com/heyglen/network_tech/issues/9)
24 changes: 21 additions & 3 deletions tests/syntax_test_cisco_ios.cisco-ios
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ interface TwoGigabitEthernet1/0/1
service-policy input AutoQos-4.0-CiscoPhone-Input-Policy
service-policy output AutoQos-4.0-Output-Policy


interface range GigabitEthernet0
exit

Expand Down Expand Up @@ -602,15 +601,34 @@ route-map ROUTE_MAP_NAME permit 30

snmp-server community TEST RO 1
snmp-server host 1.2.3.4 version 2c TEST
snmp-server host 1.2.3.4 version 2c TEST
snmp-server host 1.2.3.4 version 3 auth TEST
snmp-server host 1.2.3.4 version 3 noauth TEST
snmp-server host 1.2.3.4 version 1 TEST udp-port 123 aaa server
snmp-server host 1.2.3.4 version 1 TEST cef
snmp-server host 1.2.3.4 version 1 TEST aaa server
snmp-server engineID local engineid-string
snmp-server file-transfer access-group NAME
snmp-server file-transfer access-group NAME protocol ftp
snmp-server file-transfer access-group NAME protocol scp
snmp-server file-transfer access-group NAME protocol rcp
snmp-server file-transfer access-group NAME protocol sftp
snmp-server file-transfer access-group NAME protocol tftp

snmp-server group NAME v1
snmp-server group NAME v2c
snmp-server group NAME v3 noauth
snmp-server group NAME v3 auth
snmp-server group NAME v3 priv
snmp-server group NAME v2c context NAME
snmp-server group NAME v2c context NAME read NAME
snmp-server group NAME v2c context NAME read NAME write NAME
snmp-server group NAME v2c context NAME read NAME write NAME notify NAME
snmp-server group NAME v2c context NAME read NAME write NAME notify NAME access ipv6 name
snmp-server group NAME v2c context NAME read NAME write NAME notify NAME access 99
snmp-server group NAME v2c context NAME read NAME write NAME notify NAME access name
snmp-server inform pending 25 retries 3 timeout 15
snmp-server inform pending 4294967295
snmp-server inform retries 100
snmp-server inform timeout 42949671

line con 0
stopbits 1
Expand Down

0 comments on commit 38e7c4a

Please sign in to comment.