cisco_node_utils 1.5.0 → 1.6.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 +23 -0
- data/README.md +2 -1
- data/docs/cisco_node_utils.yaml.example +6 -0
- data/lib/cisco_node_utils/cisco_cmn_utils.rb +6 -15
- data/lib/cisco_node_utils/client/nxapi/client.rb +19 -1
- data/lib/cisco_node_utils/client/utils.rb +1 -1
- data/lib/cisco_node_utils/cmd_ref/README_YAML.md +1 -1
- data/lib/cisco_node_utils/cmd_ref/interface.yaml +25 -0
- data/lib/cisco_node_utils/cmd_ref/radius_global.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/radius_server.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/route_map.yaml +592 -0
- data/lib/cisco_node_utils/cmd_ref/snmp_community.yaml +40 -12
- data/lib/cisco_node_utils/cmd_ref/tacacs_global.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/tacacs_server.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/tacacs_server_host.yaml +1 -1
- data/lib/cisco_node_utils/cmd_ref/upgrade.yaml +38 -0
- data/lib/cisco_node_utils/dhcp_relay_global.rb +6 -2
- data/lib/cisco_node_utils/dns_domain.rb +2 -2
- data/lib/cisco_node_utils/environment.rb +1 -0
- data/lib/cisco_node_utils/interface.rb +58 -0
- data/lib/cisco_node_utils/itd_service.rb +5 -2
- data/lib/cisco_node_utils/node.rb +26 -13
- data/lib/cisco_node_utils/radius_global.rb +6 -1
- data/lib/cisco_node_utils/radius_server.rb +7 -1
- data/lib/cisco_node_utils/route_map.rb +2558 -0
- data/lib/cisco_node_utils/tacacs_global.rb +5 -2
- data/lib/cisco_node_utils/tacacs_server.rb +5 -2
- data/lib/cisco_node_utils/tacacs_server_host.rb +10 -4
- data/lib/cisco_node_utils/upgrade.rb +118 -0
- data/lib/cisco_node_utils/version.rb +1 -1
- data/spec/environment_spec.rb +16 -2
- data/tests/test_bgp_af.rb +8 -1
- data/tests/test_dhcp_relay_global.rb +3 -2
- data/tests/test_evpn_vni.rb +2 -2
- data/tests/test_feature.rb +4 -1
- data/tests/test_interface.rb +93 -0
- data/tests/test_interface_svi.rb +1 -0
- data/tests/test_itd_service.rb +4 -0
- data/tests/test_radius_global.rb +2 -2
- data/tests/test_radius_server.rb +6 -6
- data/tests/test_route_map.rb +1489 -0
- data/tests/test_router_bgp.rb +2 -0
- data/tests/test_snmpcommunity.rb +12 -0
- data/tests/test_snmpserver.rb +1 -1
- data/tests/test_snmpuser.rb +6 -9
- data/tests/test_tacacs_server.rb +2 -2
- data/tests/test_tacacs_server_host.rb +2 -2
- data/tests/test_upgrade.rb +106 -0
- data/tests/test_vlan.rb +2 -4
- data/tests/upgrade_info.yaml.example +3 -0
- data/tests/yum_package.yaml +13 -3
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bba7acf3a46bb0cf8f326a897be60772cd439502
|
4
|
+
data.tar.gz: 7ae172b66301e5eae043eb734859db8e29887857
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c06271bf71dffbb98af27a6efb3ea84dca3ec1015d121c8ee20e5cdacdcbd24e3508d5cc1897a3825b3162ffb58ae8976049e74a0016287da78d16bd84e03d98
|
7
|
+
data.tar.gz: 67820cc10ad107c46218306356d7ed17467886196285896897b69400e8de773dde60a3a98a3ca09d4693c9b2d9bbb471e1a73f6365b99322f44522daa338dbf2
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,28 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
## [v1.6.0]
|
5
|
+
|
6
|
+
### New feature support
|
7
|
+
|
8
|
+
#### Cisco Resources
|
9
|
+
* Route_map
|
10
|
+
* route_map (@saichint)
|
11
|
+
|
12
|
+
* Upgrade
|
13
|
+
* upgrade (@rahushen)
|
14
|
+
|
15
|
+
### Added
|
16
|
+
|
17
|
+
* Extend interface with attributes:
|
18
|
+
* `load_interval_counter_1_delay`
|
19
|
+
* `load_interval_counter_2_delay`
|
20
|
+
* `load_interval_counter_3_delay`
|
21
|
+
|
22
|
+
### Changed
|
23
|
+
|
24
|
+
### Removed
|
25
|
+
|
4
26
|
## [v1.5.0]
|
5
27
|
|
6
28
|
### New feature support
|
@@ -397,6 +419,7 @@ Changelog
|
|
397
419
|
[git-flow]: https://github.com/petervanderdoes/gitflow-avh
|
398
420
|
[SimpleCov]: https://github.com/colszowka/simplecov
|
399
421
|
|
422
|
+
[v1.6.0]: https://github.com/cisco/cisco-network-node-utils/compare/v1.5.0...v1.6.0
|
400
423
|
[v1.5.0]: https://github.com/cisco/cisco-network-node-utils/compare/v1.4.1...v1.5.0
|
401
424
|
[v1.4.1]: https://github.com/cisco/cisco-network-node-utils/compare/v1.4.0...v1.4.1
|
402
425
|
[v1.4.0]: https://github.com/cisco/cisco-network-node-utils/compare/v1.3.0...v1.4.0
|
data/README.md
CHANGED
@@ -73,7 +73,8 @@ If both files exist and are readable, configuration in the user-specific file wi
|
|
73
73
|
|
74
74
|
This file specifies the host, port, username, and/or password to be used to connect to one or more nodes.
|
75
75
|
|
76
|
-
* When installing this gem on NX-OS nodes, this file is generally not needed, as the default client behavior is sufficient.
|
76
|
+
* When installing this gem on NX-OS nodes, this file is generally not needed, as the default client behavior is sufficient. This file can be used however to override the default cookie.
|
77
|
+
- Nodes defined with a single `cookie` parameter will override the default cookie.
|
77
78
|
* When developing for or testing this gem, this file can specify one or more NX-OS nodes to run tests against. In this case:
|
78
79
|
- A node labeled as `default` will be the default node to test against.
|
79
80
|
- Nodes with other names can be selected at test execution time.
|
@@ -14,6 +14,12 @@ nxapi_remote:
|
|
14
14
|
nxapi_local:
|
15
15
|
# (none needed)
|
16
16
|
|
17
|
+
# Example config for running NXAPI on a node with default cookie override:
|
18
|
+
# User 'nxapi' must be configured with requisite privilages to configure the device.
|
19
|
+
# This will override the default 'admin:local' cookie and use 'nxapi:local' instead.
|
20
|
+
default:
|
21
|
+
cookie: 'nxapi:local'
|
22
|
+
|
17
23
|
# Example config for running gRPC remotely:
|
18
24
|
grpc_remote:
|
19
25
|
host: 192.168.1.100
|
@@ -361,20 +361,11 @@ module Cisco
|
|
361
361
|
merged
|
362
362
|
end # merge_range
|
363
363
|
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
#
|
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
|
364
|
+
def self.add_quotes(value)
|
365
|
+
return value if image_version?(/7.3.0/)
|
366
|
+
value = "\"#{value}\"" unless
|
367
|
+
value.start_with?('"') && value.end_with?('"')
|
368
|
+
value
|
369
|
+
end # add_quotes
|
379
370
|
end # class Utils
|
380
371
|
end # module Cisco
|
@@ -56,6 +56,7 @@ class Cisco::Client::NXAPI < Cisco::Client
|
|
56
56
|
# unit testing where the base Net::HTTP will meet our needs.
|
57
57
|
require 'net_http_unix'
|
58
58
|
@http = NetX::HTTPUnix.new('unix://' + NXAPI_UDS)
|
59
|
+
@cookie = kwargs[:cookie]
|
59
60
|
else
|
60
61
|
# Remote connection. This is primarily expected
|
61
62
|
# when running e.g. from a Unix server as part of Minitest.
|
@@ -76,6 +77,7 @@ class Cisco::Client::NXAPI < Cisco::Client
|
|
76
77
|
if kwargs[:host].nil?
|
77
78
|
# Connection to UDS - no username or password either
|
78
79
|
fail ArgumentError unless kwargs[:username].nil? && kwargs[:password].nil?
|
80
|
+
validate_cookie(**kwargs)
|
79
81
|
else
|
80
82
|
# Connection to remote system - username and password are required
|
81
83
|
fail TypeError, 'username is required' if kwargs[:username].nil?
|
@@ -83,6 +85,16 @@ class Cisco::Client::NXAPI < Cisco::Client
|
|
83
85
|
end
|
84
86
|
end
|
85
87
|
|
88
|
+
def self.validate_cookie(**kwargs)
|
89
|
+
return if kwargs[:cookie].nil?
|
90
|
+
format = 'Cookie format must match: <username>:local'
|
91
|
+
msg = "Invalid cookie: [#{kwargs[:cookie]}]. : #{format}"
|
92
|
+
|
93
|
+
fail TypeError, msg unless kwargs[:cookie].is_a?(String)
|
94
|
+
fail TypeError, msg unless /\S+:local/.match(kwargs[:cookie])
|
95
|
+
fail ArgumentError, 'empty cookie' if kwargs[:cookie].empty?
|
96
|
+
end
|
97
|
+
|
86
98
|
# Clear the cache of CLI output results.
|
87
99
|
#
|
88
100
|
# If cache_auto is true (default) then this will be performed automatically
|
@@ -189,6 +201,7 @@ class Cisco::Client::NXAPI < Cisco::Client
|
|
189
201
|
# send the request and get the response
|
190
202
|
debug("Sending HTTP request to NX-API at #{@http.address}:\n" \
|
191
203
|
"#{request.to_hash}\n#{request.body}")
|
204
|
+
tries = 2
|
192
205
|
begin
|
193
206
|
# Explicitly use http to avoid EOFError
|
194
207
|
# http://stackoverflow.com/a/23080693
|
@@ -197,6 +210,10 @@ class Cisco::Client::NXAPI < Cisco::Client
|
|
197
210
|
rescue Errno::ECONNREFUSED, Errno::ECONNRESET
|
198
211
|
emsg = 'Connection refused or reset. Is the NX-API feature enabled?'
|
199
212
|
raise Cisco::ConnectionRefused, emsg
|
213
|
+
rescue EOFError
|
214
|
+
tries -= 1
|
215
|
+
retry if tries > 0
|
216
|
+
raise
|
200
217
|
end
|
201
218
|
handle_http_response(response)
|
202
219
|
output = parse_response(response)
|
@@ -222,8 +239,9 @@ class Cisco::Client::NXAPI < Cisco::Client
|
|
222
239
|
|
223
240
|
def build_http_request(type, command_string)
|
224
241
|
if @username.nil? || @password.nil?
|
242
|
+
cookie = @cookie.nil? ? 'admin:local' : @cookie
|
225
243
|
request = Net::HTTP::Post.new(NXAPI_UDS_URI_PATH)
|
226
|
-
request['Cookie'] =
|
244
|
+
request['Cookie'] = "nxapi_auth=#{cookie}"
|
227
245
|
else
|
228
246
|
request = Net::HTTP::Post.new(NXAPI_REMOTE_URI_PATH)
|
229
247
|
request.basic_auth("#{@username}", "#{@password}")
|
@@ -130,7 +130,7 @@ class Cisco::Client
|
|
130
130
|
# @param keys [Array] lookup sequence
|
131
131
|
def self.filter_data(data: nil,
|
132
132
|
keys: nil)
|
133
|
-
return nil if data.nil?
|
133
|
+
return nil if data.nil? || data.empty?
|
134
134
|
keys ||= []
|
135
135
|
keys.each do |filter|
|
136
136
|
# if filter is a Hash and data is an array, check each
|
@@ -81,7 +81,7 @@ needed. In the above, example 'domain' does not have a value defined for
|
|
81
81
|
|
82
82
|
### Wildcard substitution
|
83
83
|
|
84
|
-
The `(get|set)_(context|value)` properties all support two forms of wildcarding - printf-style and key-value. Each has advantages and disadvantages but key-value is generally preferred for a number of reasons as seen below:
|
84
|
+
The `(get|set)_(context|value|command)` properties all support two forms of wildcarding - printf-style and key-value. Each has advantages and disadvantages but key-value is generally preferred for a number of reasons as seen below:
|
85
85
|
|
86
86
|
<table>
|
87
87
|
<tr><th></th><th>Advantages</th><th>Disadvantages</th></tr>
|
@@ -296,6 +296,31 @@ ipv6_dhcp_relay_src_intf:
|
|
296
296
|
set_value: "<state> ipv6 dhcp relay source-interface <intf>"
|
297
297
|
default_value: false
|
298
298
|
|
299
|
+
load_interval_counter_1_delay:
|
300
|
+
_exclude: [ios_xr]
|
301
|
+
kind: int
|
302
|
+
get_value: '/^load-interval counter 1 (\d+)$/'
|
303
|
+
set_value: "load-interval counter 1 <delay>"
|
304
|
+
default_value: 30
|
305
|
+
|
306
|
+
load_interval_counter_1_delay_vlan_bdi:
|
307
|
+
kind: int
|
308
|
+
default_value: 60
|
309
|
+
|
310
|
+
load_interval_counter_2_delay:
|
311
|
+
_exclude: [ios_xr]
|
312
|
+
kind: int
|
313
|
+
get_value: '/^load-interval counter 2 (\d+)$/'
|
314
|
+
set_value: "load-interval counter 2 <delay>"
|
315
|
+
default_value: 300
|
316
|
+
|
317
|
+
load_interval_counter_3_delay:
|
318
|
+
_exclude: [ios_xr]
|
319
|
+
kind: int
|
320
|
+
get_value: '/^load-interval counter 3 (\d+)$/'
|
321
|
+
set_value: "<state> load-interval counter 3 <delay>"
|
322
|
+
default_value: false
|
323
|
+
|
299
324
|
mtu_loopback:
|
300
325
|
kind: boolean
|
301
326
|
default_only: ~
|
@@ -62,7 +62,7 @@ hosts:
|
|
62
62
|
key:
|
63
63
|
default_value: ~
|
64
64
|
nexus:
|
65
|
-
get_value: '/^radius-server host <ip>.* key \d+\s+(
|
65
|
+
get_value: '/^radius-server host <ip>.* key \d+\s+(.*)/'
|
66
66
|
set_value: '<state> radius-server host <ip> key <key>'
|
67
67
|
ios_xr:
|
68
68
|
context: ["radius-server host <ip> auth-port <auth_port> acct-port <acct_port>"]
|
@@ -0,0 +1,592 @@
|
|
1
|
+
# route_map
|
2
|
+
---
|
3
|
+
_exclude: [ios_xr]
|
4
|
+
|
5
|
+
_template:
|
6
|
+
get_command: "show running-config | section route-map"
|
7
|
+
get_context: ['/^route-map <name> <action> <seq>/']
|
8
|
+
set_context: ["route-map <name> <action> <seq>"]
|
9
|
+
|
10
|
+
all_route_maps:
|
11
|
+
multiple:
|
12
|
+
get_context: ~
|
13
|
+
get_value: '/^route-map (\S+) (\S+) (\S+)$/'
|
14
|
+
|
15
|
+
create:
|
16
|
+
set_context: ~
|
17
|
+
set_value: "route-map <name> <action> <seq>"
|
18
|
+
|
19
|
+
description:
|
20
|
+
get_value: '/^description (\S+)$/'
|
21
|
+
set_value: "<state> description <desc>"
|
22
|
+
default_value: false
|
23
|
+
|
24
|
+
destroy:
|
25
|
+
set_context: ~
|
26
|
+
set_value: "no route-map <name> <action> <seq>"
|
27
|
+
|
28
|
+
match_as_number:
|
29
|
+
multiple:
|
30
|
+
get_value: '/^match as-number (.*)$/'
|
31
|
+
set_value: "<state> match as-number <num>"
|
32
|
+
default_value: []
|
33
|
+
|
34
|
+
match_as_number_as_path_list:
|
35
|
+
get_value: '/^match as-number as-path-list (.*)$/'
|
36
|
+
set_value: "<state> match as-number as-path-list <list>"
|
37
|
+
default_value: []
|
38
|
+
|
39
|
+
match_community:
|
40
|
+
get_value: '/^match community (.*)$/'
|
41
|
+
set_value: "<state> match community <comm>"
|
42
|
+
default_value: []
|
43
|
+
|
44
|
+
match_community_exact_match:
|
45
|
+
default_value: false
|
46
|
+
|
47
|
+
match_evpn_route_type:
|
48
|
+
_exclude: [N3k, N9k, N9k-F]
|
49
|
+
multiple:
|
50
|
+
get_value: '/^match evpn route-type (.*)$/'
|
51
|
+
set_value: "<state> match evpn route-type <type>"
|
52
|
+
default_value: []
|
53
|
+
|
54
|
+
match_evpn_route_type_1:
|
55
|
+
_exclude: [N3k, N9k, N9k-F]
|
56
|
+
default_value: false
|
57
|
+
|
58
|
+
match_evpn_route_type_2_all:
|
59
|
+
_exclude: [N3k, N9k, N9k-F]
|
60
|
+
default_value: false
|
61
|
+
|
62
|
+
match_evpn_route_type_2_mac_ip:
|
63
|
+
_exclude: [N3k, N9k, N9k-F]
|
64
|
+
default_value: false
|
65
|
+
|
66
|
+
match_evpn_route_type_2_mac_only:
|
67
|
+
_exclude: [N3k, N9k, N9k-F]
|
68
|
+
default_value: false
|
69
|
+
|
70
|
+
match_evpn_route_type_3:
|
71
|
+
_exclude: [N3k, N9k, N9k-F]
|
72
|
+
default_value: false
|
73
|
+
|
74
|
+
match_evpn_route_type_4:
|
75
|
+
_exclude: [N3k, N9k, N9k-F]
|
76
|
+
default_value: false
|
77
|
+
|
78
|
+
match_evpn_route_type_5:
|
79
|
+
_exclude: [N3k, N9k, N9k-F]
|
80
|
+
default_value: false
|
81
|
+
|
82
|
+
match_evpn_route_type_6:
|
83
|
+
_exclude: [N3k, N9k, N9k-F]
|
84
|
+
default_value: false
|
85
|
+
|
86
|
+
match_evpn_route_type_all:
|
87
|
+
_exclude: [N3k, N9k, N9k-F]
|
88
|
+
default_value: false
|
89
|
+
|
90
|
+
match_ext_community:
|
91
|
+
get_value: '/^match extcommunity (.*)$/'
|
92
|
+
set_value: "<state> match extcommunity <comm>"
|
93
|
+
default_value: []
|
94
|
+
|
95
|
+
match_ext_community_exact_match:
|
96
|
+
default_value: false
|
97
|
+
|
98
|
+
match_interface:
|
99
|
+
get_value: '/^match interface (.*)$/'
|
100
|
+
set_value: "<state> match interface <int>"
|
101
|
+
default_value: []
|
102
|
+
|
103
|
+
match_ipv4_addr_access_list:
|
104
|
+
multiple:
|
105
|
+
get_value: '/^match ip address (.*)$/'
|
106
|
+
set_value: "<state> match ip address <access>"
|
107
|
+
default_value: false
|
108
|
+
|
109
|
+
match_ipv4_addr_prefix_list:
|
110
|
+
get_value: '/^match ip address prefix-list (.*)$/'
|
111
|
+
set_value: "<state> match ip address prefix-list <prefix>"
|
112
|
+
default_value: []
|
113
|
+
|
114
|
+
match_ipv4_multicast:
|
115
|
+
get_value: '/match ip multicast .+$/'
|
116
|
+
set_value: "<state> match ip multicast <source> <group> <group_range> <to> <rp> <rp_type>"
|
117
|
+
|
118
|
+
match_ipv4_multicast_enable:
|
119
|
+
kind: boolean
|
120
|
+
default_value: false
|
121
|
+
|
122
|
+
match_ipv4_multicast_group_addr:
|
123
|
+
default_value: ''
|
124
|
+
|
125
|
+
match_ipv4_multicast_group_range_begin_addr:
|
126
|
+
default_value: ''
|
127
|
+
|
128
|
+
match_ipv4_multicast_group_range_end_addr:
|
129
|
+
default_value: ''
|
130
|
+
|
131
|
+
match_ipv4_multicast_rp_addr:
|
132
|
+
default_value: ''
|
133
|
+
|
134
|
+
match_ipv4_multicast_rp_type:
|
135
|
+
default_value: ''
|
136
|
+
|
137
|
+
match_ipv4_multicast_src_addr:
|
138
|
+
default_value: ''
|
139
|
+
|
140
|
+
match_ipv4_next_hop_prefix_list:
|
141
|
+
get_value: '/^match ip next-hop prefix-list (.*)$/'
|
142
|
+
set_value: "<state> match ip next-hop prefix-list <prefix>"
|
143
|
+
default_value: []
|
144
|
+
|
145
|
+
match_ipv4_route_src_prefix_list:
|
146
|
+
get_value: '/^match ip route-source prefix-list (.*)$/'
|
147
|
+
set_value: "<state> match ip route-source prefix-list <prefix>"
|
148
|
+
default_value: []
|
149
|
+
|
150
|
+
match_ipv6_addr_access_list:
|
151
|
+
multiple:
|
152
|
+
get_value: '/^match ipv6 address (.*)$/'
|
153
|
+
set_value: "<state> match ipv6 address <access>"
|
154
|
+
default_value: false
|
155
|
+
|
156
|
+
match_ipv6_addr_prefix_list:
|
157
|
+
get_value: '/^match ipv6 address prefix-list (.*)$/'
|
158
|
+
set_value: "<state> match ipv6 address prefix-list <prefix>"
|
159
|
+
default_value: []
|
160
|
+
|
161
|
+
match_ipv6_multicast:
|
162
|
+
get_value: '/match ipv6 multicast .+$/'
|
163
|
+
set_value: "<state> match ipv6 multicast <source> <group> <group_range> <to> <rp> <rp_type>"
|
164
|
+
|
165
|
+
match_ipv6_multicast_enable:
|
166
|
+
kind: boolean
|
167
|
+
default_value: false
|
168
|
+
|
169
|
+
match_ipv6_multicast_group_addr:
|
170
|
+
default_value: ''
|
171
|
+
|
172
|
+
match_ipv6_multicast_group_range_begin_addr:
|
173
|
+
default_value: ''
|
174
|
+
|
175
|
+
match_ipv6_multicast_group_range_end_addr:
|
176
|
+
default_value: ''
|
177
|
+
|
178
|
+
match_ipv6_multicast_rp_addr:
|
179
|
+
default_value: ''
|
180
|
+
|
181
|
+
match_ipv6_multicast_rp_type:
|
182
|
+
default_value: ''
|
183
|
+
|
184
|
+
match_ipv6_multicast_src_addr:
|
185
|
+
default_value: ''
|
186
|
+
|
187
|
+
match_ipv6_next_hop_prefix_list:
|
188
|
+
get_value: '/^match ipv6 next-hop prefix-list (.*)$/'
|
189
|
+
set_value: "<state> match ipv6 next-hop prefix-list <prefix>"
|
190
|
+
default_value: []
|
191
|
+
|
192
|
+
match_ipv6_route_src_prefix_list:
|
193
|
+
get_value: '/^match ipv6 route-source prefix-list (.*)$/'
|
194
|
+
set_value: "<state> match ipv6 route-source prefix-list <prefix>"
|
195
|
+
default_value: []
|
196
|
+
|
197
|
+
match_length:
|
198
|
+
_exclude: [N3k, N9k, N9k-F]
|
199
|
+
get_value: '/^match length (\d+) (\d+)$/'
|
200
|
+
set_value: "<state> match length <min> <max>"
|
201
|
+
default_value: []
|
202
|
+
|
203
|
+
match_mac_list:
|
204
|
+
_exclude: [N3k, N9k, N9k-F]
|
205
|
+
get_value: '/^match mac-list (.*)$/'
|
206
|
+
set_value: "<state> match mac-list <mac>"
|
207
|
+
default_value: []
|
208
|
+
|
209
|
+
match_metric:
|
210
|
+
get_value: '/^match metric (.*)$/'
|
211
|
+
set_value: "<state> match metric <metric>"
|
212
|
+
default_value: []
|
213
|
+
|
214
|
+
match_ospf_area:
|
215
|
+
_exclude: [N5k, N6k, N7k, N9k-F]
|
216
|
+
get_value: '/^match ospf-area (.*)$/'
|
217
|
+
set_value: "<state> match ospf-area <area>"
|
218
|
+
default_value: []
|
219
|
+
|
220
|
+
match_route_type:
|
221
|
+
multiple:
|
222
|
+
get_value: '/^match route-type (.*)$/'
|
223
|
+
set_value: "<state> match route-type <external> <inter_area> <internal> <intra_area> <level_1> <level_2> <local> <nssa_external> <type_1> <type_2>"
|
224
|
+
|
225
|
+
match_route_type_external:
|
226
|
+
kind: boolean
|
227
|
+
default_value: false
|
228
|
+
|
229
|
+
match_route_type_inter_area:
|
230
|
+
kind: boolean
|
231
|
+
default_value: false
|
232
|
+
|
233
|
+
match_route_type_internal:
|
234
|
+
kind: boolean
|
235
|
+
default_value: false
|
236
|
+
|
237
|
+
match_route_type_intra_area:
|
238
|
+
kind: boolean
|
239
|
+
default_value: false
|
240
|
+
|
241
|
+
match_route_type_level_1:
|
242
|
+
kind: boolean
|
243
|
+
default_value: false
|
244
|
+
|
245
|
+
match_route_type_level_2:
|
246
|
+
kind: boolean
|
247
|
+
default_value: false
|
248
|
+
|
249
|
+
match_route_type_local:
|
250
|
+
kind: boolean
|
251
|
+
default_value: false
|
252
|
+
|
253
|
+
match_route_type_nssa_external:
|
254
|
+
kind: boolean
|
255
|
+
default_value: false
|
256
|
+
|
257
|
+
match_route_type_type_1:
|
258
|
+
kind: boolean
|
259
|
+
default_value: false
|
260
|
+
|
261
|
+
match_route_type_type_2:
|
262
|
+
kind: boolean
|
263
|
+
default_value: false
|
264
|
+
|
265
|
+
match_src_proto:
|
266
|
+
get_value: '/^match source-protocol (.*)$/'
|
267
|
+
set_value: "<state> match source-protocol <proto>"
|
268
|
+
default_value: []
|
269
|
+
|
270
|
+
match_tag:
|
271
|
+
get_value: '/^match tag (.*)$/'
|
272
|
+
set_value: "<state> match tag <tag>"
|
273
|
+
default_value: []
|
274
|
+
|
275
|
+
match_vlan:
|
276
|
+
_exclude: [N3k, N9k, N9k-F]
|
277
|
+
get_value: '/^match vlan (.*)$/'
|
278
|
+
set_value: "<state> match vlan <range>"
|
279
|
+
default_value: ''
|
280
|
+
|
281
|
+
set_as_path_prepend:
|
282
|
+
multiple:
|
283
|
+
get_value: '/^set as-path prepend (.*)$/'
|
284
|
+
set_value: "<state> set as-path prepend <asnum>"
|
285
|
+
default_value: []
|
286
|
+
|
287
|
+
set_as_path_prepend_last_as:
|
288
|
+
kind: int
|
289
|
+
get_value: '/^set as-path prepend last-as (\d+)$/'
|
290
|
+
set_value: "<state> set as-path prepend last-as <as>"
|
291
|
+
default_value: false
|
292
|
+
|
293
|
+
set_as_path_tag:
|
294
|
+
kind: boolean
|
295
|
+
get_value: '/^set as-path tag$/'
|
296
|
+
set_value: "<state> set as-path tag"
|
297
|
+
default_value: false
|
298
|
+
|
299
|
+
# there is more than one space before delete on some platforms
|
300
|
+
set_comm_list:
|
301
|
+
get_value: '/^set comm-list (\S+)(?:\s+)? delete$/'
|
302
|
+
set_value: "<state> set comm-list <list> delete"
|
303
|
+
default_value: false
|
304
|
+
|
305
|
+
set_community:
|
306
|
+
get_value: '/^set community(?:\s+.*)?$/'
|
307
|
+
set_value: "<state> set community <string>"
|
308
|
+
|
309
|
+
set_community_additive:
|
310
|
+
default_value: false
|
311
|
+
|
312
|
+
set_community_asn:
|
313
|
+
default_value: []
|
314
|
+
|
315
|
+
set_community_internet:
|
316
|
+
default_value: false
|
317
|
+
|
318
|
+
set_community_local_as:
|
319
|
+
default_value: false
|
320
|
+
|
321
|
+
set_community_no_advtertise:
|
322
|
+
default_value: false
|
323
|
+
|
324
|
+
set_community_no_export:
|
325
|
+
default_value: false
|
326
|
+
|
327
|
+
set_community_none:
|
328
|
+
default_value: false
|
329
|
+
|
330
|
+
set_dampening:
|
331
|
+
get_value: '/^set dampening (.*)$/'
|
332
|
+
set_value: "<state> set dampening <hl> <reuse> <supp> <max>"
|
333
|
+
|
334
|
+
set_dampening_half_life:
|
335
|
+
default_value: false
|
336
|
+
|
337
|
+
set_dampening_max_duation:
|
338
|
+
default_value: false
|
339
|
+
|
340
|
+
set_dampening_reuse:
|
341
|
+
default_value: false
|
342
|
+
|
343
|
+
set_dampening_suppress:
|
344
|
+
default_value: false
|
345
|
+
|
346
|
+
set_distance:
|
347
|
+
get_value: '/^set distance (.*)$/'
|
348
|
+
set_value: "<state> set distance <igp> <internal> <local>"
|
349
|
+
|
350
|
+
set_distance_igp_ebgp:
|
351
|
+
default_value: false
|
352
|
+
|
353
|
+
set_distance_internal:
|
354
|
+
default_value: false
|
355
|
+
|
356
|
+
set_distance_local:
|
357
|
+
default_value: false
|
358
|
+
|
359
|
+
# there is more than one space before delete on some platforms
|
360
|
+
set_extcomm_list:
|
361
|
+
get_value: '/^set extcomm-list (\S+)(?:\s+)? delete$/'
|
362
|
+
set_value: "<state> set extcomm-list <list> delete"
|
363
|
+
default_value: false
|
364
|
+
|
365
|
+
set_extcommunity_4bytes:
|
366
|
+
get_value: '/^set extcommunity 4byteas-generic (.*)$/'
|
367
|
+
set_value: "<state> set extcommunity 4byteas-generic <string>"
|
368
|
+
|
369
|
+
set_extcommunity_4bytes_additive:
|
370
|
+
default_value: false
|
371
|
+
|
372
|
+
set_extcommunity_4bytes_non_transitive:
|
373
|
+
default_value: []
|
374
|
+
|
375
|
+
set_extcommunity_4bytes_none:
|
376
|
+
default_value: false
|
377
|
+
|
378
|
+
set_extcommunity_4bytes_transitive:
|
379
|
+
default_value: []
|
380
|
+
|
381
|
+
set_extcommunity_cost:
|
382
|
+
get_value: '/^set extcommunity cost (.*)$/'
|
383
|
+
set_value: "<state> set extcommunity cost <string>"
|
384
|
+
|
385
|
+
set_extcommunity_cost_device:
|
386
|
+
kind: boolean
|
387
|
+
N3k: &set_extcommunity_device_str
|
388
|
+
default_only: true
|
389
|
+
N5k: &set_extcommunity_device_no_str
|
390
|
+
default_only: false
|
391
|
+
N6k: *set_extcommunity_device_no_str
|
392
|
+
N7k: *set_extcommunity_device_no_str
|
393
|
+
N9k: *set_extcommunity_device_str
|
394
|
+
N9k-F: *set_extcommunity_device_str
|
395
|
+
|
396
|
+
set_extcommunity_cost_igp:
|
397
|
+
default_value: []
|
398
|
+
|
399
|
+
set_extcommunity_cost_pre_bestpath:
|
400
|
+
default_value: []
|
401
|
+
|
402
|
+
set_extcommunity_rt:
|
403
|
+
get_value: '/^set extcommunity rt (.*)$/'
|
404
|
+
set_value: "<state> set extcommunity rt <string>"
|
405
|
+
|
406
|
+
set_extcommunity_rt_additive:
|
407
|
+
default_value: false
|
408
|
+
|
409
|
+
set_extcommunity_rt_asn:
|
410
|
+
default_value: []
|
411
|
+
|
412
|
+
set_forwarding_addr:
|
413
|
+
kind: boolean
|
414
|
+
get_value: '/^set forwarding-address$/'
|
415
|
+
set_value: "<state> set forwarding-address"
|
416
|
+
default_value: false
|
417
|
+
|
418
|
+
set_interface:
|
419
|
+
get_value: '/^set interface (.*)$/'
|
420
|
+
set_value: "<state> set interface <int>"
|
421
|
+
default_value: false
|
422
|
+
|
423
|
+
set_ipv4_default_next_hop:
|
424
|
+
_exclude: [N5k, N6k, N9k, N9k-F]
|
425
|
+
get_value: '/^set ip default next-hop (.*)$/'
|
426
|
+
set_value: "<state> set ip default next-hop <nh>"
|
427
|
+
default_value: []
|
428
|
+
|
429
|
+
set_ipv4_default_next_hop_load_share:
|
430
|
+
_exclude: [N5k, N6k, N9k, N9k-F]
|
431
|
+
default_value: false
|
432
|
+
|
433
|
+
set_ipv4_next_hop:
|
434
|
+
multiple:
|
435
|
+
get_value: '/^set ip next-hop (.*)$/'
|
436
|
+
set_value: "<state> set ip next-hop <nh>"
|
437
|
+
default_value: []
|
438
|
+
|
439
|
+
set_ipv4_next_hop_load_share:
|
440
|
+
_exclude: [N5k, N6k]
|
441
|
+
default_value: false
|
442
|
+
|
443
|
+
set_ipv4_next_hop_peer_addr:
|
444
|
+
kind: boolean
|
445
|
+
get_value: '/^set ip next-hop peer-address$/'
|
446
|
+
set_value: "<state> set ip next-hop peer-address"
|
447
|
+
default_value: false
|
448
|
+
|
449
|
+
set_ipv4_next_hop_redist:
|
450
|
+
kind: boolean
|
451
|
+
get_value: '/^set ip next-hop redist-unchanged$/'
|
452
|
+
set_value: "<state> set ip next-hop redist-unchanged"
|
453
|
+
default_value: false
|
454
|
+
|
455
|
+
set_ipv4_next_hop_unchanged:
|
456
|
+
kind: boolean
|
457
|
+
get_value: '/^set ip next-hop unchanged$/'
|
458
|
+
set_value: "<state> set ip next-hop unchanged"
|
459
|
+
default_value: false
|
460
|
+
|
461
|
+
set_ipv4_precedence:
|
462
|
+
get_value: '/^set ip precedence (\S+)/'
|
463
|
+
set_value: "<state> set ip precedence <pre>"
|
464
|
+
default_value: false
|
465
|
+
|
466
|
+
set_ipv4_prefix:
|
467
|
+
_exclude: [N5k, N6k]
|
468
|
+
get_value: '/^set ip address prefix-list (\S+)/'
|
469
|
+
set_value: "<state> set ip address prefix-list <pf>"
|
470
|
+
default_value: false
|
471
|
+
|
472
|
+
set_ipv6_default_next_hop:
|
473
|
+
_exclude: [N5k, N6k, N9k, N9k-F]
|
474
|
+
get_value: '/^set ipv6 default next-hop (.*)$/'
|
475
|
+
set_value: "<state> set ipv6 default next-hop <nh>"
|
476
|
+
default_value: []
|
477
|
+
|
478
|
+
set_ipv6_default_next_hop_load_share:
|
479
|
+
_exclude: [N5k, N6k, N9k, N9k-F]
|
480
|
+
default_value: false
|
481
|
+
|
482
|
+
set_ipv6_next_hop:
|
483
|
+
multiple:
|
484
|
+
get_value: '/^set ipv6 next-hop (.*)$/'
|
485
|
+
set_value: "<state> set ipv6 next-hop <nh>"
|
486
|
+
default_value: []
|
487
|
+
|
488
|
+
set_ipv6_next_hop_load_share:
|
489
|
+
_exclude: [N5k, N6k]
|
490
|
+
default_value: false
|
491
|
+
|
492
|
+
set_ipv6_next_hop_peer_addr:
|
493
|
+
kind: boolean
|
494
|
+
get_value: '/^set ipv6 next-hop peer-address$/'
|
495
|
+
set_value: "<state> set ipv6 next-hop peer-address"
|
496
|
+
default_value: false
|
497
|
+
|
498
|
+
set_ipv6_next_hop_redist:
|
499
|
+
kind: boolean
|
500
|
+
get_value: '/^set ipv6 next-hop redist-unchanged$/'
|
501
|
+
set_value: "<state> set ipv6 next-hop redist-unchanged"
|
502
|
+
default_value: false
|
503
|
+
|
504
|
+
set_ipv6_next_hop_unchanged:
|
505
|
+
kind: boolean
|
506
|
+
get_value: '/^set ipv6 next-hop unchanged$/'
|
507
|
+
set_value: "<state> set ipv6 next-hop unchanged"
|
508
|
+
default_value: false
|
509
|
+
|
510
|
+
set_ipv6_precedence:
|
511
|
+
get_value: '/^set ipv6 precedence (\S+)/'
|
512
|
+
set_value: "<state> set ipv6 precedence <pre>"
|
513
|
+
default_value: false
|
514
|
+
|
515
|
+
set_ipv6_prefix:
|
516
|
+
_exclude: [N5k, N6k]
|
517
|
+
get_value: '/^set ipv6 address prefix-list (\S+)/'
|
518
|
+
set_value: "<state> set ipv6 address prefix-list <pf>"
|
519
|
+
default_value: false
|
520
|
+
|
521
|
+
set_level:
|
522
|
+
get_value: '/^set level (\S+)$/'
|
523
|
+
set_value: "<state> set level <level>"
|
524
|
+
default_value: false
|
525
|
+
|
526
|
+
set_local_preference:
|
527
|
+
kind: int
|
528
|
+
get_value: '/^set local-preference (\d+)$/'
|
529
|
+
set_value: "<state> set local-preference <pref>"
|
530
|
+
default_value: false
|
531
|
+
|
532
|
+
set_metric:
|
533
|
+
get_value: '/^set metric (.*)$/'
|
534
|
+
set_value: "<state> set metric <additive><bw> <delay> <rel> <eff> <mtu>"
|
535
|
+
|
536
|
+
set_metric_additive:
|
537
|
+
default_value: false
|
538
|
+
|
539
|
+
set_metric_bandwidth:
|
540
|
+
default_value: false
|
541
|
+
|
542
|
+
set_metric_delay:
|
543
|
+
default_value: false
|
544
|
+
|
545
|
+
set_metric_effective_bandwidth:
|
546
|
+
default_value: false
|
547
|
+
|
548
|
+
set_metric_mtu:
|
549
|
+
default_value: false
|
550
|
+
|
551
|
+
set_metric_reliability:
|
552
|
+
default_value: false
|
553
|
+
|
554
|
+
set_metric_type:
|
555
|
+
get_value: '/^set metric-type (\S+)$/'
|
556
|
+
set_value: "<state> set metric-type <type>"
|
557
|
+
default_value: false
|
558
|
+
|
559
|
+
set_nssa_only:
|
560
|
+
kind: boolean
|
561
|
+
get_value: '/^set nssa-only$/'
|
562
|
+
set_value: "<state> set nssa-only"
|
563
|
+
default_value: false
|
564
|
+
|
565
|
+
set_origin:
|
566
|
+
get_value: '/^set origin (\S+)/'
|
567
|
+
set_value: "<state> set origin <origin>"
|
568
|
+
default_value: false
|
569
|
+
|
570
|
+
set_path_selection:
|
571
|
+
kind: boolean
|
572
|
+
get_value: '/^set path-selection all advertise$/'
|
573
|
+
set_value: "<state> set path-selection all advertise"
|
574
|
+
default_value: false
|
575
|
+
|
576
|
+
set_tag:
|
577
|
+
kind: int
|
578
|
+
get_value: '/^set tag (\d+)/'
|
579
|
+
set_value: "<state> set tag <tag>"
|
580
|
+
default_value: false
|
581
|
+
|
582
|
+
set_vrf:
|
583
|
+
_exclude: [N3k, N5k, N6k, N9k, N9k-F]
|
584
|
+
get_value: '/^set vrf (\S+)$/'
|
585
|
+
set_value: "<state> set vrf <vrf>"
|
586
|
+
default_value: false
|
587
|
+
|
588
|
+
set_weight:
|
589
|
+
kind: int
|
590
|
+
get_value: '/^set weight (\d+)$/'
|
591
|
+
set_value: "<state> set weight <weight>"
|
592
|
+
default_value: false
|