diff --git a/cisco-asa.sublime-syntax b/cisco-asa.sublime-syntax index d107ebc..3b1e2a6 100644 --- a/cisco-asa.sublime-syntax +++ b/cisco-asa.sublime-syntax @@ -45,6 +45,7 @@ variables: (?:changeto)| (?:class-map)| (?:crypto)| + (?:dns\s+server-group)| (?:enable)| (?:group-policy)| (?:hostname)| @@ -76,7 +77,8 @@ variables: (?:tftp-server)| (?:timeout)| (?:user-identity)| - (?:username) + (?:username)| + (?:vlan\s+\d+) ) number_range_0_255: | (?xi) @@ -410,6 +412,7 @@ variables: (?:domain)| (?:ftp)| (?:https)| + (?:isakmp)| (?:kerberos)| (?:ldaps)| (?:ldap)| @@ -419,14 +422,14 @@ variables: (?:ntp)| (?:rsh)| (?:smtp)| - (?:telnet)| - (?:talk)| (?:snmptrap)| (?:snmp)| (?:sqlnet)| (?:ssh)| (?:sunrpc)| (?:syslog)| + (?:talk)| + (?:telnet)| (?:www) operators: > (?: @@ -537,6 +540,7 @@ contexts: - include: aaa_server_host - include: treat_detection - include: enable_password + - include: dns_server_group - include: ssh_key_exchange - include: monitor_interface - include: protocol_settings @@ -947,6 +951,41 @@ contexts: captures: 1: comment.line + dns_server_group: + - match: | + (?xi) + ^\s* + (dns)\s+(server-group)\s+(\S+) + captures: + 0: cisco.scope + 1: variable.parameter + 2: support.constant + 3: string.unquoted + push: + - meta_content_scope: text.network.cisco.asa.dns-server-group + - include: dns_server_group_name_server + - include: dns_server_group_domain_name + - include: pop_on_configure_terminal_context + + dns_server_group_name_server: + - match: | + (?xi) + ^\s* + (name-server)((?:\s+{{ip}})+)(?:\s+(\S+))? + captures: + 1: support.constant + 2: constant.numeric.ip.ipv4.address + 3: entity.other.attribute-name + + dns_server_group_domain_name: + - match: | + (?xi) + ^\s* + (domain-name)\s+(\S+) + captures: + 1: support.constant + 2: string.unquoted + group_policy: - match: | (?xi) diff --git a/cisco-ios.sublime-syntax b/cisco-ios.sublime-syntax index 6152c52..d2e5233 100644 --- a/cisco-ios.sublime-syntax +++ b/cisco-ios.sublime-syntax @@ -1169,6 +1169,7 @@ contexts: - include: vlan - include: ip_http - include: ip_scp + - include: banner - include: ip_subnet_zero - include: ip_cef - include: aaa_session_id @@ -3571,6 +3572,29 @@ contexts: 19: support.constant # ipv6 autoconfig 20: constant.numeric.ip.ipv6.prefix # ipv6 ip + banner: + - match: | + (?xi) + ^\s* + (banner)\s+(login)\s+ + (\^?\S)([^\3]*) + captures: + 1: support.constant + 2: support.constant + 3: constant.language + 4: string.unquoted + 5: constant.language + embed: 'mutliline_text' + escape: (\3) + escape_captures: + 1: constant.language + + mutliline_text: + - meta_scope: multiline-text + - match: (.*) + captures: + 1: string.unquoted + errdisable: - include: errdisable_recovery_cause - include: errdisable_detect_cause diff --git a/cisco/asa/asa.dns-server-group.sublime-completions b/cisco/asa/asa.dns-server-group.sublime-completions new file mode 100644 index 0000000..7fb9853 --- /dev/null +++ b/cisco/asa/asa.dns-server-group.sublime-completions @@ -0,0 +1,14 @@ +{ + "scope": "text.network.cisco.asa.dns-server-group", + "completions": [ + { + "trigger": "name-server", + "contents": "name-server ${1:192.0.2.1}" + }, + { + "trigger": "domain-name", + "contents": "domain-name ${1:example.com}" + }, + ] +} + diff --git a/cisco/asa/asa.sublime-completions b/cisco/asa/asa.sublime-completions index 7ea26c2..60f6abc 100644 --- a/cisco/asa/asa.sublime-completions +++ b/cisco/asa/asa.sublime-completions @@ -21,6 +21,10 @@ "trigger": "group-policy\tattributes", "contents": "group-policy ${1:NAME} attributes\n\t" }, + { + "trigger": "dns\tserver-group", + "contents": "dns server-group ${1:NAME}\n\t" + }, ] } diff --git a/messages/2.38.0.md b/messages/2.38.0.md index 578afd5..54b0792 100644 --- a/messages/2.38.0.md +++ b/messages/2.38.0.md @@ -1,9 +1,16 @@ -# [2.38.0] - 2020.04.22 +# [2.38.0] - 2020.05.16 ## Added * Cisco ASA + * ACL port name "isakmp" added * Group Policy * vpn-tunnel-protocol + + * dns server-group + +* Cisco IOS + + * banner login \ No newline at end of file diff --git a/tests/syntax_test_cisco_asa.cisco-asa b/tests/syntax_test_cisco_asa.cisco-asa index eb06627..0cec1ac 100644 --- a/tests/syntax_test_cisco_asa.cisco-asa +++ b/tests/syntax_test_cisco_asa.cisco-asa @@ -51,6 +51,11 @@ aaa-server RADIUS protocol radius user-identity default-domain LOCAL crypto ipsec security-association pmtu-aging infinite +dns server-group NAME + name-server 192.0.2.1 + name-server 192.0.2.2 + domain-name example.com + vlan 1 name asdf exit diff --git a/tests/syntax_test_cisco_ios.cisco-ios b/tests/syntax_test_cisco_ios.cisco-ios index c1c558c..7c6b05f 100644 --- a/tests/syntax_test_cisco_ios.cisco-ios +++ b/tests/syntax_test_cisco_ios.cisco-ios @@ -28,6 +28,12 @@ username user password secret 5 $1$feb0$a104Qd9UZ./Ak00KTggPD0 username [ACCOUNT] privilege 15 secret [ACCOUNT_PASSWORD] +banner login ^C +****************** +LOGIN MESSAGE +****************** +^C + ! On router01 # device router02