cisco_node_utils 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/CHANGELOG.md +126 -1
- data/README.md +19 -12
- data/Rakefile +1 -0
- data/bin/git/hooks/commit-msg/enforce_style +8 -0
- data/cisco_node_utils.gemspec +4 -3
- data/docs/README-develop-best-practices.md +127 -109
- data/docs/README-develop-node-utils-APIs.md +47 -39
- data/docs/template-router.rb +3 -7
- data/lib/.rubocop.yml +4 -4
- data/lib/cisco_node_utils.rb +1 -1
- data/lib/cisco_node_utils/aaa_authentication_login.rb +96 -0
- data/lib/cisco_node_utils/aaa_authentication_login_service.rb +133 -0
- data/lib/cisco_node_utils/aaa_authorization_service.rb +150 -0
- data/lib/cisco_node_utils/ace.rb +196 -0
- data/lib/cisco_node_utils/acl.rb +100 -0
- data/lib/cisco_node_utils/bgp.rb +301 -163
- data/lib/cisco_node_utils/bgp_af.rb +187 -19
- data/lib/cisco_node_utils/bgp_neighbor.rb +18 -33
- data/lib/cisco_node_utils/bgp_neighbor_af.rb +25 -48
- data/lib/cisco_node_utils/cisco_cmn_utils.rb +23 -4
- data/lib/cisco_node_utils/cmd_ref/README_YAML.md +593 -0
- data/lib/cisco_node_utils/cmd_ref/aaa_auth_login_service.yaml +22 -0
- data/lib/cisco_node_utils/cmd_ref/aaa_authentication_login.yaml +31 -0
- data/lib/cisco_node_utils/cmd_ref/aaa_authorization_service.yaml +22 -0
- data/lib/cisco_node_utils/cmd_ref/acl.yaml +43 -0
- data/lib/cisco_node_utils/cmd_ref/bgp.yaml +242 -0
- data/lib/cisco_node_utils/cmd_ref/bgp_af.yaml +164 -0
- data/lib/cisco_node_utils/cmd_ref/bgp_neighbor.yaml +131 -0
- data/lib/cisco_node_utils/cmd_ref/bgp_neighbor_af.yaml +179 -0
- data/lib/cisco_node_utils/cmd_ref/dnsclient.yaml +34 -0
- data/lib/cisco_node_utils/cmd_ref/evpn_vni.yaml +42 -0
- data/lib/cisco_node_utils/cmd_ref/fabricpath.yaml +172 -0
- data/lib/cisco_node_utils/cmd_ref/fabricpath_topology.yaml +35 -0
- data/lib/cisco_node_utils/cmd_ref/feature.yaml +42 -0
- data/lib/cisco_node_utils/cmd_ref/fex.yaml +9 -0
- data/lib/cisco_node_utils/cmd_ref/images.yaml +7 -0
- data/lib/cisco_node_utils/cmd_ref/interface.yaml +339 -0
- data/lib/cisco_node_utils/cmd_ref/interface_channel_group.yaml +28 -0
- data/lib/cisco_node_utils/cmd_ref/interface_ospf.yaml +61 -0
- data/lib/cisco_node_utils/cmd_ref/interface_portchannel.yaml +54 -0
- data/lib/cisco_node_utils/cmd_ref/interface_service_vni.yaml +32 -0
- data/lib/cisco_node_utils/cmd_ref/inventory.yaml +45 -0
- data/lib/cisco_node_utils/cmd_ref/memory.yaml +13 -0
- data/lib/cisco_node_utils/cmd_ref/ntp_config.yaml +7 -0
- data/lib/cisco_node_utils/cmd_ref/ntp_server.yaml +14 -0
- data/lib/cisco_node_utils/cmd_ref/ospf.yaml +74 -0
- data/lib/cisco_node_utils/cmd_ref/overlay_global.yaml +33 -0
- data/lib/cisco_node_utils/cmd_ref/pim.yaml +40 -0
- data/lib/cisco_node_utils/cmd_ref/portchannel_global.yaml +69 -0
- data/lib/cisco_node_utils/cmd_ref/radius_global.yaml +25 -0
- data/lib/cisco_node_utils/cmd_ref/radius_server.yaml +64 -0
- data/lib/cisco_node_utils/cmd_ref/radius_server_group.yaml +14 -0
- data/lib/cisco_node_utils/cmd_ref/show_system.yaml +5 -0
- data/lib/cisco_node_utils/cmd_ref/show_version.yaml +72 -0
- data/lib/cisco_node_utils/cmd_ref/snmp_community.yaml +23 -0
- data/lib/cisco_node_utils/cmd_ref/snmp_group.yaml +7 -0
- data/lib/cisco_node_utils/cmd_ref/snmp_notification_receiver.yaml +50 -0
- data/lib/cisco_node_utils/cmd_ref/snmp_server.yaml +51 -0
- data/lib/cisco_node_utils/cmd_ref/snmp_user.yaml +55 -0
- data/lib/cisco_node_utils/cmd_ref/snmpnotification.yaml +11 -0
- data/lib/cisco_node_utils/cmd_ref/syslog_server.yaml +18 -0
- data/lib/cisco_node_utils/cmd_ref/syslog_settings.yaml +7 -0
- data/lib/cisco_node_utils/cmd_ref/system.yaml +6 -0
- data/lib/cisco_node_utils/cmd_ref/tacacs_server.yaml +49 -0
- data/lib/cisco_node_utils/cmd_ref/tacacs_server_group.yaml +33 -0
- data/lib/cisco_node_utils/cmd_ref/tacacs_server_host.yaml +35 -0
- data/lib/cisco_node_utils/cmd_ref/vdc.yaml +38 -0
- data/lib/cisco_node_utils/cmd_ref/virtual_service.yaml +6 -0
- data/lib/cisco_node_utils/cmd_ref/vlan.yaml +56 -0
- data/lib/cisco_node_utils/cmd_ref/vni.yaml +76 -0
- data/lib/cisco_node_utils/cmd_ref/vpc.yaml +197 -0
- data/lib/cisco_node_utils/cmd_ref/vrf.yaml +88 -0
- data/lib/cisco_node_utils/cmd_ref/vtp.yaml +38 -0
- data/lib/cisco_node_utils/cmd_ref/vxlan_vtep.yaml +60 -0
- data/lib/cisco_node_utils/cmd_ref/vxlan_vtep_vni.yaml +39 -0
- data/lib/cisco_node_utils/cmd_ref/yum.yaml +13 -0
- data/lib/cisco_node_utils/command_reference.rb +359 -187
- data/lib/cisco_node_utils/configparser_lib.rb +1 -1
- data/lib/cisco_node_utils/dns_domain.rb +19 -5
- data/lib/cisco_node_utils/domain_name.rb +4 -8
- data/lib/cisco_node_utils/evpn_vni.rb +157 -0
- data/lib/cisco_node_utils/fabricpath_global.rb +388 -0
- data/lib/cisco_node_utils/fabricpath_topology.rb +150 -0
- data/lib/cisco_node_utils/feature.rb +111 -0
- data/lib/cisco_node_utils/interface.rb +390 -97
- data/lib/cisco_node_utils/interface_channel_group.rb +124 -0
- data/lib/cisco_node_utils/interface_ospf.rb +11 -34
- data/lib/cisco_node_utils/interface_portchannel.rb +157 -0
- data/lib/cisco_node_utils/interface_service_vni.rb +132 -0
- data/lib/cisco_node_utils/name_server.rb +1 -1
- data/lib/cisco_node_utils/node.rb +55 -249
- data/lib/cisco_node_utils/node_util.rb +5 -1
- data/lib/cisco_node_utils/ntp_config.rb +2 -2
- data/lib/cisco_node_utils/ntp_server.rb +14 -5
- data/lib/cisco_node_utils/overlay_global.rb +153 -0
- data/lib/cisco_node_utils/pim.rb +124 -0
- data/lib/cisco_node_utils/pim_group_list.rb +108 -0
- data/lib/cisco_node_utils/pim_rp_address.rb +102 -0
- data/lib/cisco_node_utils/platform.rb +8 -9
- data/lib/cisco_node_utils/portchannel_global.rb +277 -0
- data/lib/cisco_node_utils/radius_global.rb +9 -19
- data/lib/cisco_node_utils/radius_server.rb +31 -41
- data/lib/cisco_node_utils/radius_server_group.rb +117 -0
- data/lib/cisco_node_utils/router_ospf.rb +1 -1
- data/lib/cisco_node_utils/router_ospf_vrf.rb +14 -19
- data/lib/cisco_node_utils/snmp_notification_receiver.rb +158 -0
- data/lib/cisco_node_utils/snmpcommunity.rb +3 -5
- data/lib/cisco_node_utils/snmpgroup.rb +1 -1
- data/lib/cisco_node_utils/snmpnotification.rb +57 -0
- data/lib/cisco_node_utils/snmpserver.rb +8 -17
- data/lib/cisco_node_utils/snmpuser.rb +67 -28
- data/lib/cisco_node_utils/syslog_server.rb +3 -9
- data/lib/cisco_node_utils/syslog_settings.rb +2 -10
- data/lib/cisco_node_utils/tacacs_server.rb +9 -14
- data/lib/cisco_node_utils/tacacs_server_group.rb +145 -0
- data/lib/cisco_node_utils/tacacs_server_host.rb +5 -9
- data/lib/cisco_node_utils/vdc.rb +88 -0
- data/lib/cisco_node_utils/version.rb +5 -2
- data/lib/cisco_node_utils/vlan.rb +71 -8
- data/lib/cisco_node_utils/vni.rb +227 -0
- data/lib/cisco_node_utils/vpc.rb +377 -0
- data/lib/cisco_node_utils/vrf.rb +60 -9
- data/lib/cisco_node_utils/vrf_af.rb +191 -0
- data/lib/cisco_node_utils/vtp.rb +8 -6
- data/lib/cisco_node_utils/vxlan_vtep.rb +151 -0
- data/lib/cisco_node_utils/vxlan_vtep_vni.rb +234 -0
- data/lib/cisco_node_utils/yum.rb +1 -1
- data/tests/.rubocop.yml +1 -1
- data/tests/basetest.rb +16 -7
- data/tests/ciscotest.rb +55 -13
- data/tests/cmd_config.yaml +2 -2
- data/tests/platform_info.rb +3 -2
- data/tests/test_aaa_authentication_login.rb +219 -0
- data/tests/test_aaa_authentication_login_service.rb +759 -0
- data/tests/test_aaa_authorization_service.rb +1041 -0
- data/tests/test_ace.rb +160 -0
- data/tests/test_acl.rb +176 -0
- data/tests/test_bgp_af.rb +269 -13
- data/tests/test_bgp_neighbor.rb +38 -40
- data/tests/test_bgp_neighbor_af.rb +92 -32
- data/tests/test_command_config.rb +5 -5
- data/tests/test_command_reference.rb +284 -101
- data/tests/test_dns_domain.rb +1 -1
- data/tests/test_domain_name.rb +1 -1
- data/tests/test_evpn_vni.rb +106 -0
- data/tests/test_fabricpath_global.rb +243 -0
- data/tests/test_fabricpath_topology.rb +98 -0
- data/tests/test_interface.rb +292 -74
- data/tests/test_interface_channel_group.rb +74 -0
- data/tests/test_interface_ospf.rb +9 -4
- data/tests/test_interface_portchannel.rb +105 -0
- data/tests/test_interface_service_vni.rb +232 -0
- data/tests/test_interface_svi.rb +77 -62
- data/tests/test_interface_switchport.rb +17 -5
- data/tests/test_name_server.rb +1 -1
- data/tests/test_node.rb +1 -1
- data/tests/test_node_ext.rb +10 -20
- data/tests/test_ntp_config.rb +1 -1
- data/tests/test_ntp_server.rb +18 -6
- data/tests/test_overlay_global.rb +102 -0
- data/tests/test_pim.rb +177 -0
- data/tests/test_pim_group_list.rb +181 -0
- data/tests/test_pim_rp_address.rb +153 -0
- data/tests/test_platform.rb +3 -3
- data/tests/test_portchannel_global.rb +202 -0
- data/tests/test_radius_global.rb +1 -1
- data/tests/test_radius_server.rb +92 -57
- data/tests/test_radius_server_group.rb +149 -0
- data/tests/test_router_bgp.rb +283 -112
- data/tests/test_router_ospf.rb +2 -2
- data/tests/test_router_ospf_vrf.rb +4 -4
- data/tests/test_snmp_notification_receiver.rb +167 -0
- data/tests/test_snmpcommunity.rb +1 -1
- data/tests/test_snmpgroup.rb +1 -1
- data/tests/test_snmpnotification.rb +72 -0
- data/tests/test_snmpserver.rb +29 -105
- data/tests/test_snmpuser.rb +32 -30
- data/tests/test_syslog_server.rb +36 -10
- data/tests/test_syslog_settings.rb +1 -1
- data/tests/test_tacacs_server.rb +1 -1
- data/tests/test_tacacs_server_group.rb +405 -0
- data/tests/test_tacacs_server_host.rb +1 -1
- data/tests/test_vdc.rb +78 -0
- data/tests/test_vlan.rb +74 -19
- data/tests/test_vlan_mt_full.rb +95 -0
- data/tests/test_vni.rb +106 -0
- data/tests/test_vpc.rb +361 -0
- data/tests/test_vrf.rb +172 -29
- data/tests/test_vtp.rb +1 -1
- data/tests/test_vxlan_vtep.rb +214 -0
- data/tests/test_vxlan_vtep_vni.rb +201 -0
- data/tests/test_yum.rb +1 -1
- metadata +120 -11
- data/lib/cisco_node_utils/README_YAML.md +0 -325
- data/lib/cisco_node_utils/command_reference_common.yaml +0 -1051
- data/lib/cisco_node_utils/command_reference_common_bgp.yaml +0 -535
- data/lib/cisco_node_utils/command_reference_n3064.yaml +0 -13
- data/lib/cisco_node_utils/command_reference_n7k.yaml +0 -52
- data/lib/cisco_node_utils/command_reference_n9k.yaml +0 -26
- data/tests/platform_info.yaml +0 -10
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
# Command Reference YAML
|
|
2
|
-
|
|
3
|
-
The `command_reference_*.yaml` files in this directory are used with the
|
|
4
|
-
`CommandReference` module as a way to abstract away platform CLI differences.
|
|
5
|
-
|
|
6
|
-
This document describes the structure and semantics of these files.
|
|
7
|
-
|
|
8
|
-
## Structure
|
|
9
|
-
|
|
10
|
-
```yaml
|
|
11
|
-
FEATURE_1:
|
|
12
|
-
_template:
|
|
13
|
-
# base parameters for all attributes of this feature go here
|
|
14
|
-
|
|
15
|
-
ATTRIBUTE_1:
|
|
16
|
-
config_get: 'string'
|
|
17
|
-
config_get_token: 'string'
|
|
18
|
-
config_get_token_append: 'string'
|
|
19
|
-
config_set: 'string'
|
|
20
|
-
config_set_append: 'string'
|
|
21
|
-
default_value: string, boolean, integer, or constant
|
|
22
|
-
test_config_get: 'string'
|
|
23
|
-
test_config_get_regexp: '/regexp/'
|
|
24
|
-
test_config_result:
|
|
25
|
-
input_1: output_1
|
|
26
|
-
input_2: output_2
|
|
27
|
-
|
|
28
|
-
ATTRIBUTE_2:
|
|
29
|
-
...
|
|
30
|
-
|
|
31
|
-
ATTRIBUTE_3:
|
|
32
|
-
...
|
|
33
|
-
|
|
34
|
-
FEATURE_2:
|
|
35
|
-
...
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
All parameters are optional and may be omitted if not needed.
|
|
39
|
-
|
|
40
|
-
### Wildcard substitution
|
|
41
|
-
|
|
42
|
-
The `config_get_token` and `config_set` (and their associated `_append`
|
|
43
|
-
variants) all support two forms of wildcarding - printf-style and key-value.
|
|
44
|
-
|
|
45
|
-
#### Printf-style wildcards
|
|
46
|
-
|
|
47
|
-
```yaml
|
|
48
|
-
tacacs_server_host:
|
|
49
|
-
encryption:
|
|
50
|
-
config_set: '%s tacacs-server host %s key %s %s'
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
This permits parameter values to be passed as a simple sequence:
|
|
54
|
-
|
|
55
|
-
```ruby
|
|
56
|
-
config_set('tacacs_server_host', 'encryption', 'no', 'user', 'md5', 'password')
|
|
57
|
-
|
|
58
|
-
# this becomes 'no tacacs-server host user key md5 password'
|
|
59
|
-
# ^^ ^^^^ ^^^ ^^^^^^^^
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
This approach is quick to implement and concise, but less flexible - in
|
|
63
|
-
particular it cannot handle a case where different platforms take parameters
|
|
64
|
-
in a different order - and less readable in the ruby code.
|
|
65
|
-
|
|
66
|
-
#### Key-value wildcards
|
|
67
|
-
|
|
68
|
-
```yaml
|
|
69
|
-
ospf:
|
|
70
|
-
auto_cost:
|
|
71
|
-
config_set: ['router ospf <name>', 'auto-cost reference-bandwidth <cost> <type>']
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
This requires parameter values to be passed as a hash:
|
|
75
|
-
|
|
76
|
-
```ruby
|
|
77
|
-
config_set('ospf', 'auto_cost', {:name => 'red',
|
|
78
|
-
:cost => '40',
|
|
79
|
-
:type => 'Gbps'})
|
|
80
|
-
|
|
81
|
-
# this becomes the config sequence:
|
|
82
|
-
# router ospf red
|
|
83
|
-
# auto-cost reference-bandwidth 40 Gbps
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
This approach is moderately more complex to implement but is more readable in
|
|
87
|
-
the ruby code and is flexible enough to handle significant platform
|
|
88
|
-
differences in CLI. It is therefore the recommended approach for new
|
|
89
|
-
development.
|
|
90
|
-
|
|
91
|
-
### `_template`
|
|
92
|
-
|
|
93
|
-
The optional `_template` section can be used to define base parameters for all
|
|
94
|
-
attributes of a given feature. For example, all interface attributes might be
|
|
95
|
-
checked with the `show running-config interface all` command, and all
|
|
96
|
-
attributes might be set by first entering the interface configuration submode
|
|
97
|
-
with the `interface <name>` configuration command. Thus, you might have:
|
|
98
|
-
|
|
99
|
-
```yaml
|
|
100
|
-
interface:
|
|
101
|
-
_template:
|
|
102
|
-
config_get: 'show running-config interface all'
|
|
103
|
-
config_get_token: '/^interface <name>$/'
|
|
104
|
-
config_set: 'interface <name>'
|
|
105
|
-
|
|
106
|
-
access_vlan:
|
|
107
|
-
config_get_token_append: '/^switchport access vlan (.*)$/'
|
|
108
|
-
config_set_append: 'switchport access vlan <number>'
|
|
109
|
-
|
|
110
|
-
description:
|
|
111
|
-
config_get_token_append: '/^description (.*)$/'
|
|
112
|
-
config_set_append: 'description <desc>'
|
|
113
|
-
|
|
114
|
-
...
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
instead of the more repetitive (but equally valid):
|
|
118
|
-
|
|
119
|
-
```yaml
|
|
120
|
-
interface:
|
|
121
|
-
access_vlan:
|
|
122
|
-
config_get: 'show running interface all'
|
|
123
|
-
config_get_token: ['/^interface %s$/i', '/^switchport access vlan (.*)$/']
|
|
124
|
-
config_set: ['interface %s', 'switchport access vlan %s']
|
|
125
|
-
|
|
126
|
-
description:
|
|
127
|
-
config_get: 'show running-config interface all'
|
|
128
|
-
config_get_token: ['/^interface <name>$/i', '/^description (.*)$/']
|
|
129
|
-
config_set: ['interface <name>', 'description <desc>']
|
|
130
|
-
|
|
131
|
-
...
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### `config_get`
|
|
135
|
-
|
|
136
|
-
`config_get` must be a single string representing the CLI command (usually a
|
|
137
|
-
`show` command) to be used to display the information needed to get the
|
|
138
|
-
current value of this attribute.
|
|
139
|
-
|
|
140
|
-
```yaml
|
|
141
|
-
config_get: 'show running-config interface <name> all'
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### `config_get_token`
|
|
145
|
-
|
|
146
|
-
`config_get_token` can be a single string, a single regex, an array of strings,
|
|
147
|
-
or an array of regexs.
|
|
148
|
-
|
|
149
|
-
If this value is a string or array of strings, then the `config_get` command
|
|
150
|
-
will be executed to produce _structured_ output and the string(s) will be
|
|
151
|
-
used as lookup keys.
|
|
152
|
-
|
|
153
|
-
```yaml
|
|
154
|
-
show_version
|
|
155
|
-
cpu:
|
|
156
|
-
config_get: 'show version'
|
|
157
|
-
config_get_token: 'cpu_name'
|
|
158
|
-
# config_get('show_version', 'cpu') returns structured_output['cpu_name']
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
```yaml
|
|
162
|
-
inventory:
|
|
163
|
-
productid:
|
|
164
|
-
config_get: 'show inventory'
|
|
165
|
-
config_get_token: ['TABLE_inv', 'ROW_inv', 0, 'productid']
|
|
166
|
-
# config_get('inventory', 'productid') returns
|
|
167
|
-
# structured_output['TABLE_inv']['ROW_inv'][0]['productid']
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
If this value is a regex or array or regexs, then the `config_get` command
|
|
171
|
-
will be executed to produce _plaintext_ output.
|
|
172
|
-
|
|
173
|
-
For a single regex, it will be used to match against the plaintext.
|
|
174
|
-
|
|
175
|
-
```yaml
|
|
176
|
-
memory:
|
|
177
|
-
total:
|
|
178
|
-
config_get: 'show system resources'
|
|
179
|
-
config_get_token: '/Memory.* (\S+) total/'
|
|
180
|
-
# config_get('memory', 'total') returns
|
|
181
|
-
# plaintext_output.scan(/Memory.* (\S+) total/)
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
For an array of regex, then the plaintext is assumed to be hierarchical in
|
|
185
|
-
nature (like `show running-config`) and the regexs are used to filter down
|
|
186
|
-
through the hierarchy.
|
|
187
|
-
|
|
188
|
-
```yaml
|
|
189
|
-
interface:
|
|
190
|
-
description:
|
|
191
|
-
config_get: 'show running interface all'
|
|
192
|
-
config_get_token: ['/^interface %s$/i', '/^description (.*)/']
|
|
193
|
-
# config_get('interface', 'description', 'Ethernet1/1') gets the plaintext
|
|
194
|
-
# output, finds the subsection under /^interface Ethernet1/1$/i, then finds
|
|
195
|
-
# the line matching /^description (.*)$/ in that subsection
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### `config_get_token_append`
|
|
199
|
-
|
|
200
|
-
When using a `_template` section, an attribute can use
|
|
201
|
-
`config_get_token_append` to extend the `config_get_token` value provided by
|
|
202
|
-
the template instead of replacing it:
|
|
203
|
-
|
|
204
|
-
```yaml
|
|
205
|
-
interface:
|
|
206
|
-
_template:
|
|
207
|
-
config_get: 'show running-config interface all'
|
|
208
|
-
config_get_token: '/^interface <name>$/'
|
|
209
|
-
|
|
210
|
-
description:
|
|
211
|
-
config_get_token_append: '/^description (.*)$/'
|
|
212
|
-
# config_get_token value for 'description' is now:
|
|
213
|
-
# ['/^interface %s$/i', '/^description (.*)$/']
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
This can also be used to specify conditional tokens which may or may not be
|
|
217
|
-
used depending on the set of parameters passed into `config_get()`:
|
|
218
|
-
|
|
219
|
-
```yaml
|
|
220
|
-
bgp:
|
|
221
|
-
_template:
|
|
222
|
-
config_get: 'show running bgp all'
|
|
223
|
-
config_get_token: '/^router bgp <asnum>$/'
|
|
224
|
-
config_get_token_append:
|
|
225
|
-
- '/^vrf <vrf>$/'
|
|
226
|
-
|
|
227
|
-
router_id:
|
|
228
|
-
config_get_token_append: '/^router-id (\S+)$/'
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
In this example, both `config_get('bgp', 'router_id', {:asnum => '1'})` and
|
|
232
|
-
`config_get('bgp', 'router_id', {:asnum => '1', :vrf => 'red'})` are valid -
|
|
233
|
-
the former will match 'router bgp 1' followed by 'router-id', while the latter
|
|
234
|
-
will match 'router bgp 1' followed by 'vrf red' followed by 'router-id'.
|
|
235
|
-
|
|
236
|
-
### `config_set`
|
|
237
|
-
|
|
238
|
-
The `config_set` parameter is a string or array of strings representing the
|
|
239
|
-
configuration CLI command(s) used to set the value of the attribute.
|
|
240
|
-
|
|
241
|
-
```yaml
|
|
242
|
-
interface:
|
|
243
|
-
create:
|
|
244
|
-
config_set: 'interface <name>'
|
|
245
|
-
|
|
246
|
-
description:
|
|
247
|
-
config_set: ['interface <name>', 'description <desc>']
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### `config_set_append`
|
|
251
|
-
|
|
252
|
-
When using a `_template` section, an attribute can use `config_set_append` to
|
|
253
|
-
extend the `config_set` value provided by the template instead of replacing it:
|
|
254
|
-
|
|
255
|
-
```yaml
|
|
256
|
-
interface:
|
|
257
|
-
_template:
|
|
258
|
-
config_set: 'interface <name>'
|
|
259
|
-
|
|
260
|
-
access_vlan:
|
|
261
|
-
config_set_append: 'switchport access vlan <number>'
|
|
262
|
-
# config_set value for 'access_vlan' is now:
|
|
263
|
-
# ['interface <name>', 'switchport access vlan <number>']
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
Much like `config_get_token_append`, this can also be used to specify optional
|
|
267
|
-
commands that can be included or omitted as needed:
|
|
268
|
-
|
|
269
|
-
```yaml
|
|
270
|
-
bgp:
|
|
271
|
-
_template:
|
|
272
|
-
config_set: 'router bgp <asnum>'
|
|
273
|
-
config_set_append:
|
|
274
|
-
- 'vrf <vrf>'
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
### `default_value`
|
|
278
|
-
|
|
279
|
-
If there is a default value for this attribute when not otherwise specified by
|
|
280
|
-
the user, the `default_value` parameter describes it. This can be a string,
|
|
281
|
-
boolean, integer, or array.
|
|
282
|
-
|
|
283
|
-
```yaml
|
|
284
|
-
interface:
|
|
285
|
-
description:
|
|
286
|
-
default_value: ''
|
|
287
|
-
|
|
288
|
-
interface_ospf:
|
|
289
|
-
hello_interval:
|
|
290
|
-
default_value: 10
|
|
291
|
-
|
|
292
|
-
ospf:
|
|
293
|
-
auto_cost:
|
|
294
|
-
default_value: [40, 'Gbps']
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
### `test_config_get` and `test_config_get_regex`
|
|
298
|
-
|
|
299
|
-
Test-only equivalents to `config_get` and `config_get_token` - a show command
|
|
300
|
-
to be executed over telnet by the minitest unit test scripts, and a regex
|
|
301
|
-
(or array thereof) to match in the resulting plaintext output.
|
|
302
|
-
Should only be referenced by test scripts, never by a feature provider itself.
|
|
303
|
-
|
|
304
|
-
```yaml
|
|
305
|
-
show_version:
|
|
306
|
-
boot_image:
|
|
307
|
-
test_config_get: 'show version | no-more'
|
|
308
|
-
test_config_get_regex: '/NXOS image file is: (.*)$/'
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
### `test_config_result`
|
|
312
|
-
|
|
313
|
-
Test-only container for input-result pairs that might differ by platform.
|
|
314
|
-
Should only be referenced by test scripts, never by a feature provider itself.
|
|
315
|
-
|
|
316
|
-
```yaml
|
|
317
|
-
vtp:
|
|
318
|
-
version:
|
|
319
|
-
test_config_result:
|
|
320
|
-
3: 'Cisco::CliError'
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
## Style Guide
|
|
324
|
-
|
|
325
|
-
Please see [YAML Best Practices](../../docs/README-develop-best-practices.md#ydbp).
|
|
@@ -1,1051 +0,0 @@
|
|
|
1
|
-
# Command Reference Common
|
|
2
|
-
#
|
|
3
|
-
# For documentation please see:
|
|
4
|
-
# - README_YAML.md
|
|
5
|
-
#
|
|
6
|
-
---
|
|
7
|
-
aaa_authentication_login:
|
|
8
|
-
ascii_authentication:
|
|
9
|
-
config_get: "show run aaa all"
|
|
10
|
-
config_get_token: '/^aaa authentication login ascii-authentication/'
|
|
11
|
-
config_set: "%s aaa authentication login ascii-authentication"
|
|
12
|
-
default_value: false
|
|
13
|
-
|
|
14
|
-
chap:
|
|
15
|
-
config_get: "show run aaa all"
|
|
16
|
-
config_get_token: '/^aaa authentication login chap enable/'
|
|
17
|
-
config_set: "%s aaa authentication login chap enable"
|
|
18
|
-
default_value: false
|
|
19
|
-
|
|
20
|
-
error_display:
|
|
21
|
-
config_get: "show run aaa all"
|
|
22
|
-
config_get_token: '/^aaa authentication login error-enable/'
|
|
23
|
-
config_set: "%s aaa authentication login error-enable"
|
|
24
|
-
default_value: false
|
|
25
|
-
|
|
26
|
-
mschap:
|
|
27
|
-
config_get: "show run aaa all"
|
|
28
|
-
config_get_token: '/^aaa authentication login mschap enable/'
|
|
29
|
-
config_set: "%s aaa authentication login mschap enable"
|
|
30
|
-
default_value: false
|
|
31
|
-
|
|
32
|
-
mschapv2:
|
|
33
|
-
config_get: "show run aaa all"
|
|
34
|
-
config_get_token: '/^aaa authentication login mschapv2 enable/'
|
|
35
|
-
config_set: "%s aaa authentication login mschapv2 enable"
|
|
36
|
-
default_value: false
|
|
37
|
-
|
|
38
|
-
aaa_auth_login_service:
|
|
39
|
-
groups:
|
|
40
|
-
config_get: "show aaa authentication"
|
|
41
|
-
config_get_token: ["TABLE_AuthenMethods", "ROW_AuthenMethods"]
|
|
42
|
-
# this set is only used when there are groups to configure
|
|
43
|
-
config_set: "%s aaa authentication login %s group %s %s"
|
|
44
|
-
default_value: []
|
|
45
|
-
|
|
46
|
-
method:
|
|
47
|
-
config_get: "show aaa authentication"
|
|
48
|
-
#config_get_token: '/aaa authentication login %s (?:group (?:\S+ )+)?(local|none)$/'
|
|
49
|
-
config_get_token: '/^\s*%s:.*(local|none)\s*$/'
|
|
50
|
-
# this set is only used when there are no groups to configure
|
|
51
|
-
config_set: "%s aaa authentication login %s %s"
|
|
52
|
-
default_value: :local
|
|
53
|
-
|
|
54
|
-
services:
|
|
55
|
-
config_get: "show run aaa all"
|
|
56
|
-
#config_get_token: '/^\s*(\S+):/'
|
|
57
|
-
config_get_token: '/^aaa authentication login (\S+) (?:none|group|local)/'
|
|
58
|
-
|
|
59
|
-
aaa_server_group:
|
|
60
|
-
deadtime:
|
|
61
|
-
default_value: 0
|
|
62
|
-
|
|
63
|
-
servers:
|
|
64
|
-
default_value: []
|
|
65
|
-
|
|
66
|
-
source_interface:
|
|
67
|
-
default_value: ""
|
|
68
|
-
|
|
69
|
-
tacacs_deadtime:
|
|
70
|
-
config_get: "show run tacacs all"
|
|
71
|
-
config_get_token: ['/^aaa group server tacacs\+ %s/', '/^deadtime (\d+)/']
|
|
72
|
-
config_set: ["aaa group server tacacs %s", "%s deadtime %s"]
|
|
73
|
-
|
|
74
|
-
tacacs_group:
|
|
75
|
-
config_set: "%s aaa group server tacacs %s"
|
|
76
|
-
|
|
77
|
-
tacacs_groups:
|
|
78
|
-
config_get: "show run tacacs all"
|
|
79
|
-
config_get_token: '/^aaa group server tacacs\+ (\S+)/'
|
|
80
|
-
|
|
81
|
-
tacacs_server:
|
|
82
|
-
config_set: ["aaa group server tacacs %s", "%s server %s"]
|
|
83
|
-
|
|
84
|
-
tacacs_servers:
|
|
85
|
-
config_get: "show run tacacs all"
|
|
86
|
-
config_get_token: ['/^aaa group server tacacs\+ %s/', '/^server (\S+)/']
|
|
87
|
-
|
|
88
|
-
tacacs_source_interface:
|
|
89
|
-
config_get: "show run tacacs all"
|
|
90
|
-
config_get_token: ['/^aaa group server tacacs\+ %s/', '/^source-interface (\S+)/']
|
|
91
|
-
config_set: ["aaa group server tacacs %s", "%s source-interface %s"]
|
|
92
|
-
|
|
93
|
-
tacacs_vrf:
|
|
94
|
-
config_get: "show run tacacs all"
|
|
95
|
-
config_get_token: ['/^aaa group server tacacs\+ %s/', '/^use-vrf (\S+)/']
|
|
96
|
-
config_set: ["aaa group server tacacs %s", "%s use-vrf %s"]
|
|
97
|
-
|
|
98
|
-
vrf:
|
|
99
|
-
default_value: "default"
|
|
100
|
-
|
|
101
|
-
dnsclient:
|
|
102
|
-
domain_list:
|
|
103
|
-
config_get: "show running-config all"
|
|
104
|
-
config_get_token: '/^ip domain-list (\S+)$/'
|
|
105
|
-
config_set: '<state> ip domain-list <name>'
|
|
106
|
-
default_value: ''
|
|
107
|
-
|
|
108
|
-
domain_list_vrf:
|
|
109
|
-
config_get: "show running-config all"
|
|
110
|
-
config_get_token: ['/vrf context <vrf>/', '/ip domain-list (\S+)/']
|
|
111
|
-
config_set: ['vrf context <vrf>', '<state> ip domain-list <name>']
|
|
112
|
-
default_value: ''
|
|
113
|
-
|
|
114
|
-
domain_name:
|
|
115
|
-
config_get: 'show running-config all'
|
|
116
|
-
config_get_token: '/^ip domain-name (\S+)$/'
|
|
117
|
-
config_set: '<state> ip domain-name <name>'
|
|
118
|
-
default_value: ''
|
|
119
|
-
|
|
120
|
-
domain_name_vrf:
|
|
121
|
-
config_get: 'show running-config all'
|
|
122
|
-
config_get_token: ['/vrf context <vrf>/', '/ip domain-name (\S+)/']
|
|
123
|
-
config_set: ['vrf context <vrf>', '<state> ip domain-name <name>']
|
|
124
|
-
default_value: ''
|
|
125
|
-
|
|
126
|
-
name_server:
|
|
127
|
-
config_get: "show running-config all | include 'ip name-server' | exclude 'use-vrf'"
|
|
128
|
-
config_get_token: '/^ip name-server ([\s\d\.:]+)$/'
|
|
129
|
-
config_set: '<state> ip name-server <ip>'
|
|
130
|
-
default_value: ''
|
|
131
|
-
|
|
132
|
-
fex:
|
|
133
|
-
feature:
|
|
134
|
-
config_get: "show feature-set"
|
|
135
|
-
config_get_token: '/^fex[\s\d]+(\w+)/'
|
|
136
|
-
config_set: "%s feature-set fex"
|
|
137
|
-
|
|
138
|
-
feature_install:
|
|
139
|
-
config_set: "%s install feature-set fex"
|
|
140
|
-
|
|
141
|
-
images:
|
|
142
|
-
packages:
|
|
143
|
-
config_get: 'show install patches'
|
|
144
|
-
# Package state should always be some variant of Active or Inactive
|
|
145
|
-
config_get_token: '/^(\S+)\s+(\S*[aA]ctive.*)\s*$/'
|
|
146
|
-
|
|
147
|
-
interface:
|
|
148
|
-
access_vlan:
|
|
149
|
-
config_get: "show running interface all"
|
|
150
|
-
config_get_token: ['/^interface %s$/i', '/^switchport access vlan (.*)$/']
|
|
151
|
-
config_set: ["interface %s", "switchport access vlan %s"]
|
|
152
|
-
default_value: 1
|
|
153
|
-
|
|
154
|
-
all_interfaces:
|
|
155
|
-
config_get: "show running interface all"
|
|
156
|
-
config_get_token: '/^interface (.*)/'
|
|
157
|
-
|
|
158
|
-
create:
|
|
159
|
-
config_set: "interface %s"
|
|
160
|
-
|
|
161
|
-
description:
|
|
162
|
-
config_get: "show running interface all"
|
|
163
|
-
config_get_token: ['/^interface %s$/i', '/^description (.*)/']
|
|
164
|
-
config_set: ["interface %s", "%s description %s"]
|
|
165
|
-
default_value: ""
|
|
166
|
-
|
|
167
|
-
destroy:
|
|
168
|
-
config_set: "no interface %s"
|
|
169
|
-
|
|
170
|
-
encapsulation_dot1q:
|
|
171
|
-
config_get: "show running interface all"
|
|
172
|
-
config_get_token: ['/^interface %s$/i', '/^encapsulation dot1q (.*)/']
|
|
173
|
-
config_set: ["interface %s", "%s encapsulation dot1q %s"]
|
|
174
|
-
default_value: ""
|
|
175
|
-
|
|
176
|
-
feature_lacp:
|
|
177
|
-
config_get: "show running | i ^feature"
|
|
178
|
-
config_get_token: '/^feature lacp$/'
|
|
179
|
-
config_set: "%s feature lacp"
|
|
180
|
-
|
|
181
|
-
feature_vlan:
|
|
182
|
-
config_get: "show running | i ^feature"
|
|
183
|
-
config_get_token: '/^feature interface-vlan$/'
|
|
184
|
-
config_set: "%s feature interface-vlan"
|
|
185
|
-
|
|
186
|
-
ipv4_addr_mask:
|
|
187
|
-
config_get: "show running interface all"
|
|
188
|
-
config_get_token: [
|
|
189
|
-
'/^interface %s$/i',
|
|
190
|
-
'/^ip address ([0-9\.]+)[\s\/](.*)/'
|
|
191
|
-
]
|
|
192
|
-
config_set: ["interface %s", "%s ip address %s"]
|
|
193
|
-
|
|
194
|
-
ipv4_address:
|
|
195
|
-
default_value: ~
|
|
196
|
-
|
|
197
|
-
ipv4_netmask_length:
|
|
198
|
-
default_value: ~
|
|
199
|
-
|
|
200
|
-
ipv4_proxy_arp:
|
|
201
|
-
config_get: "show running interface all"
|
|
202
|
-
config_get_token: [
|
|
203
|
-
'/^interface %s$/i',
|
|
204
|
-
'/^ip proxy-arp$/'
|
|
205
|
-
]
|
|
206
|
-
config_set: ["interface %s", "%s ip proxy-arp"]
|
|
207
|
-
default_value: false
|
|
208
|
-
|
|
209
|
-
ipv4_redirects_loopback:
|
|
210
|
-
config_get: "show running interface all"
|
|
211
|
-
config_get_token: [
|
|
212
|
-
'/^interface %s$/i',
|
|
213
|
-
'/^((?:no )?ip redirects)$/'
|
|
214
|
-
]
|
|
215
|
-
config_set: ["interface %s", "%s ip redirects"]
|
|
216
|
-
default_value: true
|
|
217
|
-
test_config_get_regex: [!ruby/regexp '/^\s+no ip redirects/']
|
|
218
|
-
test_config_result:
|
|
219
|
-
false: RuntimeError
|
|
220
|
-
true: RuntimeError
|
|
221
|
-
|
|
222
|
-
ipv4_redirects_other_interfaces:
|
|
223
|
-
config_get: "show running interface all"
|
|
224
|
-
config_get_token: [
|
|
225
|
-
'/^interface %s$/i',
|
|
226
|
-
'/^((?:no )?ip redirects)$/'
|
|
227
|
-
]
|
|
228
|
-
config_set: ["interface %s", "%s ip redirects"]
|
|
229
|
-
default_value: true
|
|
230
|
-
test_config_get_regex: [!ruby/regexp '/^\s+no ip redirects/']
|
|
231
|
-
test_config_result:
|
|
232
|
-
false: false
|
|
233
|
-
true: true
|
|
234
|
-
|
|
235
|
-
mtu:
|
|
236
|
-
config_get: "show running interface all"
|
|
237
|
-
config_get_token: ['/^interface %s$/i', '/^mtu (.*)$/']
|
|
238
|
-
config_set: ["interface %s", "%s mtu %s"]
|
|
239
|
-
default_value: 1500
|
|
240
|
-
|
|
241
|
-
negotiate_auto_ethernet:
|
|
242
|
-
config_get: "show running interface all"
|
|
243
|
-
config_get_token: [
|
|
244
|
-
'/^interface %s$/i',
|
|
245
|
-
'/^negotiate auto$/'
|
|
246
|
-
]
|
|
247
|
-
config_set: ["interface %s", "%s negotiate auto"]
|
|
248
|
-
default_value: true
|
|
249
|
-
test_config_get_regex: [
|
|
250
|
-
!ruby/regexp '/^\s+no negotiate auto/',
|
|
251
|
-
!ruby/regexp '/^\s+negotiate auto/'
|
|
252
|
-
]
|
|
253
|
-
|
|
254
|
-
negotiate_auto_portchannel:
|
|
255
|
-
config_get: "show running interface all"
|
|
256
|
-
config_get_token: [
|
|
257
|
-
'/^interface %s$/i',
|
|
258
|
-
'/^negotiate auto$/'
|
|
259
|
-
]
|
|
260
|
-
config_set: ["interface %s", "%s negotiate auto"]
|
|
261
|
-
default_value: true
|
|
262
|
-
test_config_get_regex: [
|
|
263
|
-
!ruby/regexp '/^\s+no negotiate auto/',
|
|
264
|
-
!ruby/regexp '/^\s+negotiate auto/'
|
|
265
|
-
]
|
|
266
|
-
|
|
267
|
-
negotiate_auto_other_interfaces:
|
|
268
|
-
default_value: false
|
|
269
|
-
test_config_result:
|
|
270
|
-
false: RuntimeError
|
|
271
|
-
true: RuntimeError
|
|
272
|
-
|
|
273
|
-
shutdown:
|
|
274
|
-
config_get: "show running interface all"
|
|
275
|
-
config_get_token: ['/^interface %s$/i', '/^shutdown$/']
|
|
276
|
-
config_set: ["interface %s", "%s shutdown"]
|
|
277
|
-
|
|
278
|
-
shutdown_ether_channel:
|
|
279
|
-
default_value: false
|
|
280
|
-
|
|
281
|
-
shutdown_ethernet_noswitchport_noshutdown:
|
|
282
|
-
default_value: false
|
|
283
|
-
|
|
284
|
-
shutdown_ethernet_noswitchport_shutdown:
|
|
285
|
-
default_value: false
|
|
286
|
-
|
|
287
|
-
shutdown_ethernet_switchport_noshutdown:
|
|
288
|
-
default_value: false
|
|
289
|
-
|
|
290
|
-
shutdown_ethernet_switchport_shutdown:
|
|
291
|
-
default_value: true
|
|
292
|
-
|
|
293
|
-
shutdown_loopback:
|
|
294
|
-
default_value: false
|
|
295
|
-
|
|
296
|
-
shutdown_vlan:
|
|
297
|
-
default_value: true
|
|
298
|
-
|
|
299
|
-
shutdown_unknown:
|
|
300
|
-
default_value: true
|
|
301
|
-
|
|
302
|
-
system_default_switchport:
|
|
303
|
-
config_get: "show running all | include 'system default'"
|
|
304
|
-
config_get_token: ['/^system default switchport$/']
|
|
305
|
-
# default_value: n/a. This is a user-configurable system default.
|
|
306
|
-
|
|
307
|
-
system_default_switchport_shutdown:
|
|
308
|
-
config_get: "show running all | include 'system default'"
|
|
309
|
-
config_get_token: ['/^system default switchport shutdown$/']
|
|
310
|
-
# default_value: n/a. This is a user-configurable system default.
|
|
311
|
-
|
|
312
|
-
system_default_svi_autostate:
|
|
313
|
-
config_get: "show running all | include 'system default'"
|
|
314
|
-
config_get_token: ['/^system default interface-vlan autostate$/']
|
|
315
|
-
# default_value: n/a. This is a user-configurable system default.
|
|
316
|
-
|
|
317
|
-
switchport:
|
|
318
|
-
config_get: "show running interface all"
|
|
319
|
-
config_get_token: ['/^interface %s$/i', '/^switchport$/']
|
|
320
|
-
config_set: ["interface %s", "%s switchport"]
|
|
321
|
-
# default_value: n/a. This is derived from system_default_switchport
|
|
322
|
-
|
|
323
|
-
switchport_autostate_exclude:
|
|
324
|
-
config_get: "show running interface all"
|
|
325
|
-
config_get_token: ['/^interface %s$/i', '/(^switchport autostate exclude)/']
|
|
326
|
-
config_set: ["interface %s", "%s switchport autostate exclude"]
|
|
327
|
-
default_value: false
|
|
328
|
-
|
|
329
|
-
switchport_mode_ethernet:
|
|
330
|
-
config_get: "show running interface all"
|
|
331
|
-
config_get_token: ['/^interface %s$/i', '/^switchport mode (.*)$/']
|
|
332
|
-
config_set: ["interface %s", "%s switchport mode %s"]
|
|
333
|
-
default_value: "access"
|
|
334
|
-
|
|
335
|
-
switchport_mode_port_channel:
|
|
336
|
-
config_get: "show running interface all"
|
|
337
|
-
config_get_token: ['/^interface %s$/i', '/^switchport mode (.*)$/']
|
|
338
|
-
config_set: ["interface %s", "%s switchport mode %s"]
|
|
339
|
-
default_value: ""
|
|
340
|
-
|
|
341
|
-
switchport_mode_other_interfaces:
|
|
342
|
-
default_value: ""
|
|
343
|
-
|
|
344
|
-
switchport_mode_dot1q_tunnel:
|
|
345
|
-
test_config_result:
|
|
346
|
-
false: RuntimeError
|
|
347
|
-
|
|
348
|
-
switchport_trunk_allowed_vlan:
|
|
349
|
-
config_get: "show running interface all"
|
|
350
|
-
config_get_token: [
|
|
351
|
-
'/^interface %s$/i',
|
|
352
|
-
'/^switchport trunk allowed vlan (.*)$/'
|
|
353
|
-
]
|
|
354
|
-
config_set: ["interface %s", "%s switchport trunk allowed vlan %s"]
|
|
355
|
-
default_value: "all"
|
|
356
|
-
|
|
357
|
-
switchport_trunk_native_vlan:
|
|
358
|
-
config_get: "show running interface all"
|
|
359
|
-
config_get_token: [
|
|
360
|
-
'/^interface %s$/i',
|
|
361
|
-
'/^switchport trunk native vlan (.*)$/'
|
|
362
|
-
]
|
|
363
|
-
config_set: ["interface %s", "%s switchport trunk native vlan %s"]
|
|
364
|
-
default_value: 1
|
|
365
|
-
|
|
366
|
-
svi_autostate:
|
|
367
|
-
config_get: "show running interface all"
|
|
368
|
-
config_get_token: ['/^interface %s$/i', '/^autostate$/']
|
|
369
|
-
config_set: ["interface %s", "%s autostate"]
|
|
370
|
-
default_value: true
|
|
371
|
-
test_config_result:
|
|
372
|
-
false: false
|
|
373
|
-
true: true
|
|
374
|
-
|
|
375
|
-
svi_management:
|
|
376
|
-
config_get: "show running interface all"
|
|
377
|
-
config_get_token: ['/^interface %s$/i', '/^management$/']
|
|
378
|
-
config_set: ["interface %s", "%s management"]
|
|
379
|
-
default_value: false
|
|
380
|
-
|
|
381
|
-
vrf:
|
|
382
|
-
config_get: "show running interface all"
|
|
383
|
-
config_get_token: ['/^interface %s$/i', '/^vrf member (.*)/']
|
|
384
|
-
config_set: ["interface %s", "%s vrf member %s"]
|
|
385
|
-
default_value: ""
|
|
386
|
-
|
|
387
|
-
vtp:
|
|
388
|
-
config_get: "show running interface all"
|
|
389
|
-
config_get_token: ['/^interface %s$/i', '/^vtp *$/']
|
|
390
|
-
config_set: ["interface %s", "%s vtp"]
|
|
391
|
-
default_value: false
|
|
392
|
-
|
|
393
|
-
interface_ospf:
|
|
394
|
-
area:
|
|
395
|
-
config_get: 'show running interface all'
|
|
396
|
-
config_get_token: ['/^interface %s$/i', '/^\s*ip router ospf (\S+) area (\S+)/']
|
|
397
|
-
config_set: ["interface %s", "%s ip router ospf %s area %s"]
|
|
398
|
-
|
|
399
|
-
cost:
|
|
400
|
-
config_get: 'show running interface all'
|
|
401
|
-
config_get_token: ['/^interface %s$/i', '/^\s*ip ospf cost (\d+)/']
|
|
402
|
-
config_set: ["interface %s", "%s ip ospf cost %s"]
|
|
403
|
-
default_value: 0
|
|
404
|
-
|
|
405
|
-
dead_interval:
|
|
406
|
-
config_get: 'show running interface all'
|
|
407
|
-
config_get_token: ['/^interface %s$/i', '/^\s*ip ospf dead-interval (\d+)/']
|
|
408
|
-
config_set: ["interface %s", "%s ip ospf dead-interval %s"]
|
|
409
|
-
default_value: 40
|
|
410
|
-
test_config_result: [262141]
|
|
411
|
-
|
|
412
|
-
hello_interval:
|
|
413
|
-
config_get: 'show running interface all'
|
|
414
|
-
config_get_token: ['/^interface %s$/i', '/^\s*ip ospf hello-interval (\d+)/']
|
|
415
|
-
config_set: ["interface %s", "%s ip ospf hello-interval %s"]
|
|
416
|
-
default_value: 10
|
|
417
|
-
|
|
418
|
-
message_digest:
|
|
419
|
-
config_get: 'show running interface all'
|
|
420
|
-
config_get_token: ['/^interface %s$/i', '/^\s*ip ospf authentication message-digest/']
|
|
421
|
-
config_set: ["interface %s", "%s ip ospf authentication message-digest"]
|
|
422
|
-
default_value: false
|
|
423
|
-
|
|
424
|
-
message_digest_alg_type:
|
|
425
|
-
config_get: 'show running interface all'
|
|
426
|
-
config_get_token: ['/^interface %s$/i', '/^\s*ip ospf message-digest-key \d+ (\S+)/']
|
|
427
|
-
default_value: 'md5'
|
|
428
|
-
|
|
429
|
-
message_digest_enc_type:
|
|
430
|
-
config_get: 'show running interface all'
|
|
431
|
-
config_get_token: ['/^interface %s$/i', '/^\s*ip ospf message-digest-key \d+ \S+ (\d+)/']
|
|
432
|
-
default_value: '0'
|
|
433
|
-
|
|
434
|
-
message_digest_password:
|
|
435
|
-
config_get: 'show running interface all'
|
|
436
|
-
config_get_token: ['/^interface %s$/i', '/^\s*ip ospf message-digest-key \d+ \S+ \d+ (\S+)/']
|
|
437
|
-
|
|
438
|
-
message_digest_key_id:
|
|
439
|
-
config_get: 'show running interface all'
|
|
440
|
-
config_get_token: ['/^interface %s$/i', '/^\s*ip ospf message-digest-key (\d+)/']
|
|
441
|
-
default_value: 0
|
|
442
|
-
|
|
443
|
-
message_digest_key_set:
|
|
444
|
-
config_set: ["interface %s", "%s ip ospf message-digest-key %s %s %s %s"]
|
|
445
|
-
|
|
446
|
-
passive_interface:
|
|
447
|
-
config_get: 'show running interface all'
|
|
448
|
-
config_get_token: ['/^interface %s$/i', '/^\s*ip ospf passive-interface/']
|
|
449
|
-
config_set: ["interface %s", "%s ip ospf passive-interface"]
|
|
450
|
-
default_value: false
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
inventory:
|
|
454
|
-
all:
|
|
455
|
-
config_get: 'show inventory'
|
|
456
|
-
config_get_token: ["TABLE_inv", "ROW_inv"]
|
|
457
|
-
|
|
458
|
-
chassis:
|
|
459
|
-
config_get: 'show inventory'
|
|
460
|
-
config_get_token: ["TABLE_inv", "ROW_inv", {'name': '"Chassis"'}]
|
|
461
|
-
|
|
462
|
-
inventory:
|
|
463
|
-
test_config_get_regex: [
|
|
464
|
-
!ruby/regexp '/.*\nNAME: "(.+)",\s+DESCR: "(.+)"\nPID: (\S+)\s+, VID: (.+) , SN: (.+)\n/',
|
|
465
|
-
!ruby/regexp '/.*\nNAME: "(.+)",\s+DESCR: "(.+)"\nPID: (\S+)\s+, VID: (.+) , SN: (.+)\n/'
|
|
466
|
-
]
|
|
467
|
-
|
|
468
|
-
productid:
|
|
469
|
-
config_get: "show inventory"
|
|
470
|
-
config_get_token: ["TABLE_inv", "ROW_inv", 0, "productid"]
|
|
471
|
-
|
|
472
|
-
serialnum:
|
|
473
|
-
config_get: "show inventory"
|
|
474
|
-
config_get_token: ["TABLE_inv", "ROW_inv", 0, "serialnum"]
|
|
475
|
-
|
|
476
|
-
versionid:
|
|
477
|
-
config_get: "show inventory"
|
|
478
|
-
config_get_token: ["TABLE_inv", "ROW_inv", 0, "vendorid"]
|
|
479
|
-
|
|
480
|
-
ntp_config:
|
|
481
|
-
source_interface:
|
|
482
|
-
config_get: "show running-config ntp"
|
|
483
|
-
config_get_token: '/^ntp source-interface\s+(.*)$/'
|
|
484
|
-
config_set: '<state> ntp source-interface <source_interface>'
|
|
485
|
-
default_value: ''
|
|
486
|
-
|
|
487
|
-
ntp_server:
|
|
488
|
-
server:
|
|
489
|
-
config_get: "show running-config all | include 'ntp server'"
|
|
490
|
-
config_get_token: '/ntp server ((?:[0-9]{1,3}\.){3}[0-9]{1,3})/'
|
|
491
|
-
config_set: '<state> ntp server <ip> <prefer>'
|
|
492
|
-
default_value: ''
|
|
493
|
-
|
|
494
|
-
prefer:
|
|
495
|
-
config_get: "show running-config all | include 'ntp server(.*)(prefer)'"
|
|
496
|
-
config_get_token: '/ntp server ((?:[0-9]{1,3}\.){3}[0-9]{1,3})/'
|
|
497
|
-
default_value: ''
|
|
498
|
-
|
|
499
|
-
memory:
|
|
500
|
-
total:
|
|
501
|
-
config_get: 'show system resources'
|
|
502
|
-
config_get_token: '/Memory.* (\S+) total/'
|
|
503
|
-
|
|
504
|
-
used:
|
|
505
|
-
config_get: 'show system resources'
|
|
506
|
-
config_get_token: '/Memory.* (\S+) used/'
|
|
507
|
-
|
|
508
|
-
free:
|
|
509
|
-
config_get: 'show system resources'
|
|
510
|
-
config_get_token: '/Memory.* (\S+) free/'
|
|
511
|
-
|
|
512
|
-
ospf:
|
|
513
|
-
_template:
|
|
514
|
-
config_get: "show running ospf all"
|
|
515
|
-
config_get_token: '/^router ospf <name>$/'
|
|
516
|
-
config_get_token_append:
|
|
517
|
-
- '/^vrf <vrf>$/'
|
|
518
|
-
config_set: "router ospf <name>"
|
|
519
|
-
config_set_append:
|
|
520
|
-
- "vrf <vrf>"
|
|
521
|
-
|
|
522
|
-
auto_cost:
|
|
523
|
-
config_get_token_append: '/^auto-cost reference-bandwidth (\d+)\s*(\S+)?$/'
|
|
524
|
-
config_set_append: "auto-cost reference-bandwidth <cost> <type>"
|
|
525
|
-
default_value: [40, "Gbps"]
|
|
526
|
-
|
|
527
|
-
default_metric:
|
|
528
|
-
config_get_token_append: '/^default-metric (\d+)?$/'
|
|
529
|
-
config_set_append: "<state> default-metric <metric>"
|
|
530
|
-
default_value: 0
|
|
531
|
-
|
|
532
|
-
feature:
|
|
533
|
-
config_get: "show running ospf"
|
|
534
|
-
config_get_token: '/^feature ospf$/'
|
|
535
|
-
config_set: "%s feature ospf"
|
|
536
|
-
|
|
537
|
-
log_adjacency:
|
|
538
|
-
config_get_token_append: '/^(log-adjacency-changes)\s*(detail)?$/'
|
|
539
|
-
config_set_append: "<state> log-adjacency-changes <type>"
|
|
540
|
-
default_value: :none
|
|
541
|
-
|
|
542
|
-
router:
|
|
543
|
-
config_get: "show running ospf"
|
|
544
|
-
config_get_token: '/^router ospf (\S+)$/'
|
|
545
|
-
config_set: "%s router ospf %s"
|
|
546
|
-
|
|
547
|
-
router_id:
|
|
548
|
-
config_get_token_append: '/^router-id (\S+)?$/'
|
|
549
|
-
config_set_append: "<state> router-id <router_id>"
|
|
550
|
-
default_value: ""
|
|
551
|
-
|
|
552
|
-
timer_throttle_lsa:
|
|
553
|
-
config_get_token_append: '/^timers throttle lsa (\d+) (\d+) (\d+)$/'
|
|
554
|
-
config_set_append: "timers throttle lsa <start> <hold> <max>"
|
|
555
|
-
|
|
556
|
-
timer_throttle_lsa_start:
|
|
557
|
-
default_value: 0
|
|
558
|
-
|
|
559
|
-
timer_throttle_lsa_hold:
|
|
560
|
-
default_value: 5000
|
|
561
|
-
|
|
562
|
-
timer_throttle_lsa_max:
|
|
563
|
-
default_value: 5000
|
|
564
|
-
|
|
565
|
-
timer_throttle_spf:
|
|
566
|
-
config_get_token_append: '/^timers throttle spf (\d+) (\d+) (\d+)$/'
|
|
567
|
-
config_set_append: "timers throttle spf <start> <hold> <max>"
|
|
568
|
-
|
|
569
|
-
timer_throttle_spf_start:
|
|
570
|
-
default_value: 200
|
|
571
|
-
|
|
572
|
-
timer_throttle_spf_hold:
|
|
573
|
-
default_value: 1000
|
|
574
|
-
|
|
575
|
-
timer_throttle_spf_max:
|
|
576
|
-
default_value: 5000
|
|
577
|
-
|
|
578
|
-
vrf:
|
|
579
|
-
config_get_token: ['/^router ospf <name>$/i', '/^vrf\s+(\S+)$/']
|
|
580
|
-
config_set: ["router ospf <name>", "<state> vrf <vrf>", "end"]
|
|
581
|
-
|
|
582
|
-
radius_server:
|
|
583
|
-
hosts:
|
|
584
|
-
config_get: "show running-config radius"
|
|
585
|
-
config_get_token: '/^radius-server host ((?:[0-9]{1,3}\.){3}[0-9]{1,3})/'
|
|
586
|
-
config_set: '<state> radius-server host <ip>'
|
|
587
|
-
default_value: ''
|
|
588
|
-
|
|
589
|
-
auth-port:
|
|
590
|
-
config_get: "show running-config radius all"
|
|
591
|
-
config_get_token: '/^radius-server host %s.* auth-port (\d+).*$/'
|
|
592
|
-
config_set: '<state> radius-server host <ip> auth-port <port>'
|
|
593
|
-
default_value: 1812
|
|
594
|
-
|
|
595
|
-
acct-port:
|
|
596
|
-
config_get: "show running-config radius all"
|
|
597
|
-
config_get_token: '/^radius-server host %s.* acct-port (\d+).*$/'
|
|
598
|
-
config_set: '<state> radius-server host <ip> acct-port <port>'
|
|
599
|
-
default_value: 1813
|
|
600
|
-
|
|
601
|
-
timeout:
|
|
602
|
-
config_get: "show running-config radius all"
|
|
603
|
-
config_get_token: '/^radius-server host %s.* timeout (\d+).*$/'
|
|
604
|
-
config_set: '<state> radius-server host <ip> timeout <timeout>'
|
|
605
|
-
default_value: null
|
|
606
|
-
|
|
607
|
-
retransmit:
|
|
608
|
-
config_get: "show running-config radius all"
|
|
609
|
-
config_get_token: '/^radius-server host %s.* retransmit (\d+).*$/'
|
|
610
|
-
config_set: '<state> radius-server host <ip> retransmit <count>'
|
|
611
|
-
default_value: null
|
|
612
|
-
|
|
613
|
-
accounting:
|
|
614
|
-
config_get: "show running-config radius"
|
|
615
|
-
config_get_token: '/^radius-server host %s.* (accounting) .*$/'
|
|
616
|
-
config_set: '<state> radius-server host <ip> accounting'
|
|
617
|
-
default_value: true
|
|
618
|
-
|
|
619
|
-
authentication:
|
|
620
|
-
config_get: "show running-config radius"
|
|
621
|
-
config_get_token: '/^radius-server host %s.* (authentication) .*$/'
|
|
622
|
-
config_set: '<state> radius-server host <ip> authentication'
|
|
623
|
-
default_value: true
|
|
624
|
-
|
|
625
|
-
key_format:
|
|
626
|
-
config_get: "show running-config radius all"
|
|
627
|
-
config_get_token: '/^radius-server host %s.* key (\d).*$/'
|
|
628
|
-
default_value: null
|
|
629
|
-
|
|
630
|
-
key:
|
|
631
|
-
config_get: "show running-config radius all"
|
|
632
|
-
config_get_token: '/^radius-server host %s.* key \d+\s+(\S+)/'
|
|
633
|
-
config_set: '<state> radius-server host <ip> key <key>'
|
|
634
|
-
default_value: null
|
|
635
|
-
|
|
636
|
-
radius_global:
|
|
637
|
-
timeout:
|
|
638
|
-
config_get: "show running-config radius all"
|
|
639
|
-
config_get_token: '/^radius-server timeout (\d+).*/'
|
|
640
|
-
config_set: '<state> radius-server timeout <timeout>'
|
|
641
|
-
default_value: '5'
|
|
642
|
-
|
|
643
|
-
retransmit:
|
|
644
|
-
config_get: "show running-config radius all"
|
|
645
|
-
config_get_token: '/^radius-server retransmit (\d+).*/'
|
|
646
|
-
config_set: '<state> radius-server retransmit <count>'
|
|
647
|
-
default_value: '1'
|
|
648
|
-
|
|
649
|
-
key_format:
|
|
650
|
-
config_get: "show running-config radius all"
|
|
651
|
-
config_get_token: '/^radius-server key (\d).*/'
|
|
652
|
-
|
|
653
|
-
key:
|
|
654
|
-
config_get: "show running-config radius all"
|
|
655
|
-
config_get_token: '/^radius-server key \d+\s+(\S+)/'
|
|
656
|
-
config_set: '<state> radius-server key <key>'
|
|
657
|
-
|
|
658
|
-
show_system:
|
|
659
|
-
uptime:
|
|
660
|
-
config_get: 'show system uptime'
|
|
661
|
-
config_get_token: '/.*System uptime:\s+(\d+) days, (\d+) hours, (\d+) minutes, (\d+) seconds/'
|
|
662
|
-
|
|
663
|
-
show_version:
|
|
664
|
-
board:
|
|
665
|
-
config_get: 'sh version'
|
|
666
|
-
config_get_token: 'proc_board_id'
|
|
667
|
-
|
|
668
|
-
boot_image:
|
|
669
|
-
config_get: "sh version"
|
|
670
|
-
config_get_token: "kick_file_name"
|
|
671
|
-
test_config_get: "sh version | no-more"
|
|
672
|
-
test_config_get_regex: !ruby/regexp '/.*NXOS image file is: (.*)$.*/'
|
|
673
|
-
|
|
674
|
-
cpu:
|
|
675
|
-
config_get: 'sh version'
|
|
676
|
-
config_get_token: 'cpu_name'
|
|
677
|
-
|
|
678
|
-
description:
|
|
679
|
-
config_get: "sh version"
|
|
680
|
-
config_get_token: "chassis_id"
|
|
681
|
-
test_config_get: "sh version | no-more"
|
|
682
|
-
# Hardware
|
|
683
|
-
# cisco Nexus9000 C9396PX Chassis
|
|
684
|
-
#
|
|
685
|
-
# Other variants for the line of interest:
|
|
686
|
-
# cisco Nexus9000 C9504 (4 Slot) Chassis ("Supervisor Module")
|
|
687
|
-
# ^-module_id-ignore!-^
|
|
688
|
-
# cisco Nexus3000 C3132Q Chassis
|
|
689
|
-
# cisco N3K-C3048TP-1GE
|
|
690
|
-
test_config_get_regex: !ruby/regexp '/Hardware\n cisco (([^(\n]+|\(\d+ Slot\))+\w+)/'
|
|
691
|
-
|
|
692
|
-
full:
|
|
693
|
-
config_get: "sh version"
|
|
694
|
-
|
|
695
|
-
header:
|
|
696
|
-
config_get: "sh version"
|
|
697
|
-
config_get_token: "header_str"
|
|
698
|
-
|
|
699
|
-
host_name:
|
|
700
|
-
config_get: "sh version"
|
|
701
|
-
config_get_token: "host_name"
|
|
702
|
-
|
|
703
|
-
last_reset_reason:
|
|
704
|
-
config_get: "sh version"
|
|
705
|
-
config_get_token: "rr_reason"
|
|
706
|
-
test_config_get: "sh version | no-more"
|
|
707
|
-
test_config_get_regex: !ruby/regexp '/.*\nLast reset.*\n\n? Reason: (.*)\n/'
|
|
708
|
-
|
|
709
|
-
last_reset_time:
|
|
710
|
-
config_get: "sh version"
|
|
711
|
-
config_get_token: "rr_ctime"
|
|
712
|
-
test_config_get: "sh version | no-more"
|
|
713
|
-
test_config_get_regex: !ruby/regexp '/.*\nLast reset at \d+ usecs after (.*)\n/'
|
|
714
|
-
|
|
715
|
-
system_image:
|
|
716
|
-
config_get: "sh version"
|
|
717
|
-
config_get_token: "kick_file_name"
|
|
718
|
-
test_config_get: "sh version | no-more"
|
|
719
|
-
test_config_get_regex: !ruby/regexp '/.*NXOS image file is: (.*)$.*/'
|
|
720
|
-
|
|
721
|
-
uptime:
|
|
722
|
-
config_get: 'show version'
|
|
723
|
-
config_get_token: '/uptime is (.*)/'
|
|
724
|
-
|
|
725
|
-
version:
|
|
726
|
-
config_get: "sh version"
|
|
727
|
-
test_config_get: "sh version | no-more"
|
|
728
|
-
config_get_token: "kickstart_ver_str"
|
|
729
|
-
test_config_get_regex: [
|
|
730
|
-
!ruby/regexp /\nkickstart_ver_str\s+(.+)\n/,
|
|
731
|
-
!ruby/regexp '/.*NXOS:\s+version (.*)\n/'
|
|
732
|
-
]
|
|
733
|
-
|
|
734
|
-
snmp_community:
|
|
735
|
-
acl:
|
|
736
|
-
config_get: "show running snmp all"
|
|
737
|
-
config_get_token: '/^snmp-server community %s use-acl (.*)$/'
|
|
738
|
-
config_set: "%s snmp-server community %s use-acl %s"
|
|
739
|
-
default_value: ""
|
|
740
|
-
|
|
741
|
-
all_communities:
|
|
742
|
-
config_get: "show running snmp all"
|
|
743
|
-
config_get_token: '/^snmp-server community (\S+) /'
|
|
744
|
-
|
|
745
|
-
community:
|
|
746
|
-
config_get: "show running snmp all"
|
|
747
|
-
config_get_token: '/^snmp-server community (%s) group .*$/'
|
|
748
|
-
config_set: "%s snmp-server community %s group %s"
|
|
749
|
-
|
|
750
|
-
group:
|
|
751
|
-
config_get: "show running snmp all"
|
|
752
|
-
config_get_token: '/^snmp-server community %s group (.*)$/'
|
|
753
|
-
config_set: "snmp-server community %s group %s"
|
|
754
|
-
default_value: "network-operator"
|
|
755
|
-
|
|
756
|
-
snmp_group:
|
|
757
|
-
group:
|
|
758
|
-
config_get: "show snmp group"
|
|
759
|
-
config_get_token: "/^Role: (.*)$/"
|
|
760
|
-
default_value: ""
|
|
761
|
-
|
|
762
|
-
snmp_server:
|
|
763
|
-
aaa_user_cache_timeout:
|
|
764
|
-
config_get: "show snmp internal globals"
|
|
765
|
-
config_get_token: '/AAA Cache Timeout :(\d+)/'
|
|
766
|
-
config_set: "%s snmp-server aaa-user cache-timeout %d"
|
|
767
|
-
default_value: 3600
|
|
768
|
-
|
|
769
|
-
contact:
|
|
770
|
-
config_get: "show snmp"
|
|
771
|
-
config_get_token: "sys_contact"
|
|
772
|
-
config_set: "%s snmp-server contact %s"
|
|
773
|
-
default_value: ""
|
|
774
|
-
|
|
775
|
-
global_enforce_priv:
|
|
776
|
-
config_get: "show run snmp"
|
|
777
|
-
config_get_token: '/snmp-server globalEnforcePriv/'
|
|
778
|
-
config_set: "%s snmp-server globalEnforcePriv"
|
|
779
|
-
default_value: false
|
|
780
|
-
|
|
781
|
-
location:
|
|
782
|
-
config_get: "show snmp"
|
|
783
|
-
config_get_token: "sys_location"
|
|
784
|
-
config_set: "%s snmp-server location %s"
|
|
785
|
-
default_value: ""
|
|
786
|
-
|
|
787
|
-
packet_size:
|
|
788
|
-
config_get: "show snmp internal globals"
|
|
789
|
-
config_get_token: '/SNMP Max packet size :(\d+)/'
|
|
790
|
-
config_set: "%s snmp-server packetsize %d"
|
|
791
|
-
default_value: 1500
|
|
792
|
-
|
|
793
|
-
protocol:
|
|
794
|
-
config_get: "show snmp"
|
|
795
|
-
config_get_token: "protocol_status"
|
|
796
|
-
config_set: "%s snmp-server protocol enable"
|
|
797
|
-
default_value: true
|
|
798
|
-
|
|
799
|
-
tcp_session_auth:
|
|
800
|
-
config_get: "show snmp"
|
|
801
|
-
config_get_token: "tcp_auth_status"
|
|
802
|
-
config_set: "%s snmp-server tcp-session %s"
|
|
803
|
-
default_value: true
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
snmp_user:
|
|
807
|
-
auth_password:
|
|
808
|
-
config_get: "show run snmp all"
|
|
809
|
-
config_get_token: '/snmp-server user (\S+) \S+ auth \S+ (\S+)/'
|
|
810
|
-
default_value: ""
|
|
811
|
-
|
|
812
|
-
# The getter format will not have group info if engine id is configured.
|
|
813
|
-
auth_password_with_engine_id:
|
|
814
|
-
config_get: "show run snmp all"
|
|
815
|
-
config_get_token: '/snmp-server user (\S+) auth \S+ (\S+) .*engineID (\S+)/'
|
|
816
|
-
default_value: ""
|
|
817
|
-
|
|
818
|
-
auth_protocol:
|
|
819
|
-
default_value: "md5"
|
|
820
|
-
|
|
821
|
-
engine_id:
|
|
822
|
-
default_value: ""
|
|
823
|
-
|
|
824
|
-
group:
|
|
825
|
-
default_value: "network-operator"
|
|
826
|
-
|
|
827
|
-
priv_password:
|
|
828
|
-
config_get: "show run snmp all"
|
|
829
|
-
config_get_token: '/snmp-server user (\S+) \S+ auth \S+ \S+ priv.*(0x\S+)/'
|
|
830
|
-
default_value: ""
|
|
831
|
-
|
|
832
|
-
# The getter format will not have group info if engine id is configured.
|
|
833
|
-
priv_password_with_engine_id:
|
|
834
|
-
config_get: "show run snmp all"
|
|
835
|
-
config_get_token: '/snmp-server user (\S+) auth \S+ \S+ priv .*(0x\S+) .*engineID (\S+)/'
|
|
836
|
-
default_value: ""
|
|
837
|
-
|
|
838
|
-
priv_protocol:
|
|
839
|
-
default_value: "des"
|
|
840
|
-
|
|
841
|
-
# Config string syntax:
|
|
842
|
-
# [no] snmp-server user <user> [group] [auth {md5|sha} <passwd1> \
|
|
843
|
-
# [priv [aes-128] <passwd2>] [localizedkey] [engineID <id>]]
|
|
844
|
-
user:
|
|
845
|
-
config_get: "show snmp user"
|
|
846
|
-
config_get_token: ["TABLE_snmp_users", "ROW_snmp_users"]
|
|
847
|
-
config_set: "%s snmp-server user %s %s %s %s %s %s"
|
|
848
|
-
|
|
849
|
-
syslog_settings:
|
|
850
|
-
timestamp:
|
|
851
|
-
config_get: "show running-config all | include '^logging timestamp'"
|
|
852
|
-
config_get_token: '/^logging timestamp (.*)$/'
|
|
853
|
-
config_set: '<state> logging timestamp <units>'
|
|
854
|
-
default_value: 'seconds'
|
|
855
|
-
|
|
856
|
-
syslog_server:
|
|
857
|
-
server:
|
|
858
|
-
config_get: "show running-config all | include '^logging server'"
|
|
859
|
-
config_get_token: '/^logging server ((?:[0-9]{1,3}\.){3}[0-9]{1,3}).*/'
|
|
860
|
-
config_set: '<state> logging server <ip> <level> <vrf>'
|
|
861
|
-
default_value: ''
|
|
862
|
-
|
|
863
|
-
level:
|
|
864
|
-
config_get: "show running-config all | include '^logging server'"
|
|
865
|
-
config_get_token: '/^logging server %s (\d).*/'
|
|
866
|
-
default_value: ''
|
|
867
|
-
|
|
868
|
-
vrf:
|
|
869
|
-
config_get: "show running-config all | include '^logging server(.*)(use-vrf)'"
|
|
870
|
-
config_get_token: '/^logging server %s.* use-vrf (.*)$/'
|
|
871
|
-
default_value: ''
|
|
872
|
-
|
|
873
|
-
system:
|
|
874
|
-
resources:
|
|
875
|
-
config_get: "show system resources"
|
|
876
|
-
test_config_get: "show system resources | no-more"
|
|
877
|
-
test_config_get_regex: !ruby/regexp '/.*CPU states : (\d+\.\d+)% user, (\d+\.\d+)% kernel/'
|
|
878
|
-
|
|
879
|
-
tacacs_server:
|
|
880
|
-
deadtime:
|
|
881
|
-
config_get: "show run tacacs all"
|
|
882
|
-
config_get_token: '/^tacacs-server deadtime\s+(\d+)/'
|
|
883
|
-
config_set: "%s tacacs-server deadtime %d"
|
|
884
|
-
default_value: 0
|
|
885
|
-
|
|
886
|
-
directed_request:
|
|
887
|
-
# oddly, directed request must be retrieved from aaa output
|
|
888
|
-
config_get: "show running aaa all"
|
|
889
|
-
config_get_token: '/(?:no)?\s*tacacs-server directed-request/'
|
|
890
|
-
config_set: "%s tacacs-server directed-request"
|
|
891
|
-
default_value: false
|
|
892
|
-
|
|
893
|
-
encryption_type:
|
|
894
|
-
config_get: "show run tacacs all"
|
|
895
|
-
config_get_token: '/^tacacs-server key (\d+)\s+(\S+)/'
|
|
896
|
-
default_value: 0
|
|
897
|
-
|
|
898
|
-
encryption_password:
|
|
899
|
-
config_get: "show run tacacs all"
|
|
900
|
-
config_get_token: '/^tacacs-server key (\d+)\s+(\S+)/'
|
|
901
|
-
default_value: ""
|
|
902
|
-
|
|
903
|
-
encryption:
|
|
904
|
-
config_set: "%s tacacs-server key %d %s"
|
|
905
|
-
|
|
906
|
-
feature:
|
|
907
|
-
config_get: "show run tacacs all"
|
|
908
|
-
config_get_token: '/^feature tacacs/'
|
|
909
|
-
config_set: "%s feature tacacs+"
|
|
910
|
-
|
|
911
|
-
source_interface:
|
|
912
|
-
config_get: "show run tacacs all"
|
|
913
|
-
config_get_token: '/(no)?\s*ip tacacs source-interface\s+(\S+)?/'
|
|
914
|
-
config_set: "%s ip tacacs source-interface %s"
|
|
915
|
-
default_value: ""
|
|
916
|
-
|
|
917
|
-
timeout:
|
|
918
|
-
config_get: "show run tacacs all"
|
|
919
|
-
config_get_token: '/tacacs-server timeout\s+(\d+)/'
|
|
920
|
-
config_set: "%s tacacs-server timeout %d"
|
|
921
|
-
default_value: 5
|
|
922
|
-
|
|
923
|
-
tacacs_server_host:
|
|
924
|
-
encryption:
|
|
925
|
-
config_set: "%s tacacs-server host %s key %s %s"
|
|
926
|
-
|
|
927
|
-
encryption_password:
|
|
928
|
-
config_get: "show run tacacs all"
|
|
929
|
-
config_get_token: '/^tacacs-server host %s key \d+\s+(\S+)/'
|
|
930
|
-
default_value: ""
|
|
931
|
-
|
|
932
|
-
encryption_type:
|
|
933
|
-
config_get: "show run tacacs all"
|
|
934
|
-
config_get_token: '/^tacacs-server host %s key (\d+)/'
|
|
935
|
-
|
|
936
|
-
host:
|
|
937
|
-
config_set: "%s tacacs-server host %s"
|
|
938
|
-
|
|
939
|
-
hosts:
|
|
940
|
-
config_get: "show run tacacs all"
|
|
941
|
-
config_get_token: '/^tacacs-server host (\S+)/'
|
|
942
|
-
|
|
943
|
-
port:
|
|
944
|
-
config_get: "show run tacacs all"
|
|
945
|
-
config_get_token: '/^tacacs-server host %s .*port (\d+)/'
|
|
946
|
-
config_set: "tacacs-server host %s port %s"
|
|
947
|
-
default_value: 49
|
|
948
|
-
|
|
949
|
-
timeout:
|
|
950
|
-
config_get: "show run tacacs all"
|
|
951
|
-
config_get_token: '/^tacacs-server host %s .*timeout (\d+)/'
|
|
952
|
-
config_set: "%s tacacs-server host %s timeout %s"
|
|
953
|
-
default_value: 0
|
|
954
|
-
|
|
955
|
-
virtual_service:
|
|
956
|
-
services:
|
|
957
|
-
config_get: 'show virtual-service detail'
|
|
958
|
-
config_get_token: ["TABLE_detail", "ROW_detail"]
|
|
959
|
-
|
|
960
|
-
vlan:
|
|
961
|
-
all_vlans:
|
|
962
|
-
config_get: "show vlan brief"
|
|
963
|
-
config_get_token: '/^(\d+)\s/'
|
|
964
|
-
|
|
965
|
-
create:
|
|
966
|
-
config_set: ["vlan %s" , "end"]
|
|
967
|
-
|
|
968
|
-
destroy:
|
|
969
|
-
config_set: "no vlan %s"
|
|
970
|
-
|
|
971
|
-
name:
|
|
972
|
-
config_get: "show vlan brief"
|
|
973
|
-
config_get_token: '/^%d+\s+(\S+)\s/'
|
|
974
|
-
config_set: ["vlan %d", "%s name %s", "end"]
|
|
975
|
-
test_config_result:
|
|
976
|
-
32: "String exceeded max length of (32)"
|
|
977
|
-
|
|
978
|
-
state:
|
|
979
|
-
config_get: "show vlan brief"
|
|
980
|
-
config_get_token: '/^%d+\s+\S+\s+(\S+)\s/'
|
|
981
|
-
config_set: ["vlan %d", "%s state %s", "end"]
|
|
982
|
-
default_value: "active"
|
|
983
|
-
|
|
984
|
-
shutdown:
|
|
985
|
-
config_get: "show vlan brief"
|
|
986
|
-
config_get_token: '/^%d+\s+\S+\s+(\S+)\s/'
|
|
987
|
-
config_set: ["vlan %d", "%s shutdown", "end"]
|
|
988
|
-
default_value: false
|
|
989
|
-
|
|
990
|
-
vrf:
|
|
991
|
-
all_vrfs:
|
|
992
|
-
config_get: "show running | section 'vrf context'"
|
|
993
|
-
config_get_token: '/^vrf context (.*)/'
|
|
994
|
-
|
|
995
|
-
create:
|
|
996
|
-
config_set: "vrf context <vrf>"
|
|
997
|
-
|
|
998
|
-
description:
|
|
999
|
-
config_get: "show running | section 'vrf context'"
|
|
1000
|
-
config_get_token: ['/^vrf context <vrf>$/i', '/^description (.*)/']
|
|
1001
|
-
config_set: ["vrf context <vrf>", "<state> description <desc>"]
|
|
1002
|
-
|
|
1003
|
-
destroy:
|
|
1004
|
-
config_set: "no vrf context <vrf>"
|
|
1005
|
-
|
|
1006
|
-
shutdown:
|
|
1007
|
-
config_get: "show running | section 'vrf context'"
|
|
1008
|
-
config_get_token: ['/^vrf context <vrf>$/i', '/^shutdown$/']
|
|
1009
|
-
config_set: ["vrf context <vrf>", "<state> shutdown"]
|
|
1010
|
-
|
|
1011
|
-
vtp:
|
|
1012
|
-
domain:
|
|
1013
|
-
config_get: "show vtp status"
|
|
1014
|
-
config_get_token: "domain_name"
|
|
1015
|
-
config_set: "vtp domain %s"
|
|
1016
|
-
|
|
1017
|
-
feature:
|
|
1018
|
-
config_get: "show running vtp"
|
|
1019
|
-
config_get_token: '/^feature vtp$/'
|
|
1020
|
-
config_set: "%s feature vtp"
|
|
1021
|
-
|
|
1022
|
-
filename:
|
|
1023
|
-
config_get: "show running vtp"
|
|
1024
|
-
config_get_token: '/vtp file (\S+)/'
|
|
1025
|
-
config_set: "%s vtp file %s"
|
|
1026
|
-
default_value: "bootflash:/vlan.dat"
|
|
1027
|
-
|
|
1028
|
-
password:
|
|
1029
|
-
config_get: "show vtp password"
|
|
1030
|
-
config_get_token: "passwd"
|
|
1031
|
-
config_set: "%s vtp password %s"
|
|
1032
|
-
default_value: ""
|
|
1033
|
-
|
|
1034
|
-
version:
|
|
1035
|
-
config_get: "show vtp status"
|
|
1036
|
-
config_get_token: '/VTP\s+version\s+running\s+:\s+(\d+)/'
|
|
1037
|
-
config_set: "vtp version %s"
|
|
1038
|
-
default_value: 1
|
|
1039
|
-
test_config_result:
|
|
1040
|
-
3: "Cisco::CliError"
|
|
1041
|
-
|
|
1042
|
-
yum:
|
|
1043
|
-
install:
|
|
1044
|
-
config_set: "install add %s %s activate"
|
|
1045
|
-
query:
|
|
1046
|
-
config_get: "show install packages"
|
|
1047
|
-
# pass in the pkg name, retrieve version
|
|
1048
|
-
config_get_token: '/^%s\S*\s+(\S+)\s+(?:installed|@\S+)/'
|
|
1049
|
-
remove:
|
|
1050
|
-
config_set: "install deactivate %s"
|
|
1051
|
-
|