cisco_node_utils 1.3.0 → 1.4.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 +1 -0
- data/CHANGELOG.md +66 -0
- data/Gemfile +1 -0
- data/README.md +44 -43
- data/bin/.rubocop.yml +18 -0
- data/bin/show_running_yang.rb +233 -0
- data/cisco_node_utils.gemspec +1 -1
- data/docs/README-maintainers.md +1 -0
- data/docs/README-utilities.md +14 -0
- data/lib/.rubocop.yml +1 -1
- data/lib/cisco_node_utils/aaa_authentication_login_service.rb +8 -3
- data/lib/cisco_node_utils/aaa_authorization_service.rb +6 -0
- data/lib/cisco_node_utils/bfd_global.rb +300 -0
- data/lib/cisco_node_utils/bgp.rb +6 -4
- data/lib/cisco_node_utils/bgp_af.rb +2 -0
- data/lib/cisco_node_utils/bgp_neighbor.rb +14 -0
- data/lib/cisco_node_utils/bgp_neighbor_af.rb +4 -1
- data/lib/cisco_node_utils/cisco_cmn_utils.rb +126 -0
- data/lib/cisco_node_utils/client/client.rb +6 -2
- data/lib/cisco_node_utils/client/grpc/client.rb +120 -36
- data/lib/cisco_node_utils/client/nxapi/client.rb +6 -2
- data/lib/cisco_node_utils/cmd_ref/DEPRECATED.yaml +118 -0
- data/lib/cisco_node_utils/cmd_ref/aaa_authorization_service.yaml +14 -0
- data/lib/cisco_node_utils/cmd_ref/bfd_global.yaml +117 -0
- data/lib/cisco_node_utils/cmd_ref/bgp.yaml +7 -7
- data/lib/cisco_node_utils/cmd_ref/bgp_neighbor.yaml +7 -0
- data/lib/cisco_node_utils/cmd_ref/dhcp_relay_global.yaml +125 -0
- data/lib/cisco_node_utils/cmd_ref/feature.yaml +10 -0
- data/lib/cisco_node_utils/cmd_ref/interface.yaml +141 -49
- data/lib/cisco_node_utils/cmd_ref/interface_ospf.yaml +44 -0
- data/lib/cisco_node_utils/cmd_ref/interface_portchannel.yaml +6 -0
- data/lib/cisco_node_utils/cmd_ref/ospf.yaml +6 -0
- data/lib/cisco_node_utils/cmd_ref/ospf_area.yaml +91 -0
- data/lib/cisco_node_utils/cmd_ref/ospf_area_vlink.yaml +88 -0
- data/lib/cisco_node_utils/cmd_ref/overlay_global.yaml +0 -3
- data/lib/cisco_node_utils/cmd_ref/show_version.yaml +3 -3
- data/lib/cisco_node_utils/cmd_ref/snmp_community.yaml +39 -15
- data/lib/cisco_node_utils/cmd_ref/snmp_notification_receiver.yaml +43 -21
- data/lib/cisco_node_utils/cmd_ref/snmp_server.yaml +48 -19
- data/lib/cisco_node_utils/cmd_ref/snmp_user.yaml +0 -0
- data/lib/cisco_node_utils/cmd_ref/tacacs_global.yaml +30 -0
- data/lib/cisco_node_utils/cmd_ref/tacacs_server.yaml +18 -6
- data/lib/cisco_node_utils/cmd_ref/vdc.yaml +4 -0
- data/lib/cisco_node_utils/cmd_ref/virtual_service.yaml +1 -0
- data/lib/cisco_node_utils/cmd_ref/vlan.yaml +23 -10
- data/lib/cisco_node_utils/cmd_ref/vxlan_vtep.yaml +8 -2
- data/lib/cisco_node_utils/cmd_ref/yang.yaml +7 -0
- data/lib/cisco_node_utils/cmd_ref/yum.yaml +10 -1
- data/lib/cisco_node_utils/constants.rb +8 -1
- data/lib/cisco_node_utils/dhcp_relay_global.rb +302 -0
- data/lib/cisco_node_utils/exceptions.rb +29 -0
- data/lib/cisco_node_utils/feature.rb +28 -0
- data/lib/cisco_node_utils/interface.rb +493 -402
- data/lib/cisco_node_utils/interface_DEPRECATED.rb +513 -0
- data/lib/cisco_node_utils/interface_ospf.rb +126 -0
- data/lib/cisco_node_utils/interface_portchannel.rb +16 -0
- data/lib/cisco_node_utils/logger.rb +3 -0
- data/lib/cisco_node_utils/node.rb +29 -1
- data/lib/cisco_node_utils/overlay_global.rb +1 -12
- data/lib/cisco_node_utils/pim.rb +1 -0
- data/lib/cisco_node_utils/pim_group_list.rb +1 -0
- data/lib/cisco_node_utils/pim_rp_address.rb +1 -0
- data/lib/cisco_node_utils/platform.rb +9 -2
- data/lib/cisco_node_utils/router_ospf.rb +1 -1
- data/lib/cisco_node_utils/router_ospf_area.rb +416 -0
- data/lib/cisco_node_utils/router_ospf_area_vlink.rb +313 -0
- data/lib/cisco_node_utils/router_ospf_vrf.rb +17 -0
- data/lib/cisco_node_utils/snmp_notification_receiver.rb +27 -9
- data/lib/cisco_node_utils/snmpcommunity.rb +34 -8
- data/lib/cisco_node_utils/snmpserver.rb +4 -4
- data/lib/cisco_node_utils/snmpuser.rb +0 -0
- data/lib/cisco_node_utils/tacacs_global.rb +102 -0
- data/lib/cisco_node_utils/tacacs_server.rb +8 -7
- data/lib/cisco_node_utils/vdc.rb +25 -7
- data/lib/cisco_node_utils/version.rb +1 -1
- data/lib/cisco_node_utils/vlan.rb +30 -56
- data/lib/cisco_node_utils/vlan_DEPRECATED.rb +108 -0
- data/lib/cisco_node_utils/yang.rb +160 -0
- data/lib/cisco_node_utils/yum.rb +25 -32
- data/tests/.rubocop.yml +3 -0
- data/tests/ciscotest.rb +136 -19
- data/tests/cmd_config_invalid.yaml +1 -1
- data/tests/noop.rb +7 -0
- data/tests/tacacs_server.yaml.example +6 -0
- data/tests/test_aaa_authentication_login.rb +24 -1
- data/tests/test_aaa_authentication_login_service.rb +9 -16
- data/tests/test_aaa_authorization_service.rb +111 -84
- data/tests/test_bfd_global.rb +278 -0
- data/tests/test_bgp_neighbor.rb +20 -0
- data/tests/test_bridge_domain_vni.rb +2 -9
- data/tests/test_cmn_utils.rb +76 -0
- data/tests/test_dhcp_relay_global.rb +284 -0
- data/tests/test_dns_domain.rb +4 -4
- data/tests/test_domain_name.rb +2 -2
- data/tests/test_encapsulation.rb +2 -4
- data/tests/test_evpn_vni.rb +14 -7
- data/tests/test_fabricpath_global.rb +12 -13
- data/tests/test_feature.rb +35 -17
- data/tests/test_interface.rb +352 -127
- data/tests/test_interface_bdi.rb +2 -2
- data/tests/test_interface_channel_group.rb +1 -1
- data/tests/test_interface_ospf.rb +153 -23
- data/tests/test_interface_portchannel.rb +15 -6
- data/tests/test_interface_private_vlan.rb +200 -576
- data/tests/test_interface_svi.rb +5 -52
- data/tests/test_interface_switchport.rb +80 -240
- data/tests/test_itd_device_group.rb +2 -2
- data/tests/test_itd_device_group_node.rb +2 -2
- data/tests/test_itd_service.rb +1 -1
- data/tests/test_name_server.rb +3 -3
- data/tests/test_node_ext.rb +15 -17
- data/tests/test_ntp_config.rb +1 -1
- data/tests/test_ntp_server.rb +3 -3
- data/tests/test_nxapi.rb +1 -0
- data/tests/test_overlay_global.rb +15 -19
- data/tests/test_pim.rb +5 -5
- data/tests/test_pim_group_list.rb +1 -37
- data/tests/test_pim_rp_address.rb +1 -1
- data/tests/test_platform.rb +9 -11
- data/tests/test_portchannel_global.rb +43 -3
- data/tests/test_radius_server.rb +1 -1
- data/tests/test_radius_server_group.rb +1 -1
- data/tests/test_router_bgp.rb +17 -30
- data/tests/test_router_ospf_area.rb +433 -0
- data/tests/test_router_ospf_area_vlink.rb +298 -0
- data/tests/test_router_ospf_vrf.rb +17 -0
- data/tests/test_snmp_notification_receiver.rb +11 -11
- data/tests/test_snmpcommunity.rb +177 -69
- data/tests/test_snmpgroup.rb +7 -7
- data/tests/test_snmpserver.rb +164 -253
- data/tests/test_snmpuser.rb +73 -69
- data/tests/test_stp_global.rb +15 -15
- data/tests/test_syslog_settings.rb +1 -1
- data/tests/test_tacacs_global.rb +80 -0
- data/tests/test_tacacs_server.rb +129 -51
- data/tests/test_tacacs_server_group.rb +3 -29
- data/tests/test_tacacs_server_host.rb +24 -27
- data/tests/test_vlan.rb +57 -59
- data/tests/test_vlan_private.rb +271 -284
- data/tests/test_vpc.rb +10 -4
- data/tests/test_vrf.rb +2 -0
- data/tests/test_vrf_af.rb +2 -5
- data/tests/test_vtp.rb +5 -2
- data/tests/test_vxlan_vtep.rb +20 -44
- data/tests/test_vxlan_vtep_vni.rb +23 -16
- data/tests/test_yang.rb +369 -0
- data/tests/test_yum.rb +34 -42
- data/tests/yum_package.yaml +35 -0
- metadata +31 -4
- data/tests/test_vlan_mt_full.rb +0 -85
|
@@ -10,6 +10,16 @@ area:
|
|
|
10
10
|
get_value: '/^\s*ip router ospf (\S+) area (\S+)/'
|
|
11
11
|
set_value: "%s ip router ospf %s area %s"
|
|
12
12
|
|
|
13
|
+
bfd:
|
|
14
|
+
# the config can be 'ip ospf bfd' or
|
|
15
|
+
# 'ip ospf bfd disable' or
|
|
16
|
+
# no config at all so need to grab the optional
|
|
17
|
+
# match to get the whole config for checking
|
|
18
|
+
# the mode
|
|
19
|
+
get_value: '/^\s*ip ospf bfd *(?:\S+)?$/'
|
|
20
|
+
set_value: '%s ip ospf bfd %s'
|
|
21
|
+
default_value: ~
|
|
22
|
+
|
|
13
23
|
cost:
|
|
14
24
|
kind: int
|
|
15
25
|
get_value: '/^\s*ip ospf cost (\d+)/'
|
|
@@ -54,8 +64,42 @@ message_digest_password:
|
|
|
54
64
|
default_value: ~
|
|
55
65
|
get_value: '/^\s*ip ospf message-digest-key \d+ \S+ \d+ (\S+)/'
|
|
56
66
|
|
|
67
|
+
mtu_ignore:
|
|
68
|
+
kind: boolean
|
|
69
|
+
get_value: '/^\s*ip ospf mtu-ignore/'
|
|
70
|
+
set_value: "%s ip ospf mtu-ignore"
|
|
71
|
+
default_value: false
|
|
72
|
+
|
|
73
|
+
network_type:
|
|
74
|
+
get_value: '/^\s*ip ospf network (\S+)$/'
|
|
75
|
+
set_value: "%s ip ospf network %s"
|
|
76
|
+
|
|
77
|
+
network_type_default:
|
|
78
|
+
default_value: 'broadcast'
|
|
79
|
+
|
|
80
|
+
network_type_loopback_default:
|
|
81
|
+
default_value: 'loopback'
|
|
82
|
+
|
|
57
83
|
passive_interface:
|
|
58
84
|
kind: boolean
|
|
59
85
|
get_value: '/^\s*ip ospf passive-interface/'
|
|
60
86
|
set_value: "%s ip ospf passive-interface"
|
|
61
87
|
default_value: false
|
|
88
|
+
|
|
89
|
+
priority:
|
|
90
|
+
kind: int
|
|
91
|
+
get_value: '/^\s*ip ospf priority (\d+)/'
|
|
92
|
+
set_value: "%s ip ospf priority %s"
|
|
93
|
+
default_value: 1
|
|
94
|
+
|
|
95
|
+
shutdown:
|
|
96
|
+
kind: boolean
|
|
97
|
+
get_value: '/^\s*ip ospf shutdown/'
|
|
98
|
+
set_value: "%s ip ospf shutdown"
|
|
99
|
+
default_value: false
|
|
100
|
+
|
|
101
|
+
transmit_delay:
|
|
102
|
+
kind: int
|
|
103
|
+
get_value: '/^\s*ip ospf transmit-delay (\d+)/'
|
|
104
|
+
set_value: "%s ip ospf transmit-delay %s"
|
|
105
|
+
default_value: 1
|
|
@@ -7,6 +7,12 @@ _template:
|
|
|
7
7
|
get_context: ['/^interface %s$/i']
|
|
8
8
|
set_context: ["interface %s"]
|
|
9
9
|
|
|
10
|
+
bfd_per_link:
|
|
11
|
+
kind: boolean
|
|
12
|
+
get_value: '/^bfd per-link$/'
|
|
13
|
+
set_value: "%s bfd per-link"
|
|
14
|
+
default_value: false
|
|
15
|
+
|
|
10
16
|
create:
|
|
11
17
|
set_context: ~
|
|
12
18
|
set_value: "interface %s"
|
|
@@ -13,6 +13,12 @@ auto_cost:
|
|
|
13
13
|
set_value: "auto-cost reference-bandwidth <cost> <type>"
|
|
14
14
|
default_value: [40, "Gbps"]
|
|
15
15
|
|
|
16
|
+
bfd:
|
|
17
|
+
kind: boolean
|
|
18
|
+
get_value: '/^bfd$/'
|
|
19
|
+
set_value: '<state> bfd'
|
|
20
|
+
default_value: false
|
|
21
|
+
|
|
16
22
|
default_metric:
|
|
17
23
|
kind: int
|
|
18
24
|
get_value: '/^default-metric (\d+)?$/'
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# ospf_area
|
|
2
|
+
---
|
|
3
|
+
_exclude: [ios_xr]
|
|
4
|
+
|
|
5
|
+
_template:
|
|
6
|
+
get_command: "show running ospf | no-more"
|
|
7
|
+
context:
|
|
8
|
+
- "router ospf <name>"
|
|
9
|
+
- "(?)vrf <vrf>"
|
|
10
|
+
|
|
11
|
+
areas:
|
|
12
|
+
multiple: true
|
|
13
|
+
get_value: '/^area\s+(\S+)/'
|
|
14
|
+
|
|
15
|
+
authentication:
|
|
16
|
+
# the config can be 'area <area> authentication' or
|
|
17
|
+
# 'area <area> authentication message-digest' or
|
|
18
|
+
# no authentication config at all so need to grab the
|
|
19
|
+
# optional match to get the whole config for checking
|
|
20
|
+
# the mode
|
|
21
|
+
get_value: '/^area <area> authentication(?:\s+\S+)?$/'
|
|
22
|
+
set_value: '<state> area <area> authentication <auth>'
|
|
23
|
+
default_value: false
|
|
24
|
+
|
|
25
|
+
default_cost:
|
|
26
|
+
kind: int
|
|
27
|
+
get_value: '/^area <area> default-cost (\d+)$/'
|
|
28
|
+
set_value: '<state> area <area> default-cost <cost>'
|
|
29
|
+
default_value: 1
|
|
30
|
+
|
|
31
|
+
filter_list_in:
|
|
32
|
+
get_value: '/^area <area> filter-list route-map (\S+) in$/'
|
|
33
|
+
set_value: '<state> area <area> filter-list route-map <route_map> in'
|
|
34
|
+
default_value: false
|
|
35
|
+
|
|
36
|
+
filter_list_out:
|
|
37
|
+
get_value: '/^area <area> filter-list route-map (\S+) out$/'
|
|
38
|
+
set_value: '<state> area <area> filter-list route-map <route_map> out'
|
|
39
|
+
default_value: false
|
|
40
|
+
|
|
41
|
+
nssa:
|
|
42
|
+
kind: boolean
|
|
43
|
+
default_value: false
|
|
44
|
+
|
|
45
|
+
nssa_default_originate:
|
|
46
|
+
kind: boolean
|
|
47
|
+
default_value: false
|
|
48
|
+
|
|
49
|
+
nssa_destroy:
|
|
50
|
+
set_value: 'no area <area> nssa'
|
|
51
|
+
|
|
52
|
+
nssa_get:
|
|
53
|
+
multiple: true
|
|
54
|
+
get_value: '/^area <area> nssa(.*)$/'
|
|
55
|
+
|
|
56
|
+
nssa_no_redistribution:
|
|
57
|
+
kind: boolean
|
|
58
|
+
default_value: false
|
|
59
|
+
|
|
60
|
+
nssa_no_summary:
|
|
61
|
+
kind: boolean
|
|
62
|
+
default_value: false
|
|
63
|
+
|
|
64
|
+
nssa_route_map:
|
|
65
|
+
default_value: ''
|
|
66
|
+
|
|
67
|
+
nssa_set:
|
|
68
|
+
set_value: '<state> area <area> nssa <nssa_no_summary> <nssa_no_redistribution> <nssa_default_originate> <nssa_route_map>'
|
|
69
|
+
|
|
70
|
+
nssa_translate_type7:
|
|
71
|
+
get_value: '/^area <area> nssa translate type7 (.*)$/'
|
|
72
|
+
set_value: '<state> area <area> nssa translate type7 <value>'
|
|
73
|
+
default_value: false
|
|
74
|
+
|
|
75
|
+
range:
|
|
76
|
+
multiple: true
|
|
77
|
+
get_value: '/^area <area> range (.*)$/'
|
|
78
|
+
set_value: '<state> area <area> range <ip> <not_advertise> <cost> <value>'
|
|
79
|
+
default_value: []
|
|
80
|
+
|
|
81
|
+
stub:
|
|
82
|
+
kind: boolean
|
|
83
|
+
get_value: '/^area <area> stub/'
|
|
84
|
+
set_value: '<state> area <area> stub'
|
|
85
|
+
default_value: false
|
|
86
|
+
|
|
87
|
+
stub_no_summary:
|
|
88
|
+
kind: boolean
|
|
89
|
+
get_value: '/^area <area> stub no-summary$/'
|
|
90
|
+
set_value: '<state> area <area> stub no-summary'
|
|
91
|
+
default_value: false
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# ospf_area_vlink
|
|
2
|
+
---
|
|
3
|
+
_exclude: [ios_xr]
|
|
4
|
+
|
|
5
|
+
_template:
|
|
6
|
+
get_command: "show running ospf | no-more"
|
|
7
|
+
context:
|
|
8
|
+
- "router ospf <name>"
|
|
9
|
+
- "(?)vrf <vrf>"
|
|
10
|
+
- "area <area> virtual-link <vl>"
|
|
11
|
+
|
|
12
|
+
auth_key_chain:
|
|
13
|
+
get_value: '/^authentication key-chain (\S+)$/'
|
|
14
|
+
set_value: '<state> authentication key-chain <key_id>'
|
|
15
|
+
default_value: false
|
|
16
|
+
|
|
17
|
+
authentication:
|
|
18
|
+
# the config can be 'authentication' or 'authentication message-digest'
|
|
19
|
+
# or 'authentication null' or
|
|
20
|
+
# no authentication config at all so need to grab the
|
|
21
|
+
# optional match to get the whole config for checking
|
|
22
|
+
# the mode
|
|
23
|
+
get_value: '/^authentication(?:\s+\S+)?$/'
|
|
24
|
+
set_value: '<state> authentication <auth>'
|
|
25
|
+
default_value: false
|
|
26
|
+
|
|
27
|
+
authentication_key_enc_type:
|
|
28
|
+
get_value: '/^authentication-key (\d+)/'
|
|
29
|
+
default_value: '0'
|
|
30
|
+
|
|
31
|
+
authentication_key_password:
|
|
32
|
+
get_value: '/^authentication-key \d+ (\S+)/'
|
|
33
|
+
default_value: ''
|
|
34
|
+
|
|
35
|
+
authentication_key_set:
|
|
36
|
+
set_value: "<state> authentication-key <enctype> <password>"
|
|
37
|
+
|
|
38
|
+
dead_interval:
|
|
39
|
+
kind: int
|
|
40
|
+
get_value: '/^dead-interval (\d+)$/'
|
|
41
|
+
set_value: '<state> dead-interval <interval>'
|
|
42
|
+
default_value: 40
|
|
43
|
+
|
|
44
|
+
hello_interval:
|
|
45
|
+
kind: int
|
|
46
|
+
get_value: '/^hello-interval (\d+)$/'
|
|
47
|
+
set_value: '<state> hello-interval <interval>'
|
|
48
|
+
default_value: 10
|
|
49
|
+
|
|
50
|
+
message_digest_key_alg_type:
|
|
51
|
+
get_value: '/^message-digest-key \d+ (\S+)/'
|
|
52
|
+
default_value: 'md5'
|
|
53
|
+
|
|
54
|
+
message_digest_key_enc_type:
|
|
55
|
+
get_value: '/^message-digest-key \d+ \S+ (\d+)/'
|
|
56
|
+
default_value: '0'
|
|
57
|
+
|
|
58
|
+
message_digest_key_id:
|
|
59
|
+
kind: int
|
|
60
|
+
get_value: '/^message-digest-key (\d+)/'
|
|
61
|
+
default_value: 0
|
|
62
|
+
|
|
63
|
+
message_digest_key_password:
|
|
64
|
+
get_value: '/^message-digest-key \d+ \S+ \d+ (\S+)/'
|
|
65
|
+
default_value: ''
|
|
66
|
+
|
|
67
|
+
message_digest_key_set:
|
|
68
|
+
set_value: "<state> message-digest-key <keyid> <algtype> <enctype> <password>"
|
|
69
|
+
|
|
70
|
+
retransmit_interval:
|
|
71
|
+
kind: int
|
|
72
|
+
get_value: '/^retransmit-interval (\d+)$/'
|
|
73
|
+
set_value: '<state> retransmit-interval <interval>'
|
|
74
|
+
default_value: 5
|
|
75
|
+
|
|
76
|
+
transmit_delay:
|
|
77
|
+
kind: int
|
|
78
|
+
get_value: '/^transmit-delay (\d+)$/'
|
|
79
|
+
set_value: '<state> transmit-delay <delay>'
|
|
80
|
+
default_value: 1
|
|
81
|
+
|
|
82
|
+
virtual_links:
|
|
83
|
+
multiple: true
|
|
84
|
+
context:
|
|
85
|
+
- "router ospf <name>"
|
|
86
|
+
- "(?)vrf <vrf>"
|
|
87
|
+
get_value: '/^area (\S+) virtual-link (\S+)$/'
|
|
88
|
+
set_value: '<state> area <area> virtual-link <vl>'
|
|
@@ -25,9 +25,6 @@ dup_host_mac_detection:
|
|
|
25
25
|
get_value: '/^l2rib dup-host-mac-detection (\d+) (\d+)$/'
|
|
26
26
|
set_value: "l2rib dup-host-mac-detection <host_moves> <timeout>"
|
|
27
27
|
|
|
28
|
-
dup_host_mac_detection_default:
|
|
29
|
-
set_value: "l2rib dup-host-mac-detection default"
|
|
30
|
-
|
|
31
28
|
dup_host_mac_detection_host_moves:
|
|
32
29
|
default_value: 5
|
|
33
30
|
|
|
@@ -13,8 +13,7 @@ board:
|
|
|
13
13
|
|
|
14
14
|
boot_image:
|
|
15
15
|
_exclude: [ios_xr]
|
|
16
|
-
|
|
17
|
-
get_value: "kick_file_name"
|
|
16
|
+
get_value: "kick_file_name"
|
|
18
17
|
|
|
19
18
|
cpu:
|
|
20
19
|
nexus:
|
|
@@ -62,7 +61,8 @@ system_image:
|
|
|
62
61
|
N6k: *sys_img_isan
|
|
63
62
|
N7k: *sys_img_isan
|
|
64
63
|
ios_xr:
|
|
65
|
-
|
|
64
|
+
get_command: 'sh install active'
|
|
65
|
+
get_value: '/^\s*(\S*)\s*version.*\[Boot image\]$/'
|
|
66
66
|
|
|
67
67
|
uptime:
|
|
68
68
|
# TODO: redundant with show_system, uptime?
|
|
@@ -1,25 +1,49 @@
|
|
|
1
1
|
# snmp_community
|
|
2
2
|
---
|
|
3
|
-
_exclude: [ios_xr]
|
|
4
3
|
|
|
5
4
|
acl:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
nexus:
|
|
6
|
+
get_command: "show running snmp all"
|
|
7
|
+
get_value: '/^snmp-server community <name> use-acl (.*)$/'
|
|
8
|
+
set_value: "<state> snmp-server community <name> use-acl <acl>"
|
|
9
|
+
default_value: ""
|
|
10
|
+
ios_xr:
|
|
11
|
+
get_command: "show running snmp"
|
|
12
|
+
get_value: '/^snmp-server community <name> IPv4 (.*)$/'
|
|
13
|
+
set_value: "<state> snmp-server community <name> <acl>"
|
|
14
|
+
default_value: ""
|
|
10
15
|
|
|
11
16
|
all_communities:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
nexus:
|
|
18
|
+
multiple: true
|
|
19
|
+
get_command: "show running snmp all"
|
|
20
|
+
get_value: '/^snmp-server community (\S+) /'
|
|
21
|
+
ios_xr:
|
|
22
|
+
multiple: true
|
|
23
|
+
get_command: "show running-config snmp"
|
|
24
|
+
get_value: '/^snmp-server community (\S+)/'
|
|
15
25
|
|
|
16
26
|
community:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
nexus:
|
|
28
|
+
get_command: "show running snmp all"
|
|
29
|
+
get_value: '/^snmp-server community (%s) group .*$/'
|
|
30
|
+
set_value: "<state> snmp-server community <name> group <group>"
|
|
31
|
+
ios_xr:
|
|
32
|
+
get_command: "show running-config snmp"
|
|
33
|
+
get_value: '/^snmp-server community (%s) .*$/'
|
|
34
|
+
set_value: "<state> snmp-server community <name>"
|
|
20
35
|
|
|
21
36
|
group:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
37
|
+
get_command: "show running snmp all"
|
|
38
|
+
get_value: '/^snmp-server community <name> group (.*)$/'
|
|
39
|
+
set_value: "snmp-server community <name> group <group>"
|
|
40
|
+
default_value: "network-operator"
|
|
41
|
+
|
|
42
|
+
group_community_mapping:
|
|
43
|
+
get_command: "show running snmp"
|
|
44
|
+
get_value: '/^snmp-server community-map <name> target-list (.*)$/'
|
|
45
|
+
set_value: "snmp-server community-map <name> target-list <group>"
|
|
46
|
+
|
|
47
|
+
group_simple:
|
|
48
|
+
get_command: "show running snmp"
|
|
49
|
+
set_value: "snmp-server group <group> v3 noauth"
|
|
@@ -1,52 +1,74 @@
|
|
|
1
1
|
# snmp_notification_receiver
|
|
2
2
|
---
|
|
3
|
-
|
|
3
|
+
_template:
|
|
4
|
+
nexus:
|
|
5
|
+
get_command: "show running-config snmp all"
|
|
6
|
+
ios_xr:
|
|
7
|
+
get_command: "show running-config snmp"
|
|
4
8
|
|
|
5
9
|
port:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
nexus:
|
|
11
|
+
get_value: '/^snmp-server host %s.*version.* udp-port (\d+).*$/'
|
|
12
|
+
default_value: null
|
|
13
|
+
ios_xr:
|
|
14
|
+
get_value: '/^snmp-server host %s.* udp-port (\d+).*$/'
|
|
15
|
+
default_value: null
|
|
9
16
|
|
|
10
17
|
receivers:
|
|
11
|
-
get_command: "show running snmp all"
|
|
12
18
|
get_value: '/^snmp-server host (\S+) (traps|informs)/'
|
|
13
|
-
set_value: "<state> snmp-server host <ip> <type>
|
|
19
|
+
set_value: "<state> snmp-server host <ip> <type> <version> <security> <username> <udp_port>"
|
|
14
20
|
multiple:
|
|
15
21
|
|
|
16
22
|
security:
|
|
17
|
-
get_command: "show running-config snmp all"
|
|
18
23
|
get_value: '/^snmp-server host %s.* version 3 (auth|noauth|priv).*$/'
|
|
19
24
|
default_value: null
|
|
20
25
|
|
|
21
26
|
source_interface:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
nexus:
|
|
28
|
+
get_value: '/^snmp-server host %s.* source-interface (\S+).*$/'
|
|
29
|
+
set_value: "snmp-server host <ip> source-interface <source_interface> <port>"
|
|
30
|
+
default_value: null
|
|
31
|
+
ios_xr:
|
|
32
|
+
get_value: '/^snmp-server trap-source IPv\d (\S+).*$/'
|
|
33
|
+
set_value: "snmp-server trap-source <source_interface>"
|
|
26
34
|
|
|
27
35
|
type:
|
|
28
|
-
get_command: "show running-config snmp all"
|
|
29
36
|
get_value: '/^snmp-server host %s (traps|informs).*$/'
|
|
30
37
|
default_value: null
|
|
31
38
|
|
|
32
39
|
username:
|
|
33
|
-
get_command: "show running-config snmp all"
|
|
34
40
|
get_value: '/^snmp-server host %s.*version.* (\S+)$/'
|
|
35
41
|
default_value: null
|
|
36
42
|
|
|
37
43
|
username_with_port:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
nexus:
|
|
45
|
+
get_value: '/^snmp-server host %s.*version.* (\S+) udp-port/'
|
|
46
|
+
default_value: null
|
|
47
|
+
ios_xr:
|
|
48
|
+
get_value: '/^snmp-server host %s.* (\S+) udp-port/'
|
|
49
|
+
default_value: null
|
|
41
50
|
|
|
42
51
|
version:
|
|
43
|
-
get_command: "show running-config snmp all"
|
|
44
52
|
get_value: '/^snmp-server host %s.* version (\S+).*$/'
|
|
45
53
|
default_value: null
|
|
46
54
|
|
|
47
55
|
vrf:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
nexus:
|
|
57
|
+
get_value: '/^snmp-server host %s.* use-vrf (\S+).*$/'
|
|
58
|
+
set_value: "snmp-server host <ip> use-vrf <vrf> <port>"
|
|
59
|
+
default_value: null
|
|
60
|
+
ios_xr:
|
|
61
|
+
set_value: "snmp-server vrf <vrf> host <ip> <username>"
|
|
62
|
+
default_value: null
|
|
52
63
|
|
|
64
|
+
vrf_all:
|
|
65
|
+
_exclude: [nexus]
|
|
66
|
+
get_value: '/^snmp-server vrf (\S+).*/'
|
|
67
|
+
multiple:
|
|
68
|
+
|
|
69
|
+
vrf_values:
|
|
70
|
+
_exclude: [nexus]
|
|
71
|
+
context: ['snmp-server vrf <vrf>']
|
|
72
|
+
get_value: '/^host (\S+).*$/'
|
|
73
|
+
default_value: null
|
|
74
|
+
multiple:
|