cisco_node_utils 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -0
- data/README.md +8 -7
- data/docs/README-maintainers.md +0 -1
- data/lib/cisco_node_utils/aaa_authentication_login_service.rb +2 -2
- data/lib/cisco_node_utils/bgp.rb +2 -2
- data/lib/cisco_node_utils/cisco_cmn_utils.rb +16 -0
- data/lib/cisco_node_utils/client/utils.rb +7 -1
- data/lib/cisco_node_utils/cmd_ref/DEPRECATED.yaml +12 -12
- data/lib/cisco_node_utils/cmd_ref/README_YAML.md +35 -7
- data/lib/cisco_node_utils/cmd_ref/aaa_authorization_service.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/bfd_global.yaml +4 -4
- data/lib/cisco_node_utils/cmd_ref/bgp_af.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/bgp_neighbor_af.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/bridge_domain.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/bridge_domain_vni.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/dhcp_relay_global.yaml +5 -5
- data/lib/cisco_node_utils/cmd_ref/encapsulation.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/fabricpath.yaml +5 -5
- data/lib/cisco_node_utils/cmd_ref/fabricpath_topology.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/feature.yaml +8 -3
- data/lib/cisco_node_utils/cmd_ref/hsrp_global.yaml +25 -0
- data/lib/cisco_node_utils/cmd_ref/interface.yaml +65 -14
- data/lib/cisco_node_utils/cmd_ref/interface_hsrp_group.yaml +117 -0
- data/lib/cisco_node_utils/cmd_ref/interface_portchannel.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/interface_service_vni.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/inventory.yaml +4 -8
- data/lib/cisco_node_utils/cmd_ref/itd_device_group.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/itd_service.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/ospf.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/pim.yaml +6 -0
- data/lib/cisco_node_utils/cmd_ref/portchannel_global.yaml +9 -9
- data/lib/cisco_node_utils/cmd_ref/snmp_server.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/stp_global.yaml +8 -8
- data/lib/cisco_node_utils/cmd_ref/vdc.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/vlan.yaml +16 -8
- data/lib/cisco_node_utils/cmd_ref/vpc.yaml +11 -11
- data/lib/cisco_node_utils/cmd_ref/vrf.yaml +2 -1
- data/lib/cisco_node_utils/cmd_ref/vxlan_vtep.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/vxlan_vtep_vni.yaml +1 -1
- data/lib/cisco_node_utils/command_reference.rb +8 -1
- data/lib/cisco_node_utils/domain_name.rb +17 -2
- data/lib/cisco_node_utils/feature.rb +14 -0
- data/lib/cisco_node_utils/hsrp_global.rb +97 -0
- data/lib/cisco_node_utils/interface.rb +146 -0
- data/lib/cisco_node_utils/interface_hsrp_group.rb +544 -0
- data/lib/cisco_node_utils/node.rb +93 -4
- data/lib/cisco_node_utils/pim.rb +17 -0
- data/lib/cisco_node_utils/portchannel_global.rb +2 -2
- data/lib/cisco_node_utils/version.rb +1 -1
- data/lib/cisco_node_utils/vlan.rb +2 -5
- data/lib/cisco_node_utils/yum.rb +11 -6
- data/spec/schema.yaml +3 -3
- data/tests/ciscotest.rb +25 -4
- data/tests/cmd_config.yaml +0 -2
- data/tests/test_bgp_af.rb +13 -2
- data/tests/test_feature.rb +5 -0
- data/tests/test_hsrp_global.rb +79 -0
- data/tests/test_interface.rb +23 -0
- data/tests/test_interface_hsrp.rb +134 -0
- data/tests/test_interface_hsrp_group.rb +582 -0
- data/tests/test_node_ext.rb +7 -1
- data/tests/test_pim.rb +27 -3
- data/tests/test_platform.rb +1 -1
- data/tests/test_radius_global.rb +4 -5
- data/tests/test_radius_server.rb +16 -11
- data/tests/test_router_bgp.rb +11 -6
- data/tests/test_router_ospf_area.rb +6 -6
- data/tests/test_tacacs_server.rb +2 -2
- data/tests/test_tacacs_server_host.rb +2 -2
- data/tests/test_vlan.rb +14 -0
- data/tests/test_yum.rb +2 -2
- data/tests/yum_package.yaml +4 -0
- metadata +10 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a52015dedc4b7c5bf4c0124dced507351aecfbe1
|
4
|
+
data.tar.gz: 68b52a70c7478034e0a8ce9913e181bda17896bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 408c48ce5a0bf93fbcf5f5c10d24717561e475a03b8d6ca4fad6a49c4d237b6a20be6bfbdd4143deecec8a210a1916a7910efd29442ba13a9e67dde219f9070e
|
7
|
+
data.tar.gz: 4a436ce2bba7bdd3ecf5104a812605b0c3c7c557357c903574c48f018fcc938a8623c580732952b088689186ce77e26a8e4301c3399d970b84a00636a7b5fccd
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,34 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
## [v1.5.0]
|
5
|
+
|
6
|
+
### New feature support
|
7
|
+
* Drill down capability into structured table output using command reference yaml (@mikewiebe)
|
8
|
+
|
9
|
+
#### Cisco Resources
|
10
|
+
* Hot Standby Router Protocol
|
11
|
+
* hsrp_global (@saichint)
|
12
|
+
* interface_hsrp_group (@saichint)
|
13
|
+
|
14
|
+
### Added
|
15
|
+
|
16
|
+
* Extend interface with attributes:
|
17
|
+
* `hsrp_bfd`
|
18
|
+
* `hsrp_delay_minimum`
|
19
|
+
* `hsrp_delay_reload`
|
20
|
+
* `hsrp_mac_refresh`
|
21
|
+
* `hsrp_use_bia`
|
22
|
+
* `hsrp_version`
|
23
|
+
* `pim_bfd`
|
24
|
+
* Extend pim with attributes:
|
25
|
+
* `bfd`
|
26
|
+
* Added support for Cisco NX-OS software releases `7.3(0)F1(1)` and `8.0(1)`
|
27
|
+
|
28
|
+
### Changed
|
29
|
+
|
30
|
+
### Removed
|
31
|
+
|
4
32
|
## [v1.4.1]
|
5
33
|
|
6
34
|
### Added
|
@@ -51,6 +79,7 @@ Changelog
|
|
51
79
|
* `bfd`
|
52
80
|
* Extend bgp_neighbor with attributes:
|
53
81
|
* `bfd`
|
82
|
+
* Cisco Nexus 8xxx platform support added to existing classes
|
54
83
|
|
55
84
|
### Changed
|
56
85
|
* Deprecated `vlan` private-vlan properties and replaced with new methods. New file `vlan_DEPRECATED.rb` has been created to store the deprecated methods. The old -> new properties are:
|
@@ -368,6 +397,7 @@ Changelog
|
|
368
397
|
[git-flow]: https://github.com/petervanderdoes/gitflow-avh
|
369
398
|
[SimpleCov]: https://github.com/colszowka/simplecov
|
370
399
|
|
400
|
+
[v1.5.0]: https://github.com/cisco/cisco-network-node-utils/compare/v1.4.1...v1.5.0
|
371
401
|
[v1.4.1]: https://github.com/cisco/cisco-network-node-utils/compare/v1.4.0...v1.4.1
|
372
402
|
[v1.4.0]: https://github.com/cisco/cisco-network-node-utils/compare/v1.3.0...v1.4.0
|
373
403
|
[v1.3.0]: https://github.com/cisco/cisco-network-node-utils/compare/v1.2.0...v1.3.0
|
data/README.md
CHANGED
@@ -40,13 +40,14 @@ open source management tools.
|
|
40
40
|
|
41
41
|
This CiscoNodeUtils gem release supports the following:
|
42
42
|
|
43
|
-
Platform
|
44
|
-
|
45
|
-
Cisco Nexus N9k
|
46
|
-
Cisco Nexus N3k
|
47
|
-
Cisco Nexus N5k
|
48
|
-
Cisco Nexus N6k
|
49
|
-
Cisco Nexus N7k
|
43
|
+
Platform | OS | OS Version |
|
44
|
+
------------------|--------|----------------------|
|
45
|
+
Cisco Nexus N9k | NX-OS | 7.0(3)I2(1) and later
|
46
|
+
Cisco Nexus N3k | NX-OS | 7.0(3)I2(1) and later
|
47
|
+
Cisco Nexus N5k | NX-OS | 7.3(0)N1(1) and later
|
48
|
+
Cisco Nexus N6k | NX-OS | 7.3(0)N1(1) and later
|
49
|
+
Cisco Nexus N7k | NX-OS | 7.3(0)D1(1) and later
|
50
|
+
Cisco Nexus N9K-F | NX-OS | 7.0(3)F1(1) and later
|
50
51
|
|
51
52
|
Please note: For Cisco Nexus 3k and 9k platforms, a virtual Nexus N9000/N3000 may be helpful for development and testing. Users with a valid [cisco.com](http://cisco.com) user ID can obtain a copy of a virtual Nexus N9000/N3000 by sending their [cisco.com](http://cisco.com) user ID in an email to <get-n9kv@cisco.com>. If you do not have a [cisco.com](http://cisco.com) user ID please register for one at [https://tools.cisco.com/IDREG/guestRegistration](https://tools.cisco.com/IDREG/guestRegistration)
|
52
53
|
|
data/docs/README-maintainers.md
CHANGED
@@ -58,8 +58,8 @@ module Cisco
|
|
58
58
|
if g_str.empty?
|
59
59
|
# cannot remove default local, so do nothing in this case
|
60
60
|
unless m == :local
|
61
|
-
unless node.product_id[/
|
62
|
-
# TBD: These 'no' commands currently error on
|
61
|
+
unless node.product_id[/N9K-F/]
|
62
|
+
# TBD: These 'no' commands currently error on N9K-F
|
63
63
|
# no aaa authentication login console local
|
64
64
|
# no aaa authentication login console none
|
65
65
|
config_set('aaa_auth_login_service', 'method',
|
data/lib/cisco_node_utils/bgp.rb
CHANGED
@@ -513,7 +513,7 @@ module Cisco
|
|
513
513
|
|
514
514
|
def default_event_history_events
|
515
515
|
if Utils.image_version?(/7.0.3.I2|I3|I4/) ||
|
516
|
-
|
516
|
+
node.product_id[/(N5|N6|N7|N9.*-F)/]
|
517
517
|
config_get_default('bgp', 'event_history_events')
|
518
518
|
else
|
519
519
|
config_get('bgp', 'event_history_events_bytes', @get_args)
|
@@ -574,7 +574,7 @@ module Cisco
|
|
574
574
|
|
575
575
|
def default_event_history_periodic
|
576
576
|
if Utils.image_version?(/7.0.3.I2|I3|I4/) ||
|
577
|
-
|
577
|
+
node.product_id[/(N5|N6|N7|N9.*-F)/]
|
578
578
|
config_get_default('bgp', 'event_history_periodic')
|
579
579
|
else
|
580
580
|
config_get('bgp', 'event_history_periodic_bytes', @get_args)
|
@@ -360,5 +360,21 @@ module Cisco
|
|
360
360
|
end
|
361
361
|
merged
|
362
362
|
end # merge_range
|
363
|
+
|
364
|
+
# Add double quotes to string.
|
365
|
+
#
|
366
|
+
# Helper method to add a double quote to the beginning
|
367
|
+
# and end of a string.
|
368
|
+
#
|
369
|
+
# Nxapi adds an escape character to config lines that
|
370
|
+
# nvgen in this way in some but not all nxos releases.
|
371
|
+
#
|
372
|
+
# Input: String (Example 'foo')
|
373
|
+
# Returns: String with double quotes: (Example: '"foo"'
|
374
|
+
#
|
375
|
+
def self.add_quotes(string)
|
376
|
+
string = "\"#{string}\"" if image_version?(/8.0/)
|
377
|
+
string
|
378
|
+
end
|
363
379
|
end # class Utils
|
364
380
|
end # module Cisco
|
@@ -144,7 +144,13 @@ class Cisco::Client
|
|
144
144
|
fail "No match found for #{filter}" if data.length == 0
|
145
145
|
data = data[0]
|
146
146
|
else # data is array or hash
|
147
|
-
|
147
|
+
if data.is_a? Array
|
148
|
+
final = []
|
149
|
+
data.each do |row|
|
150
|
+
final << row[filter]
|
151
|
+
end
|
152
|
+
return final
|
153
|
+
end
|
148
154
|
fail "No key \"#{filter}\" in #{data}" if data[filter].nil?
|
149
155
|
data = data[filter]
|
150
156
|
end
|
@@ -17,7 +17,7 @@ private_vlan_any:
|
|
17
17
|
|
18
18
|
private_vlan_association:
|
19
19
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'pvlan_association'
|
20
|
-
_exclude: [
|
20
|
+
_exclude: [N9k-F]
|
21
21
|
multiple: true
|
22
22
|
get_command: "show vlan private-vlan"
|
23
23
|
get_context: ~
|
@@ -28,7 +28,7 @@ private_vlan_association:
|
|
28
28
|
|
29
29
|
private_vlan_mapping:
|
30
30
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'pvlan_mapping'
|
31
|
-
_exclude: [ios_xr,
|
31
|
+
_exclude: [ios_xr, N9k-F]
|
32
32
|
multiple: true
|
33
33
|
get_value: '/^private-vlan mapping (.*)$/'
|
34
34
|
set_value: "<state> private-vlan mapping <vlans>"
|
@@ -36,7 +36,7 @@ private_vlan_mapping:
|
|
36
36
|
|
37
37
|
private_vlan_type:
|
38
38
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'pvlan_type'
|
39
|
-
_exclude: [
|
39
|
+
_exclude: [N9k-F]
|
40
40
|
kind: string
|
41
41
|
get_command: 'show vlan private-vlan type'
|
42
42
|
get_context: ~
|
@@ -47,14 +47,14 @@ private_vlan_type:
|
|
47
47
|
|
48
48
|
switchport_mode_private_vlan_host:
|
49
49
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'switchport_pvlan_host'
|
50
|
-
_exclude: [ios_xr,
|
50
|
+
_exclude: [ios_xr, N9k-F]
|
51
51
|
get_value: '/^switchport mode private-vlan (.*)$/'
|
52
52
|
set_value: "<state> switchport mode private-vlan <mode>"
|
53
53
|
default_value: :disabled
|
54
54
|
|
55
55
|
switchport_mode_private_vlan_host_association:
|
56
56
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'switchport_pvlan_host_association'
|
57
|
-
_exclude: [ios_xr,
|
57
|
+
_exclude: [ios_xr, N9k-F]
|
58
58
|
multiple: true
|
59
59
|
get_value: '/^switchport private-vlan host-association (.*)$/'
|
60
60
|
set_value: "<state> switchport private-vlan host-association <vlan_pr> <vlan_sec>"
|
@@ -62,7 +62,7 @@ switchport_mode_private_vlan_host_association:
|
|
62
62
|
|
63
63
|
switchport_mode_private_vlan_host_promiscous:
|
64
64
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'switchport_pvlan_promiscuous'
|
65
|
-
_exclude: [ios_xr,
|
65
|
+
_exclude: [ios_xr, N9k-F]
|
66
66
|
multiple: true
|
67
67
|
get_value: '/^switchport private-vlan mapping (\d+.*)$/'
|
68
68
|
set_value: "<state> switchport private-vlan mapping <vlan_pr> <vlans>"
|
@@ -70,7 +70,7 @@ switchport_mode_private_vlan_host_promiscous:
|
|
70
70
|
|
71
71
|
switchport_mode_private_vlan_trunk_promiscuous:
|
72
72
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'switchport_pvlan_trunk_promiscuous'
|
73
|
-
_exclude: [ios_xr, N3k,
|
73
|
+
_exclude: [ios_xr, N3k, N9k-F]
|
74
74
|
kind: boolean
|
75
75
|
get_value: '/^switchport mode private-vlan trunk promiscuous$/'
|
76
76
|
set_value: "<state> switchport mode private-vlan trunk promiscuous"
|
@@ -78,7 +78,7 @@ switchport_mode_private_vlan_trunk_promiscuous:
|
|
78
78
|
|
79
79
|
switchport_mode_private_vlan_trunk_secondary:
|
80
80
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'switchport_pvlan_trunk_secondary'
|
81
|
-
_exclude: [ios_xr, N3k,
|
81
|
+
_exclude: [ios_xr, N3k, N9k-F]
|
82
82
|
kind: boolean
|
83
83
|
get_value: '/^switchport mode private-vlan trunk secondary$/'
|
84
84
|
set_value: "<state> switchport mode private-vlan trunk secondary"
|
@@ -86,7 +86,7 @@ switchport_mode_private_vlan_trunk_secondary:
|
|
86
86
|
|
87
87
|
switchport_private_vlan_association_trunk:
|
88
88
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'switchport_pvlan_trunk_association'
|
89
|
-
_exclude: [ios_xr, N3k,
|
89
|
+
_exclude: [ios_xr, N3k, N9k-F]
|
90
90
|
multiple: true
|
91
91
|
#get_value: '/^switchport private-vlan association trunk (.*) (.*)$/'
|
92
92
|
get_value: '/^switchport private-vlan association trunk (.*)$/'
|
@@ -95,7 +95,7 @@ switchport_private_vlan_association_trunk:
|
|
95
95
|
|
96
96
|
switchport_private_vlan_mapping_trunk:
|
97
97
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'switchport_pvlan_mapping_trunk'
|
98
|
-
_exclude: [ios_xr, N3k,
|
98
|
+
_exclude: [ios_xr, N3k, N9k-F]
|
99
99
|
multiple: true
|
100
100
|
get_value: '/^switchport private-vlan mapping trunk (.*)$/'
|
101
101
|
set_value: "<state> switchport private-vlan mapping trunk <vlan_pr> <vlans>"
|
@@ -103,7 +103,7 @@ switchport_private_vlan_mapping_trunk:
|
|
103
103
|
|
104
104
|
switchport_private_vlan_trunk_allowed_vlan:
|
105
105
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'switchport_pvlan_trunk_allowed_vlan'
|
106
|
-
_exclude: [ios_xr,
|
106
|
+
_exclude: [ios_xr, N9k-F]
|
107
107
|
multiple: true
|
108
108
|
get_value: '/^switchport private-vlan trunk allowed vlan (.*)$/'
|
109
109
|
set_value: "<state> switchport private-vlan trunk allowed vlan <oper> <vlans>"
|
@@ -111,7 +111,7 @@ switchport_private_vlan_trunk_allowed_vlan:
|
|
111
111
|
|
112
112
|
switchport_private_vlan_trunk_native_vlan:
|
113
113
|
# DEPRECATED (REMOVING WITH RELEASE 2.0.0). USE 'switchport_pvlan_trunk_native_vlan'
|
114
|
-
_exclude: [ios_xr,
|
114
|
+
_exclude: [ios_xr, N9k-F]
|
115
115
|
kind: int
|
116
116
|
get_value: '/^switchport private-vlan trunk native vlan (.*)$/'
|
117
117
|
set_value: "<state> switchport private-vlan trunk native vlan <vlan>"
|
@@ -329,8 +329,8 @@ productid:
|
|
329
329
|
ios_xr:
|
330
330
|
get_value: '/PID: ([^ ,]+)/'
|
331
331
|
nexus:
|
332
|
-
get_context: ["TABLE_inv", "ROW_inv"
|
333
|
-
get_value: "productid"
|
332
|
+
get_context: ["TABLE_inv", "ROW_inv"]
|
333
|
+
get_value: ["name Chassis", "productid"]
|
334
334
|
```
|
335
335
|
|
336
336
|
Using platform variants and product variants together:
|
@@ -361,7 +361,7 @@ productid:
|
|
361
361
|
get_command: 'show inventory'
|
362
362
|
nexus:
|
363
363
|
get_data_format: nxapi_structured
|
364
|
-
get_context: ['TABLE_inv', 'ROW_inv'
|
364
|
+
get_context: ['TABLE_inv', 'ROW_inv']
|
365
365
|
```
|
366
366
|
|
367
367
|
### `get_command`
|
@@ -378,7 +378,7 @@ area:
|
|
378
378
|
|
379
379
|
### `get_context`
|
380
380
|
|
381
|
-
`get_context` is an optional sequence of tokens used to filter the output from the `get_command` down to the desired context where the `get_value` can be found. For CLI properties, these tokens are implicitly Regexps used to filter down through the hierarchical CLI output, while for `nxapi_structured` properties, the tokens are used as string keys.
|
381
|
+
`get_context` is an optional sequence of tokens used to filter the output from the `get_command` down to the desired context where the `get_value` can be found. For CLI properties, these tokens are implicitly Regexps used to filter down through the hierarchical CLI output, while for `nxapi_structured` properties, the tokens are used as string keys. For `nxapi_structured` properties, both `get_context` and `get_value` can specify a sequence of tokens used to filter the output from the `get_command` down to the desired `get_value`. This feature can be used to retrieve data from `TABLE` data the contains multiple `ROWS`.
|
382
382
|
|
383
383
|
|
384
384
|
```yaml
|
@@ -387,10 +387,38 @@ productid:
|
|
387
387
|
get_command: 'show inventory'
|
388
388
|
nexus:
|
389
389
|
get_data_format: nxapi_structured
|
390
|
-
get_context: ['TABLE_inv', 'ROW_inv'
|
391
|
-
get_value:
|
390
|
+
get_context: ['TABLE_inv', 'ROW_inv']
|
391
|
+
get_value: ["name Chassis", "productid"]
|
392
392
|
# config_get('inventory', 'productid') returns
|
393
|
-
#
|
393
|
+
# 'productid' for the row that contains 'name Chassis'
|
394
|
+
```
|
395
|
+
|
396
|
+
```yaml
|
397
|
+
# vlan.yaml
|
398
|
+
name:
|
399
|
+
get_command: "show vlan brief"
|
400
|
+
nexus:
|
401
|
+
kind: string
|
402
|
+
get_data_format: nxapi_structured
|
403
|
+
get_context: ["TABLE_vlanbriefxbrief", "ROW_vlanbriefxbrief"]
|
404
|
+
get_value: ["vlanshowbr-vlanid-utf <vlanid>", "vlanshowbr-vlanname"]
|
405
|
+
# config_get('vlan', 'name', @vlan_id) returns
|
406
|
+
# 'vlanshowbr-vlanname' for @vlan_id.
|
407
|
+
# NOTE: `<vlanid>` in the `get_value` is replaced by `@vlan_id` prior to lookup.
|
408
|
+
```
|
409
|
+
|
410
|
+
```yaml
|
411
|
+
# vlan.yaml
|
412
|
+
shutdown:
|
413
|
+
get_command: "show vlan brief"
|
414
|
+
nexus:
|
415
|
+
kind: boolean
|
416
|
+
get_data_format: nxapi_structured
|
417
|
+
get_context: ["TABLE_vlanbriefxbrief", "ROW_vlanbriefxbrief"]
|
418
|
+
get_value: ["vlanshowbr-vlanid-utf <vlanid>", "vlanshowbr-shutstate", '/^shutdown$/']
|
419
|
+
# config_get('vlan', 'shutdown', @vlan_id) returns
|
420
|
+
# true if data in 'vlanshowbr-shutstate' matches regex '/^shutdown$/' else false.
|
421
|
+
# NOTE: `<vlanid>` in the `get_value` is replaced by `@vlan_id` prior to lookup.
|
394
422
|
```
|
395
423
|
|
396
424
|
```yaml
|
@@ -23,27 +23,27 @@ echo_rx_interval:
|
|
23
23
|
default_value: 50
|
24
24
|
|
25
25
|
fabricpath_interval:
|
26
|
-
_exclude: [N3k,
|
26
|
+
_exclude: [N3k, N9k-F, N9k]
|
27
27
|
get_value: '/^bfd fabricpath interval (\d+) min_rx (\d+) multiplier (\d+)$/'
|
28
28
|
set_value: '<state> bfd fabricpath interval <interval> min_rx <min_rx> multiplier <multiplier>'
|
29
29
|
default_value: ['50', '50', '3']
|
30
30
|
|
31
31
|
fabricpath_slow_timer:
|
32
|
-
_exclude: [N3k,
|
32
|
+
_exclude: [N3k, N9k-F, N9k]
|
33
33
|
kind: int
|
34
34
|
get_value: '/^bfd fabricpath slow-timer (\d+)$/'
|
35
35
|
set_value: '<state> bfd fabricpath slow-timer <timer>'
|
36
36
|
default_value: 2000
|
37
37
|
|
38
38
|
fabricpath_vlan:
|
39
|
-
_exclude: [N3k,
|
39
|
+
_exclude: [N3k, N9k-F, N9k]
|
40
40
|
kind: int
|
41
41
|
get_value: '/^bfd fabricpath vlan (\d+)$/'
|
42
42
|
set_value: '<state> bfd fabricpath vlan <vlan>'
|
43
43
|
default_value: 1
|
44
44
|
|
45
45
|
interval:
|
46
|
-
_exclude: [
|
46
|
+
_exclude: [N9k-F, N9k] # TBD: bug on n9k-f, n9k this is not working now
|
47
47
|
get_value: '/^bfd interval (\d+) min_rx (\d+) multiplier (\d+)$/'
|
48
48
|
set_value: '<state> bfd interval <interval> min_rx <min_rx> multiplier <multiplier>'
|
49
49
|
N3k:
|
@@ -11,7 +11,7 @@ _template:
|
|
11
11
|
get_command: 'show running-config router bgp'
|
12
12
|
|
13
13
|
additional_paths_install:
|
14
|
-
_exclude: [ios_xr, N3k,
|
14
|
+
_exclude: [ios_xr, N3k, N9k-F, N9k]
|
15
15
|
kind: boolean
|
16
16
|
get_value: '/^additional-paths install backup$/'
|
17
17
|
set_value: '<state> additional-paths install backup'
|
@@ -189,7 +189,7 @@ soft_reconfiguration_in:
|
|
189
189
|
get_value: '/^soft-reconfiguration inbound(?: always)?/'
|
190
190
|
set_value: '<state> soft-reconfiguration inbound <always>'
|
191
191
|
N3k: *soft_recon_always
|
192
|
-
|
192
|
+
N9k-F: *soft_recon_always
|
193
193
|
N9k: *soft_recon_always
|
194
194
|
else:
|
195
195
|
get_value: '/^soft-reconfiguration inbound/'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# bridge_domain
|
2
2
|
# bridge_domain feature is available only on n7k
|
3
3
|
---
|
4
|
-
_exclude: [N3k, N5k, N6k,
|
4
|
+
_exclude: [N3k, N5k, N6k, N9k-F, N9k, ios_xr]
|
5
5
|
|
6
6
|
# For the below name, shutdown commands we are going to use show running-config
|
7
7
|
# bridge-domain cli which displays as below
|
@@ -47,7 +47,7 @@ ipv4_relay:
|
|
47
47
|
default_value: false
|
48
48
|
N6k: *relay_default_false
|
49
49
|
N7k: *relay_default_true
|
50
|
-
|
50
|
+
N9k-F: *relay_default_true
|
51
51
|
N9k: *relay_default_true
|
52
52
|
|
53
53
|
ipv4_smart_relay:
|
@@ -57,7 +57,7 @@ ipv4_smart_relay:
|
|
57
57
|
default_value: false
|
58
58
|
|
59
59
|
ipv4_src_addr_hsrp:
|
60
|
-
_exclude: [N3k,
|
60
|
+
_exclude: [N3k, N9k-F, N9k]
|
61
61
|
kind: boolean
|
62
62
|
get_value: '/^ip dhcp relay source-address hsrp$/'
|
63
63
|
set_value: "<state> ip dhcp relay source-address hsrp"
|
@@ -69,14 +69,14 @@ ipv4_src_intf:
|
|
69
69
|
default_value: false
|
70
70
|
|
71
71
|
ipv4_sub_option_circuit_id_custom:
|
72
|
-
_exclude: [N7k,
|
72
|
+
_exclude: [N7k, N9k-F]
|
73
73
|
kind: boolean
|
74
74
|
get_value: '/^ip dhcp relay sub-option circuit-id customized$/'
|
75
75
|
set_value: "<state> ip dhcp relay sub-option circuit-id customized"
|
76
76
|
default_value: false
|
77
77
|
|
78
78
|
ipv4_sub_option_circuit_id_string:
|
79
|
-
_exclude: [N5k, N6k, N7k,
|
79
|
+
_exclude: [N5k, N6k, N7k, N9k-F, N9k]
|
80
80
|
get_value: '/^ip dhcp relay sub-option circuit-id format-type string format (.*)$/'
|
81
81
|
set_value: "<state> ip dhcp relay sub-option circuit-id format-type string <format> <word>"
|
82
82
|
default_value: false
|
@@ -116,7 +116,7 @@ ipv6_relay:
|
|
116
116
|
default_value: false
|
117
117
|
N6k: *v6_relay_default_false
|
118
118
|
N7k: *v6_relay_default_true
|
119
|
-
|
119
|
+
N9k-F: *v6_relay_default_true
|
120
120
|
N9k: *v6_relay_default_true
|
121
121
|
|
122
122
|
ipv6_src_intf:
|