Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
heyglen committed May 16, 2020
1 parent 70298d3 commit a1f920f
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 4 deletions.
45 changes: 42 additions & 3 deletions cisco-asa.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ variables:
(?:changeto)|
(?:class-map)|
(?:crypto)|
(?:dns\s+server-group)|
(?:enable)|
(?:group-policy)|
(?:hostname)|
Expand Down Expand Up @@ -76,7 +77,8 @@ variables:
(?:tftp-server)|
(?:timeout)|
(?:user-identity)|
(?:username)
(?:username)|
(?:vlan\s+\d+)
)
number_range_0_255: |
(?xi)
Expand Down Expand Up @@ -410,6 +412,7 @@ variables:
(?:domain)|
(?:ftp)|
(?:https)|
(?:isakmp)|
(?:kerberos)|
(?:ldaps)|
(?:ldap)|
Expand All @@ -419,14 +422,14 @@ variables:
(?:ntp)|
(?:rsh)|
(?:smtp)|
(?:telnet)|
(?:talk)|
(?:snmptrap)|
(?:snmp)|
(?:sqlnet)|
(?:ssh)|
(?:sunrpc)|
(?:syslog)|
(?:talk)|
(?:telnet)|
(?:www)
operators: >
(?:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
24 changes: 24 additions & 0 deletions cisco-ios.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions cisco/asa/asa.dns-server-group.sublime-completions
Original file line number Diff line number Diff line change
@@ -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}"
},
]
}

4 changes: 4 additions & 0 deletions cisco/asa/asa.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
]
}

9 changes: 8 additions & 1 deletion messages/2.38.0.md
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions tests/syntax_test_cisco_asa.cisco-asa
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions tests/syntax_test_cisco_ios.cisco-ios
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a1f920f

Please sign in to comment.