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.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +66 -0
  4. data/Gemfile +1 -0
  5. data/README.md +44 -43
  6. data/bin/.rubocop.yml +18 -0
  7. data/bin/show_running_yang.rb +233 -0
  8. data/cisco_node_utils.gemspec +1 -1
  9. data/docs/README-maintainers.md +1 -0
  10. data/docs/README-utilities.md +14 -0
  11. data/lib/.rubocop.yml +1 -1
  12. data/lib/cisco_node_utils/aaa_authentication_login_service.rb +8 -3
  13. data/lib/cisco_node_utils/aaa_authorization_service.rb +6 -0
  14. data/lib/cisco_node_utils/bfd_global.rb +300 -0
  15. data/lib/cisco_node_utils/bgp.rb +6 -4
  16. data/lib/cisco_node_utils/bgp_af.rb +2 -0
  17. data/lib/cisco_node_utils/bgp_neighbor.rb +14 -0
  18. data/lib/cisco_node_utils/bgp_neighbor_af.rb +4 -1
  19. data/lib/cisco_node_utils/cisco_cmn_utils.rb +126 -0
  20. data/lib/cisco_node_utils/client/client.rb +6 -2
  21. data/lib/cisco_node_utils/client/grpc/client.rb +120 -36
  22. data/lib/cisco_node_utils/client/nxapi/client.rb +6 -2
  23. data/lib/cisco_node_utils/cmd_ref/DEPRECATED.yaml +118 -0
  24. data/lib/cisco_node_utils/cmd_ref/aaa_authorization_service.yaml +14 -0
  25. data/lib/cisco_node_utils/cmd_ref/bfd_global.yaml +117 -0
  26. data/lib/cisco_node_utils/cmd_ref/bgp.yaml +7 -7
  27. data/lib/cisco_node_utils/cmd_ref/bgp_neighbor.yaml +7 -0
  28. data/lib/cisco_node_utils/cmd_ref/dhcp_relay_global.yaml +125 -0
  29. data/lib/cisco_node_utils/cmd_ref/feature.yaml +10 -0
  30. data/lib/cisco_node_utils/cmd_ref/interface.yaml +141 -49
  31. data/lib/cisco_node_utils/cmd_ref/interface_ospf.yaml +44 -0
  32. data/lib/cisco_node_utils/cmd_ref/interface_portchannel.yaml +6 -0
  33. data/lib/cisco_node_utils/cmd_ref/ospf.yaml +6 -0
  34. data/lib/cisco_node_utils/cmd_ref/ospf_area.yaml +91 -0
  35. data/lib/cisco_node_utils/cmd_ref/ospf_area_vlink.yaml +88 -0
  36. data/lib/cisco_node_utils/cmd_ref/overlay_global.yaml +0 -3
  37. data/lib/cisco_node_utils/cmd_ref/show_version.yaml +3 -3
  38. data/lib/cisco_node_utils/cmd_ref/snmp_community.yaml +39 -15
  39. data/lib/cisco_node_utils/cmd_ref/snmp_notification_receiver.yaml +43 -21
  40. data/lib/cisco_node_utils/cmd_ref/snmp_server.yaml +48 -19
  41. data/lib/cisco_node_utils/cmd_ref/snmp_user.yaml +0 -0
  42. data/lib/cisco_node_utils/cmd_ref/tacacs_global.yaml +30 -0
  43. data/lib/cisco_node_utils/cmd_ref/tacacs_server.yaml +18 -6
  44. data/lib/cisco_node_utils/cmd_ref/vdc.yaml +4 -0
  45. data/lib/cisco_node_utils/cmd_ref/virtual_service.yaml +1 -0
  46. data/lib/cisco_node_utils/cmd_ref/vlan.yaml +23 -10
  47. data/lib/cisco_node_utils/cmd_ref/vxlan_vtep.yaml +8 -2
  48. data/lib/cisco_node_utils/cmd_ref/yang.yaml +7 -0
  49. data/lib/cisco_node_utils/cmd_ref/yum.yaml +10 -1
  50. data/lib/cisco_node_utils/constants.rb +8 -1
  51. data/lib/cisco_node_utils/dhcp_relay_global.rb +302 -0
  52. data/lib/cisco_node_utils/exceptions.rb +29 -0
  53. data/lib/cisco_node_utils/feature.rb +28 -0
  54. data/lib/cisco_node_utils/interface.rb +493 -402
  55. data/lib/cisco_node_utils/interface_DEPRECATED.rb +513 -0
  56. data/lib/cisco_node_utils/interface_ospf.rb +126 -0
  57. data/lib/cisco_node_utils/interface_portchannel.rb +16 -0
  58. data/lib/cisco_node_utils/logger.rb +3 -0
  59. data/lib/cisco_node_utils/node.rb +29 -1
  60. data/lib/cisco_node_utils/overlay_global.rb +1 -12
  61. data/lib/cisco_node_utils/pim.rb +1 -0
  62. data/lib/cisco_node_utils/pim_group_list.rb +1 -0
  63. data/lib/cisco_node_utils/pim_rp_address.rb +1 -0
  64. data/lib/cisco_node_utils/platform.rb +9 -2
  65. data/lib/cisco_node_utils/router_ospf.rb +1 -1
  66. data/lib/cisco_node_utils/router_ospf_area.rb +416 -0
  67. data/lib/cisco_node_utils/router_ospf_area_vlink.rb +313 -0
  68. data/lib/cisco_node_utils/router_ospf_vrf.rb +17 -0
  69. data/lib/cisco_node_utils/snmp_notification_receiver.rb +27 -9
  70. data/lib/cisco_node_utils/snmpcommunity.rb +34 -8
  71. data/lib/cisco_node_utils/snmpserver.rb +4 -4
  72. data/lib/cisco_node_utils/snmpuser.rb +0 -0
  73. data/lib/cisco_node_utils/tacacs_global.rb +102 -0
  74. data/lib/cisco_node_utils/tacacs_server.rb +8 -7
  75. data/lib/cisco_node_utils/vdc.rb +25 -7
  76. data/lib/cisco_node_utils/version.rb +1 -1
  77. data/lib/cisco_node_utils/vlan.rb +30 -56
  78. data/lib/cisco_node_utils/vlan_DEPRECATED.rb +108 -0
  79. data/lib/cisco_node_utils/yang.rb +160 -0
  80. data/lib/cisco_node_utils/yum.rb +25 -32
  81. data/tests/.rubocop.yml +3 -0
  82. data/tests/ciscotest.rb +136 -19
  83. data/tests/cmd_config_invalid.yaml +1 -1
  84. data/tests/noop.rb +7 -0
  85. data/tests/tacacs_server.yaml.example +6 -0
  86. data/tests/test_aaa_authentication_login.rb +24 -1
  87. data/tests/test_aaa_authentication_login_service.rb +9 -16
  88. data/tests/test_aaa_authorization_service.rb +111 -84
  89. data/tests/test_bfd_global.rb +278 -0
  90. data/tests/test_bgp_neighbor.rb +20 -0
  91. data/tests/test_bridge_domain_vni.rb +2 -9
  92. data/tests/test_cmn_utils.rb +76 -0
  93. data/tests/test_dhcp_relay_global.rb +284 -0
  94. data/tests/test_dns_domain.rb +4 -4
  95. data/tests/test_domain_name.rb +2 -2
  96. data/tests/test_encapsulation.rb +2 -4
  97. data/tests/test_evpn_vni.rb +14 -7
  98. data/tests/test_fabricpath_global.rb +12 -13
  99. data/tests/test_feature.rb +35 -17
  100. data/tests/test_interface.rb +352 -127
  101. data/tests/test_interface_bdi.rb +2 -2
  102. data/tests/test_interface_channel_group.rb +1 -1
  103. data/tests/test_interface_ospf.rb +153 -23
  104. data/tests/test_interface_portchannel.rb +15 -6
  105. data/tests/test_interface_private_vlan.rb +200 -576
  106. data/tests/test_interface_svi.rb +5 -52
  107. data/tests/test_interface_switchport.rb +80 -240
  108. data/tests/test_itd_device_group.rb +2 -2
  109. data/tests/test_itd_device_group_node.rb +2 -2
  110. data/tests/test_itd_service.rb +1 -1
  111. data/tests/test_name_server.rb +3 -3
  112. data/tests/test_node_ext.rb +15 -17
  113. data/tests/test_ntp_config.rb +1 -1
  114. data/tests/test_ntp_server.rb +3 -3
  115. data/tests/test_nxapi.rb +1 -0
  116. data/tests/test_overlay_global.rb +15 -19
  117. data/tests/test_pim.rb +5 -5
  118. data/tests/test_pim_group_list.rb +1 -37
  119. data/tests/test_pim_rp_address.rb +1 -1
  120. data/tests/test_platform.rb +9 -11
  121. data/tests/test_portchannel_global.rb +43 -3
  122. data/tests/test_radius_server.rb +1 -1
  123. data/tests/test_radius_server_group.rb +1 -1
  124. data/tests/test_router_bgp.rb +17 -30
  125. data/tests/test_router_ospf_area.rb +433 -0
  126. data/tests/test_router_ospf_area_vlink.rb +298 -0
  127. data/tests/test_router_ospf_vrf.rb +17 -0
  128. data/tests/test_snmp_notification_receiver.rb +11 -11
  129. data/tests/test_snmpcommunity.rb +177 -69
  130. data/tests/test_snmpgroup.rb +7 -7
  131. data/tests/test_snmpserver.rb +164 -253
  132. data/tests/test_snmpuser.rb +73 -69
  133. data/tests/test_stp_global.rb +15 -15
  134. data/tests/test_syslog_settings.rb +1 -1
  135. data/tests/test_tacacs_global.rb +80 -0
  136. data/tests/test_tacacs_server.rb +129 -51
  137. data/tests/test_tacacs_server_group.rb +3 -29
  138. data/tests/test_tacacs_server_host.rb +24 -27
  139. data/tests/test_vlan.rb +57 -59
  140. data/tests/test_vlan_private.rb +271 -284
  141. data/tests/test_vpc.rb +10 -4
  142. data/tests/test_vrf.rb +2 -0
  143. data/tests/test_vrf_af.rb +2 -5
  144. data/tests/test_vtp.rb +5 -2
  145. data/tests/test_vxlan_vtep.rb +20 -44
  146. data/tests/test_vxlan_vtep_vni.rb +23 -16
  147. data/tests/test_yang.rb +369 -0
  148. data/tests/test_yum.rb +34 -42
  149. data/tests/yum_package.yaml +35 -0
  150. metadata +31 -4
  151. 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
- nexus:
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
- get_value: '/IOS XR.*Version (.*)$/'
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
- get_command: "show running snmp all"
7
- get_value: '/^snmp-server community %s use-acl (.*)$/'
8
- set_value: "%s snmp-server community %s use-acl %s"
9
- default_value: ""
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
- multiple: true
13
- get_command: "show running snmp all"
14
- get_value: '/^snmp-server community (\S+) /'
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
- get_command: "show running snmp all"
18
- get_value: '/^snmp-server community (%s) group .*$/'
19
- set_value: "%s snmp-server community %s group %s"
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
- get_command: "show running snmp all"
23
- get_value: '/^snmp-server community %s group (.*)$/'
24
- set_value: "snmp-server community %s group %s"
25
- default_value: "network-operator"
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
- _exclude: [ios_xr]
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
- get_command: "show running-config snmp all"
7
- get_value: '/^snmp-server host %s.*version.* udp-port (\d+).*$/'
8
- default_value: null
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> version <version> <security> <username> <udp_port>"
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
- get_command: "show running-config snmp all"
23
- get_value: '/^snmp-server host %s.* source-interface (\S+).*$/'
24
- set_value: "snmp-server host <ip> source-interface <source_interface> <port>"
25
- default_value: null
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
- get_command: "show running-config snmp all"
39
- get_value: '/^snmp-server host %s.*version.* (\S+) udp-port/'
40
- default_value: null
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
- get_command: "show running-config snmp all"
49
- get_value: '/^snmp-server host %s.* use-vrf (\S+).*$/'
50
- set_value: "snmp-server host <ip> use-vrf <vrf> <port>"
51
- default_value: null
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: