Skip to content

Commit

Permalink
2.40.0 -> 2.41.0
Browse files Browse the repository at this point in the history
  • Loading branch information
heyglen committed May 30, 2020
1 parent 9ebee0e commit 6cb5633
Show file tree
Hide file tree
Showing 9 changed files with 404 additions and 1 deletion.
182 changes: 182 additions & 0 deletions cisco-ios-xr.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ variables:
(?:line)|
(?:mpls\s+traffic-eng\s*$)|
(?:mpls\s+ldp\s*$)|
(?:object-group)|
(?:prefix-set)|
(?:route-policy\s+\S+(?:\s+\(.*\))?\s*$)|
(?:router)|
Expand Down Expand Up @@ -1271,6 +1272,24 @@ variables:
interface_number_ranged: |
(?xi)
(?:\d+(?:/\d+)*(?:\.\d+)?)(?:\s*-\s*\d+)?
port_names: |
(?xi)
(?:
(?:bgp)|
(?:bootps)|
(?:bootpc)|
(?:ssh)|
(?:ftp-data)|
(?:ftp)|
(?:domain)|
(?:ntp)|
(?:snmptrap)|
(?:syslog)|
(?:telnet)|
(?:tacacs)|
(?:isakmp)|
(?:snmp)
)
port_numbers: '(?:(?:[1-6]?\d{1,4}))'
operators: |
(?xi)
Expand Down Expand Up @@ -1487,6 +1506,7 @@ contexts:
- include: usergroup
- include: taskgroup
- include: mpls_traffic_eng_path_selection_ignore_overload
- include: object_group

device_comment:
- match: |
Expand Down Expand Up @@ -2184,6 +2204,168 @@ contexts:
29: constant.numeric
30: constant.numeric
object_group:
- include: object_group_network_ipv4
- include: object_group_network_ipv6
- include: object_group_port

object_group_port:
- match: |
(?xi)
^\s*(object-group)\s+(port)\s+(\S+)
captures:
0: cisco.scope
1: variable.parameter
2: support.constant
3: string.unquoted
push:
- meta_content_scope: text.network.cisco.object-group.port
- include: description
- include: object_group_object_group
- include: object_group_port_range
- include: object_group_port_number
- include: pop_on_configure_terminal_context
object_group_port_number:
- match: |
(?xi)
^\s*(
(?:eq)|
(?:lt)|
(?:gt)
)\s+
(?:
({{number_16_bit_wo_zero}})|
({{port_names}})
)
captures:
1: support.constant
2: constant.numeric
3: constant.language
object_group_port_range:
- match: |
(?xi)
^\s*(range)\s+
(?:
({{number_16_bit_wo_zero}})|
({{port_names}})
)
\s+
(?:
({{number_16_bit_wo_zero}})|
({{port_names}})
)
captures:
1: support.constant
2: constant.numeric
3: constant.language
4: constant.numeric
5: constant.language
object_group_network_ipv4:
- match: |
(?xi)
^\s*(object-group)\s+(network)\s+(ipv4)\s+(\S+)
captures:
0: cisco.scope
1: variable.parameter
2: support.constant
3: constant.language
4: string.unquoted
push:
- meta_content_scope: text.network.cisco.object-group.network.ipv4
- include: description
- include: object_group_host_ipv4
- include: object_group_network_ipv4_entry
- include: object_group_network_ipv4_range
- include: object_group_object_group
- include: pop_on_configure_terminal_context
object_group_network_ipv6:
- match: |
(?xi)
^\s*(object-group)\s+(network)\s+(ipv6)\s+(\S+)
captures:
0: cisco.scope
1: variable.parameter
2: support.constant
3: constant.language
4: string.unquoted
push:
- meta_content_scope: text.network.cisco.object-group.network.ipv6
- include: description
- include: object_group_host_ipv6
- include: object_group_object_group
- include: object_group_network_ipv6_entry
- include: object_group_network_ipv6_range
- include: pop_on_configure_terminal_context
object_group_host_ipv4:
- match: |
(?xi)
^\s*(host)\s+({{ip}})
captures:
1: support.constant
2: constant.numeric.ip.ipv4.address
object_group_network_ipv4_entry:
- match: |
(?xi)
^\s*
(?:
(?:({{ip_prefix}}))|
(?:({{ip}})\s+({{subnet_mask}}))
)
captures:
1: constant.numeric.ip.ipv4.prefix
2: constant.numeric.ip.ipv4.address
3: constant.numeric.network.ipv4.subnet_mask
object_group_network_ipv6_entry:
- match: |
(?xi)
^\s*({{ipv6_prefix}})
captures:
1: constant.numeric.ip.ipv6.prefix
object_group_object_group:
- match: |
(?xi)
^\s*(object-group)\s+(\S+)\s*$
captures:
1: support.constant
2: string.unquoted
object_group_network_ipv4_range:
- match: |
(?xi)
^\s*(range)\s+({{ip}})\s+({{ip}})
captures:
1: support.constant
2: constant.numeric.ip.ipv4.address
3: constant.numeric.ip.ipv4.address
object_group_network_ipv6_range:
- match: |
(?xi)
^\s*(range)\s+({{ipv6}})\s+({{ipv6}})
captures:
1: support.constant
2: constant.numeric.ip.ipv6.address
3: constant.numeric.ip.ipv6.address
object_group_host_ipv6:
- match: |
(?xi)
^\s*(host)\s+({{ipv6}})
captures:
1: support.constant
2: constant.numeric.ip.ipv6.address
usergroup:
- match: |
(?xi)
Expand Down
4 changes: 4 additions & 0 deletions cisco/ios_xr/ios-xr.configure_terminal.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@
"trigger": "clock\tsummer-time date (month, date, year)",
"contents": "clock summer-time ${1:GMT} date ${2:january} ${3:32} ${4:2020} ${5:20:30} ${6:january} ${7:32} ${8:2020} ${9:20:30}"
},
{
"trigger": "object-group\tnetwork ipv4",
"contents": "object-group network ipv4 ${1:NAME}\n\t$0\n"
},
"commit",
"cdp",
]
Expand Down
21 changes: 21 additions & 0 deletions cisco/ios_xr/ios-xr.object-group.network.ipv4.sublime-completions
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"scope": "text.network.cisco.ios_xr text.network.cisco.object-group.network.ipv4 & -(text.network.cisco.mpls | text.network.cisco.router | text.network.cisco.vrf | text.network.cisco.set | text.network.cisco.route_policy | text.network.cisco.interface)",
"completions": [
{
"trigger": "description",
"contents": "description ${1:DESCRIPTION}"
},
{
"trigger": "host",
"contents": "host ${1:192.0.2.1}"
},
{
"trigger": "range",
"contents": "range ${1:192.0.2.1} ${2:192.0.2.2}"
},
{
"trigger": "object-group",
"contents": "object-group ${1:NAME}"
},
]
}
21 changes: 21 additions & 0 deletions cisco/ios_xr/ios-xr.object-group.network.ipv6.sublime-completions
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"scope": "text.network.cisco.ios_xr text.network.cisco.object-group.network.ipv6 & -(text.network.cisco.mpls | text.network.cisco.router | text.network.cisco.vrf | text.network.cisco.set | text.network.cisco.route_policy | text.network.cisco.interface)",
"completions": [
{
"trigger": "description",
"contents": "description ${1:DESCRIPTION}"
},
{
"trigger": "host",
"contents": "host ${1:::1}"
},
{
"trigger": "range",
"contents": "range ${1:::1} ${2:::2}"
},
{
"trigger": "object-group",
"contents": "object-group ${1:NAME}"
},
]
}
29 changes: 29 additions & 0 deletions cisco/ios_xr/ios-xr.object-group.network.port.sublime-completions
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"scope": "text.network.cisco.ios_xr text.network.cisco.object-group.port & -(text.network.cisco.mpls | text.network.cisco.router | text.network.cisco.vrf | text.network.cisco.set | text.network.cisco.route_policy | text.network.cisco.interface)",
"completions": [
{
"trigger": "description",
"contents": "description ${1:DESCRIPTION}"
},
{
"trigger": "eq",
"contents": "eq ${1:22}"
},
{
"trigger": "lt",
"contents": "lt ${1:22}"
},
{
"trigger": "gt",
"contents": "gt ${1:22}"
},
{
"trigger": "range",
"contents": "range ${1:1} ${2:2}"
},
{
"trigger": "object-group",
"contents": "object-group ${1:NAME}"
},
]
}
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@
"2.38.1": "messages/2.38.1.md",
"2.38.2": "messages/2.38.2.md",
"2.39.0": "messages/2.39.0.md",
"2.40.0": "messages/2.40.0.md"
"2.40.0": "messages/2.40.0.md",
"2.41.0": "messages/2.41.0.md"
}
9 changes: 9 additions & 0 deletions messages/2.41.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [2.41.0] - 2020.05.30

## Added

### Cisco IOS-XR

* [#34](https://github.com/heyglen/network_tech/issues/34) object-group network ipv4 & ipv6

* [#34](https://github.com/heyglen/network_tech/issues/34) object-group port
29 changes: 29 additions & 0 deletions tests/syntax_test_cisco_ios_xr.cisco-ios-xr
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,35 @@ clock summer-time GMT date march 32 2020 20:00 april 32 2020 20:00
clock summer-time GMT recurring first 1 may 01:01 last 10 june 19:59
clock summer-time GMT recurring first 1 july 01:01 last 10 august 19:59 59

! https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k_r4-3/addr_serv/configuration/guide/b_ipaddr_cg43xa9k/b_ipaddr_cg42a9k_chapter_01.html#task_F1C9DD53BF954A92B7DAE9BF5AFF5545
object-group network ipv4 NAME
description DESCRIPTION
host 192.0.2.1
192.0.2.0 255.255.255.0
192.0.2.0/24
range 192.0.2.1 192.0.2.2
object-group NAME

object-group network ipv6 NAME
description DESCRIPTION
host ::1
2001::/2
range ::1 ::2
object-group NAME

object-group port NAME
description DESCRIPTION
object-group NAME
eq 65535
lt 1
gt ftp
range 1 65535
range ftp ftp-data

object-group network ipv6 NAME
host ::1


taskgroup NAME
description asdf
task read NAME
Expand Down
Loading

0 comments on commit 6cb5633

Please sign in to comment.