From 163021a073edb5c8e4ab61dbeef08fc732581e58 Mon Sep 17 00:00:00 2001 From: Glen Harmon Date: Thu, 24 May 2018 14:36:05 +0200 Subject: [PATCH] updates --- cisco-ios.sublime-syntax | 16 ++++++------ cisco-nxos.sublime-syntax | 33 +++++++++++++++++++------ messages/2.14.0.md | 19 ++++++++++++++ tests/syntax_test_cisco_nxos.cisco-nxos | 2 ++ 4 files changed, 55 insertions(+), 15 deletions(-) create mode 100644 messages/2.14.0.md diff --git a/cisco-ios.sublime-syntax b/cisco-ios.sublime-syntax index 3669907..4bfb3ca 100644 --- a/cisco-ios.sublime-syntax +++ b/cisco-ios.sublime-syntax @@ -1566,6 +1566,7 @@ contexts: (service)\s+ (?: (?:(password-encryption))| + (?:(nagle))| (?:(sequence-numbers))| (?:(tcp-keepalives-in))| (?:(tcp-keepalives-out))| @@ -1582,13 +1583,14 @@ contexts: captures: 1: support.constant # service 2: support.constant # password-encryption - 3: support.constant # sequence-numbers - 4: support.constant # tcp-keepalives-in - 5: support.constant # tcp-keepalives-out - 6: support.constant # timestamps - 7: support.constant # timestamps debug | log - 8: support.constant # timestamps datetime msec - 9: support.constant # timestamps localtime show-timezone + 3: support.constant # nagle + 4: support.constant # sequence-numbers + 5: support.constant # tcp-keepalives-in + 6: support.constant # tcp-keepalives-out + 7: support.constant # timestamps + 8: support.constant # timestamps debug | log + 9: support.constant # timestamps datetime msec + 10: support.constant # timestamps localtime show-timezone vlan: - match: '^\s*(vlan)\s+({{vlan_id}})' diff --git a/cisco-nxos.sublime-syntax b/cisco-nxos.sublime-syntax index 5576d71..52ce421 100644 --- a/cisco-nxos.sublime-syntax +++ b/cisco-nxos.sublime-syntax @@ -80,6 +80,7 @@ variables: (?:clock)| (?:copp)| (?:errdisable)| + (?:fabricpath)| (?:feature)| (?:hardware)| (?:hostname)| @@ -140,14 +141,16 @@ variables: (?xi) \s* (?: - (?:vrf) + (?:vrf)| + (?:{{configure_terminal_ctx_words}}) ) ospfv3_ctx_words: | (?xi) \s* (?: (?:vrf)| - (?:address-family) + (?:address-family)| + (?:{{configure_terminal_ctx_words}}) ) bgp_ctx_words: | (?xi) @@ -168,7 +171,8 @@ variables: (?:address-family)| (?:log-neighbor-changes)| (?:vrf)| - (?:template) + (?:template)| + (?:{{configure_terminal_ctx_words}}) ) interface_ctx_words: | (?xi) @@ -238,7 +242,8 @@ variables: (?:\d+)| (?:version) ) - ) + )| + (?:{{configure_terminal_ctx_words}}) ) subnet_mask: | (?xi) @@ -740,11 +745,12 @@ contexts: 7: constant.numeric # destination interface id logging: - - match: > + - match: | (?ix) - ^\s*(logging\s+server)\s+ - ({{ip}})\s+(\d+)(?:\s+(use-vrf)\s+(\S+))?(?:\s+(facility)\s+(\S+))? - captures: + ^\s* + (logging\s+server)\s+ + ({{ip}})\s+(\d+)(?:\s+(use-vrf)\s+(\S+))?(?:\s+(facility)\s+(\S+))? + capturees: 1: support.constant 2: constant.numeric 3: constant.numeric @@ -1175,6 +1181,15 @@ contexts: - include: bgp_ipv4_address_family - include: pop_on_bgp_context + bgp_address_family_settings: + - match: | + (?xi) + (?: + (?:(allowas-in)) + ) + captures: + 1: support.constant # allowas-in + bgp_ipv4_address_family: - match: ^\s*(address-family)\s+(ipv4)\s+(unicast) captures: @@ -1188,6 +1203,7 @@ contexts: pop: true captures: 1: comment.line + - include: bgp_address_family_settings - include: ipv4_network - include: bgp_ipv4_neighbor - include: bgp_peer_policy_settings @@ -1206,6 +1222,7 @@ contexts: pop: true captures: 1: comment.line + - include: bgp_address_family_settings - include: ipv6_network - include: bgp_ipv6_neighbor - include: bgp_peer_policy_settings diff --git a/messages/2.14.0.md b/messages/2.14.0.md new file mode 100644 index 0000000..49b0580 --- /dev/null +++ b/messages/2.14.0.md @@ -0,0 +1,19 @@ +# [2.14.0] - 2018-05-09 + +## Added + + - Cisco IOS + + - Highlighting + + - service nagle + +## Fixed + + - Cisco NXOS + + - Change to config-t on "fabricpath" keyword + + - BGP address-family ipv4|6 allowas-in + + - Change context bug in BGP and interface context \ No newline at end of file diff --git a/tests/syntax_test_cisco_nxos.cisco-nxos b/tests/syntax_test_cisco_nxos.cisco-nxos index 4b5ea23..fac773c 100644 --- a/tests/syntax_test_cisco_nxos.cisco-nxos +++ b/tests/syntax_test_cisco_nxos.cisco-nxos @@ -188,6 +188,7 @@ router bgp 1 neighbor 1.2.3.4 no shutdown address-family ipv4 unicast + allowas-in network 1.2.3.0/24 network 1.2.3.0/24 neighbor 1.2.3.4 @@ -199,6 +200,7 @@ router bgp 1 no shutdown route-map NAME out address-family ipv6 unicast + allowas-in neighbor :: inherit peer NAME inherit peer-session NAME