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
data/tests/test_yum.rb CHANGED
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ require 'yaml'
15
16
  require_relative 'ciscotest'
16
17
  require_relative '../lib/cisco_node_utils/yum'
17
18
  require_relative '../lib/cisco_node_utils/platform'
@@ -26,28 +27,27 @@ class TestYum < CiscoTestCase
26
27
  @skip_unless_supported = 'yum'
27
28
 
28
29
  def select_pkg
30
+ path = File.expand_path('../yum_package.yaml', __FILE__)
31
+ skip('Cannot find tests/yum_package.yaml') unless File.file?(path)
32
+ pkginfo = YAML.load(File.read(path))
33
+
29
34
  # rubocop:disable Style/ClassVars
30
- @@pv = Platform.image_version
31
- case @@pv
32
- when /7.0\(3\)I2\(1\)/
33
- info 'Testing Patch For Camden Release Image'
34
- @@pkg_filename = 'n9000_sample-1.0.0-7.0.3.x86_64.rpm'
35
- @@pkg = 'n9000_sample'
36
- @@pkg_ver = '1.0.0-7.0.3'
37
- when /7.0\(3\)I3\(1\)/
38
- info 'Testing Patch For Dublin Release Image'
39
- @@pkg_filename = 'CSCuxdublin-1.0.0-7.0.3.I3.1.lib32_n9000.rpm'
40
- @@pkg = 'CSCuxdublin'
41
- @@pkg_ver = '1.0.0-7.0.3.I3.1'
42
- when /7.0\(4\)I4\(1\)/
43
- # TBD: Add Dublin Plus RPM when it becomes available.
44
- # info 'Testing Patch For Dublin Plus Release Image'
45
- else
46
- skip "Available patches are not compatible with this image: #{@@pv}"
47
- end
35
+ #
36
+ # Replace [.,(,)] characters with '_' for yaml key lookup.
37
+ # Image Version before gsub: 7.0(3)I3(1)
38
+ # Image Version after gsub: 7_0_3_I3_1_
39
+ @@pv = Platform.image_version.gsub(/[.()]/, '_')[/\S+/]
40
+ info "Image version detected: #{Platform.image_version}"
41
+ skip("No pkginfo filename found for image version #{@@pv}") if
42
+ pkginfo[@@pv].nil?
43
+
44
+ @@pkg_filename = pkginfo[@@pv]['filename']
45
+ @@pkg = pkginfo[@@pv]['name']
46
+ @@pkg_ver = pkginfo[@@pv]['version']
47
+
48
48
  @@incompatible_rpm_msg =
49
- ": Sample rpm is compatible with NX-OS release version #{@@pv}." \
50
- 'This test may fail with other versions.'
49
+ ": Sample rpm is compatible with version #{Platform.image_version}." \
50
+ 'This test will fail with other versions.'
51
51
  # rubocop:enable Style/ClassVars
52
52
  end
53
53
 
@@ -67,7 +67,7 @@ class TestYum < CiscoTestCase
67
67
 
68
68
  # Remnants of the package my still exist from a previous install attempt.
69
69
  info 'Executing test setup... Please be patient, this will take a while.'
70
- steps = ["install deactivate #{@@pkg}", "install commit #{@@pkg}",
70
+ steps = ["install deactivate #{@@pkg}",
71
71
  "install remove #{@@pkg} forced",
72
72
  "install add bootflash:#{@@pkg_filename}"]
73
73
  steps.each do |step|
@@ -85,7 +85,7 @@ class TestYum < CiscoTestCase
85
85
  'this file can be found in the cisco_node_utils/tests directory' if @@skip
86
86
  end
87
87
 
88
- def test_install_remove
88
+ def test_install_query_remove
89
89
  skip?
90
90
  if @device.cmd("show install package | include #{@@pkg}")[/@patching/]
91
91
  @device.cmd("install deactivate #{@@pkg}")
@@ -94,16 +94,24 @@ class TestYum < CiscoTestCase
94
94
  end
95
95
 
96
96
  # On dublin and later images, must specify the full rpm name.
97
- package = @@pv[/7.0\(3\)I2\(1\)/] ? @@pkg : @@pkg_filename
97
+ package = @@pv[/7_0_3_I2_1_/] ? @@pkg : @@pkg_filename
98
+
99
+ # INSTALL
98
100
  # Specify "management" vrf for install
99
101
  Yum.install(package, 'management')
100
102
  sleep 20
101
103
  assert(Yum.query(@@pkg), "failed to find installed package #{@@pkg}")
102
104
 
103
- Yum.remove(package)
105
+ # QUERY INSTALLED
106
+ assert_equal(@@pkg_ver, Yum.query(@@pkg), @@incompatible_rpm_msg)
107
+
108
+ # REMOVE
109
+ Yum.remove(@@pkg)
104
110
  sleep 20
105
- refute_show_match(command: "show install package | include #{@@pkg}",
106
- pattern: /@patching/)
111
+
112
+ # QUERY REMOVED
113
+ assert_nil(Yum.query(@@pkg))
114
+
107
115
  rescue RuntimeError => e
108
116
  assert(false, e.message + @@incompatible_rpm_msg)
109
117
  end
@@ -121,20 +129,4 @@ class TestYum < CiscoTestCase
121
129
  Yum.install('also_not_real', 'management')
122
130
  end
123
131
  end
124
-
125
- def test_query
126
- skip?
127
- unless @device.cmd("show install package | include #{@@pkg}")[/@patching/]
128
- @device.cmd("install activate #{@@pkg}")
129
- node.cache_flush
130
- sleep 20
131
- end
132
- ver = Yum.query(@@pkg)
133
- assert_equal(ver, @@pkg_ver, @@incompatible_rpm_msg)
134
- @device.cmd("install deactivate #{@@pkg}")
135
- node.cache_flush
136
- sleep 20
137
- ver = Yum.query(@@pkg)
138
- assert_nil(ver)
139
- end
140
132
  end
@@ -0,0 +1,35 @@
1
+ # Sample Patch RPM's
2
+ #
3
+
4
+ # N3K and N9K Sample Patches
5
+
6
+ 7_0_3_I2_1_:
7
+ filename: 'n9000_sample-1.0.0-7.0.3.x86_64.rpm'
8
+ name: 'n9000_sample'
9
+ version: '1.0.0-7.0.3'
10
+
11
+ 7_0_3_I2_2e_:
12
+ filename: 'nxos.sample-n9k_EOR-1.0.0-7.0.3.I2.2e.lib32_n9000.rpm'
13
+ name: 'nxos.sample-n9k_EOR'
14
+ version: '1.0.0-7.0.3.I2.2e'
15
+
16
+ 7_0_3_I3_1_:
17
+ filename: 'nxos.sample-n9k_EOR-1.0.0-7.0.3.I3.1.lib32_n9000.rpm'
18
+ name: 'nxos.sample-n9k_EOR'
19
+ version: '1.0.0-7.0.3.I3.1'
20
+
21
+ 7_0_3_I4_1_:
22
+ filename: 'nxos.sample-n9k_EOR-1.0.0-7.0.3.I4.1.lib32_n9000.rpm'
23
+ name: 'nxos.sample-n9k_EOR'
24
+ version: '1.0.0-7.0.3.I4.1'
25
+
26
+ 7_0_3_I4_2_:
27
+ filename: 'nxos.sample-n9k_EOR-1.0.0-7.0.3.I4.2.lib32_n9000.rpm'
28
+ name: 'nxos.sample-n9k_EOR'
29
+ version: '1.0.0-7.0.3.I4.2'
30
+
31
+ 7_0_3_I5_1_:
32
+ filename: 'nxos.sample-n9k_EOR-1.0.0-7.0.3.I5.1.lib32_n9000.rpm'
33
+ name: 'nxos.sample-n9k_EOR'
34
+ version: '1.0.0-7.0.3.I5.1'
35
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cisco_node_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Gries
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2016-05-03 00:00:00.000000000 Z
17
+ date: 2016-10-03 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: bundler
@@ -117,7 +117,7 @@ dependencies:
117
117
  description: |
118
118
  Utilities for management of Cisco network nodes.
119
119
  Designed to work with Puppet and Chef.
120
- Currently supports NX-OS and IOS XR nodes.
120
+ Currently supports NX-OS nodes.
121
121
  email: cisco_agent_gem@cisco.com
122
122
  executables: []
123
123
  extensions:
@@ -135,6 +135,7 @@ files:
135
135
  - README.md
136
136
  - Rakefile
137
137
  - SUPPORT.md
138
+ - bin/.rubocop.yml
138
139
  - bin/check_metric_limits.rb
139
140
  - bin/git/hooks/commit-msg/enforce_style
140
141
  - bin/git/hooks/hook_lib
@@ -151,11 +152,13 @@ files:
151
152
  - bin/git/hooks/pre-push/check-changelog
152
153
  - bin/git/hooks/pre-push/rubocop
153
154
  - bin/git/update-hooks
155
+ - bin/show_running_yang.rb
154
156
  - cisco_node_utils.gemspec
155
157
  - docs/README-develop-best-practices.md
156
158
  - docs/README-develop-node-utils-APIs.md
157
159
  - docs/README-maintainers.md
158
160
  - docs/README-test-execution.md
161
+ - docs/README-utilities.md
159
162
  - docs/agent_files.png
160
163
  - docs/cisco_node_utils.yaml.example
161
164
  - docs/template-router.rb
@@ -168,6 +171,7 @@ files:
168
171
  - lib/cisco_node_utils/aaa_authorization_service.rb
169
172
  - lib/cisco_node_utils/ace.rb
170
173
  - lib/cisco_node_utils/acl.rb
174
+ - lib/cisco_node_utils/bfd_global.rb
171
175
  - lib/cisco_node_utils/bgp.rb
172
176
  - lib/cisco_node_utils/bgp_af.rb
173
177
  - lib/cisco_node_utils/bgp_neighbor.rb
@@ -185,17 +189,20 @@ files:
185
189
  - lib/cisco_node_utils/client/nxapi.rb
186
190
  - lib/cisco_node_utils/client/nxapi/client.rb
187
191
  - lib/cisco_node_utils/client/utils.rb
192
+ - lib/cisco_node_utils/cmd_ref/DEPRECATED.yaml
188
193
  - lib/cisco_node_utils/cmd_ref/README_YAML.md
189
194
  - lib/cisco_node_utils/cmd_ref/aaa_auth_login_service.yaml
190
195
  - lib/cisco_node_utils/cmd_ref/aaa_authentication_login.yaml
191
196
  - lib/cisco_node_utils/cmd_ref/aaa_authorization_service.yaml
192
197
  - lib/cisco_node_utils/cmd_ref/acl.yaml
198
+ - lib/cisco_node_utils/cmd_ref/bfd_global.yaml
193
199
  - lib/cisco_node_utils/cmd_ref/bgp.yaml
194
200
  - lib/cisco_node_utils/cmd_ref/bgp_af.yaml
195
201
  - lib/cisco_node_utils/cmd_ref/bgp_neighbor.yaml
196
202
  - lib/cisco_node_utils/cmd_ref/bgp_neighbor_af.yaml
197
203
  - lib/cisco_node_utils/cmd_ref/bridge_domain.yaml
198
204
  - lib/cisco_node_utils/cmd_ref/bridge_domain_vni.yaml
205
+ - lib/cisco_node_utils/cmd_ref/dhcp_relay_global.yaml
199
206
  - lib/cisco_node_utils/cmd_ref/dnsclient.yaml
200
207
  - lib/cisco_node_utils/cmd_ref/encapsulation.yaml
201
208
  - lib/cisco_node_utils/cmd_ref/evpn_vni.yaml
@@ -215,6 +222,8 @@ files:
215
222
  - lib/cisco_node_utils/cmd_ref/ntp_config.yaml
216
223
  - lib/cisco_node_utils/cmd_ref/ntp_server.yaml
217
224
  - lib/cisco_node_utils/cmd_ref/ospf.yaml
225
+ - lib/cisco_node_utils/cmd_ref/ospf_area.yaml
226
+ - lib/cisco_node_utils/cmd_ref/ospf_area_vlink.yaml
218
227
  - lib/cisco_node_utils/cmd_ref/overlay_global.yaml
219
228
  - lib/cisco_node_utils/cmd_ref/pim.yaml
220
229
  - lib/cisco_node_utils/cmd_ref/portchannel_global.yaml
@@ -233,6 +242,7 @@ files:
233
242
  - lib/cisco_node_utils/cmd_ref/syslog_server.yaml
234
243
  - lib/cisco_node_utils/cmd_ref/syslog_settings.yaml
235
244
  - lib/cisco_node_utils/cmd_ref/system.yaml
245
+ - lib/cisco_node_utils/cmd_ref/tacacs_global.yaml
236
246
  - lib/cisco_node_utils/cmd_ref/tacacs_server.yaml
237
247
  - lib/cisco_node_utils/cmd_ref/tacacs_server_group.yaml
238
248
  - lib/cisco_node_utils/cmd_ref/tacacs_server_host.yaml
@@ -245,10 +255,12 @@ files:
245
255
  - lib/cisco_node_utils/cmd_ref/vtp.yaml
246
256
  - lib/cisco_node_utils/cmd_ref/vxlan_vtep.yaml
247
257
  - lib/cisco_node_utils/cmd_ref/vxlan_vtep_vni.yaml
258
+ - lib/cisco_node_utils/cmd_ref/yang.yaml
248
259
  - lib/cisco_node_utils/cmd_ref/yum.yaml
249
260
  - lib/cisco_node_utils/command_reference.rb
250
261
  - lib/cisco_node_utils/configparser_lib.rb
251
262
  - lib/cisco_node_utils/constants.rb
263
+ - lib/cisco_node_utils/dhcp_relay_global.rb
252
264
  - lib/cisco_node_utils/dns_domain.rb
253
265
  - lib/cisco_node_utils/domain_name.rb
254
266
  - lib/cisco_node_utils/encapsulation.rb
@@ -259,6 +271,7 @@ files:
259
271
  - lib/cisco_node_utils/fabricpath_topology.rb
260
272
  - lib/cisco_node_utils/feature.rb
261
273
  - lib/cisco_node_utils/interface.rb
274
+ - lib/cisco_node_utils/interface_DEPRECATED.rb
262
275
  - lib/cisco_node_utils/interface_channel_group.rb
263
276
  - lib/cisco_node_utils/interface_ospf.rb
264
277
  - lib/cisco_node_utils/interface_portchannel.rb
@@ -282,6 +295,8 @@ files:
282
295
  - lib/cisco_node_utils/radius_server.rb
283
296
  - lib/cisco_node_utils/radius_server_group.rb
284
297
  - lib/cisco_node_utils/router_ospf.rb
298
+ - lib/cisco_node_utils/router_ospf_area.rb
299
+ - lib/cisco_node_utils/router_ospf_area_vlink.rb
285
300
  - lib/cisco_node_utils/router_ospf_vrf.rb
286
301
  - lib/cisco_node_utils/snmp_notification_receiver.rb
287
302
  - lib/cisco_node_utils/snmpcommunity.rb
@@ -292,18 +307,21 @@ files:
292
307
  - lib/cisco_node_utils/stp_global.rb
293
308
  - lib/cisco_node_utils/syslog_server.rb
294
309
  - lib/cisco_node_utils/syslog_settings.rb
310
+ - lib/cisco_node_utils/tacacs_global.rb
295
311
  - lib/cisco_node_utils/tacacs_server.rb
296
312
  - lib/cisco_node_utils/tacacs_server_group.rb
297
313
  - lib/cisco_node_utils/tacacs_server_host.rb
298
314
  - lib/cisco_node_utils/vdc.rb
299
315
  - lib/cisco_node_utils/version.rb
300
316
  - lib/cisco_node_utils/vlan.rb
317
+ - lib/cisco_node_utils/vlan_DEPRECATED.rb
301
318
  - lib/cisco_node_utils/vpc.rb
302
319
  - lib/cisco_node_utils/vrf.rb
303
320
  - lib/cisco_node_utils/vrf_af.rb
304
321
  - lib/cisco_node_utils/vtp.rb
305
322
  - lib/cisco_node_utils/vxlan_vtep.rb
306
323
  - lib/cisco_node_utils/vxlan_vtep_vni.rb
324
+ - lib/cisco_node_utils/yang.rb
307
325
  - lib/cisco_node_utils/yum.rb
308
326
  - lib/minitest/environment_plugin.rb
309
327
  - lib/minitest/log_level_plugin.rb
@@ -327,20 +345,25 @@ files:
327
345
  - tests/cmd_config.yaml
328
346
  - tests/cmd_config_invalid.yaml
329
347
  - tests/n9000_sample-1.0.0-7.0.3.x86_64.rpm
348
+ - tests/noop.rb
330
349
  - tests/platform_info.rb
350
+ - tests/tacacs_server.yaml.example
331
351
  - tests/test_aaa_authentication_login.rb
332
352
  - tests/test_aaa_authentication_login_service.rb
333
353
  - tests/test_aaa_authorization_service.rb
334
354
  - tests/test_ace.rb
335
355
  - tests/test_acl.rb
356
+ - tests/test_bfd_global.rb
336
357
  - tests/test_bgp_af.rb
337
358
  - tests/test_bgp_neighbor.rb
338
359
  - tests/test_bgp_neighbor_af.rb
339
360
  - tests/test_bridge_domain.rb
340
361
  - tests/test_bridge_domain_vni.rb
341
362
  - tests/test_client_utils.rb
363
+ - tests/test_cmn_utils.rb
342
364
  - tests/test_command_config.rb
343
365
  - tests/test_command_reference.rb
366
+ - tests/test_dhcp_relay_global.rb
344
367
  - tests/test_dns_domain.rb
345
368
  - tests/test_domain_name.rb
346
369
  - tests/test_encapsulation.rb
@@ -380,6 +403,8 @@ files:
380
403
  - tests/test_radius_server_group.rb
381
404
  - tests/test_router_bgp.rb
382
405
  - tests/test_router_ospf.rb
406
+ - tests/test_router_ospf_area.rb
407
+ - tests/test_router_ospf_area_vlink.rb
383
408
  - tests/test_router_ospf_vrf.rb
384
409
  - tests/test_snmp_notification_receiver.rb
385
410
  - tests/test_snmpcommunity.rb
@@ -390,12 +415,12 @@ files:
390
415
  - tests/test_stp_global.rb
391
416
  - tests/test_syslog_server.rb
392
417
  - tests/test_syslog_settings.rb
418
+ - tests/test_tacacs_global.rb
393
419
  - tests/test_tacacs_server.rb
394
420
  - tests/test_tacacs_server_group.rb
395
421
  - tests/test_tacacs_server_host.rb
396
422
  - tests/test_vdc.rb
397
423
  - tests/test_vlan.rb
398
- - tests/test_vlan_mt_full.rb
399
424
  - tests/test_vlan_private.rb
400
425
  - tests/test_vpc.rb
401
426
  - tests/test_vrf.rb
@@ -403,7 +428,9 @@ files:
403
428
  - tests/test_vtp.rb
404
429
  - tests/test_vxlan_vtep.rb
405
430
  - tests/test_vxlan_vtep_vni.rb
431
+ - tests/test_yang.rb
406
432
  - tests/test_yum.rb
433
+ - tests/yum_package.yaml
407
434
  homepage: https://github.com/cisco/cisco-network-node-utils
408
435
  licenses:
409
436
  - Apache-2.0
@@ -1,85 +0,0 @@
1
- # Copyright (c) 2016 Cisco and/or its affiliates.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- require_relative 'ciscotest'
16
- require_relative '../lib/cisco_node_utils/vlan'
17
- require_relative '../lib/cisco_node_utils/interface'
18
- require_relative '../lib/cisco_node_utils/vdc'
19
- require_relative '../lib/cisco_node_utils/vxlan_vtep'
20
-
21
- include Cisco
22
-
23
- # TestVlanMtFull - Minitest for Vlan node utility (MT-Full testing only)
24
- #
25
- # This test requires specific platform & linecard support:
26
- # - vdc support with 'limit-resource module-type' set to 'f3'
27
- #
28
- class TestVlanMtFull < CiscoTestCase
29
- @@cleaned = false # rubocop:disable Style/ClassVars
30
- def cleanup
31
- Vlan.vlans.each do |vlan, obj|
32
- # skip reserved vlans
33
- next if vlan == '1'
34
- next if node.product_id[/N5K|N6K|N7K/] && (1002..1005).include?(vlan.to_i)
35
- obj.destroy
36
- end
37
- interface_ethernet_default(interfaces[0])
38
- end
39
-
40
- def setup
41
- super
42
- return if @@cleaned
43
- cleanup
44
- remove_all_bridge_domains # BDs may conflict with our test vlans
45
- @@cleaned = true # rubocop:disable Style/ClassVars
46
- end
47
-
48
- def teardown
49
- cleanup
50
- end
51
-
52
- def interface_ethernet_default(ethernet_id)
53
- config("default interface #{ethernet_id}")
54
- end
55
-
56
- def mt_full_env_setup
57
- skip('Platform does not support MT-full') unless VxlanVtep.mt_full_support
58
- mt_full_interface?
59
- v = Vdc.new('default')
60
- v.limit_resource_module_type = 'f3' unless
61
- v.limit_resource_module_type == 'f3'
62
- end
63
-
64
- def test_vlan_mode_fabricpath
65
- mt_full_env_setup
66
-
67
- # Test for valid mode
68
- v = Vlan.new(2000)
69
- default = v.default_mode
70
- assert_equal(default, v.mode,
71
- 'Mode should have been default value: #{default}')
72
- v.mode = 'fabricpath'
73
- assert_equal(:enabled, v.fabricpath_feature,
74
- 'Fabricpath feature should have been enabled')
75
- assert_equal('fabricpath', v.mode,
76
- 'Mode should have been set to fabricpath')
77
-
78
- # Test for invalid mode
79
- v = Vlan.new(100)
80
- assert_equal(default, v.mode,
81
- 'Mode should have been default value: #{default}')
82
-
83
- assert_raises(CliError) { v.mode = 'junk' }
84
- end
85
- end