cisco_node_utils_mgx 2.1.0.1

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 (357) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +96 -0
  5. data/.travis.yml +17 -0
  6. data/CHANGELOG.md +676 -0
  7. data/CONTRIBUTING.md +43 -0
  8. data/Gemfile +10 -0
  9. data/LICENSE +201 -0
  10. data/README.md +246 -0
  11. data/Rakefile +44 -0
  12. data/SUPPORT.md +3 -0
  13. data/bin/.rubocop.yml +18 -0
  14. data/bin/check_metric_limits.rb +109 -0
  15. data/bin/git/hooks/commit-msg/enforce_style +89 -0
  16. data/bin/git/hooks/hook_lib +115 -0
  17. data/bin/git/hooks/hooks-wrapper +38 -0
  18. data/bin/git/hooks/post-flow-hotfix-start/update-version +24 -0
  19. data/bin/git/hooks/post-flow-release-finish/update-version +29 -0
  20. data/bin/git/hooks/post-flow-release-start/update-version +19 -0
  21. data/bin/git/hooks/post-merge/update-hooks +6 -0
  22. data/bin/git/hooks/post-rewrite/update-hooks +6 -0
  23. data/bin/git/hooks/pre-commit/check_unstaged_changes +18 -0
  24. data/bin/git/hooks/pre-commit/rubocop +25 -0
  25. data/bin/git/hooks/pre-commit/validate-diffs +45 -0
  26. data/bin/git/hooks/pre-commit/validate-yaml +18 -0
  27. data/bin/git/hooks/pre-push/check-changelog +24 -0
  28. data/bin/git/hooks/pre-push/rubocop +7 -0
  29. data/bin/git/update-hooks +123 -0
  30. data/bin/show_running_yang.rb +233 -0
  31. data/cisco_node_utils.gemspec +41 -0
  32. data/docs/README-develop-best-practices.md +521 -0
  33. data/docs/README-develop-node-utils-APIs.md +570 -0
  34. data/docs/README-maintainers.md +77 -0
  35. data/docs/README-test-execution.md +57 -0
  36. data/docs/README-utilities.md +14 -0
  37. data/docs/agent_files.png +0 -0
  38. data/docs/cisco_node_utils.yaml.example +36 -0
  39. data/docs/template-router.rb +123 -0
  40. data/docs/template-test_router.rb +104 -0
  41. data/ext/mkrf_conf.rb +63 -0
  42. data/lib/.rubocop.yml +18 -0
  43. data/lib/cisco_node_utils/aaa_authentication_login.rb +95 -0
  44. data/lib/cisco_node_utils/aaa_authentication_login_service.rb +138 -0
  45. data/lib/cisco_node_utils/aaa_authorization_service.rb +156 -0
  46. data/lib/cisco_node_utils/ace.rb +467 -0
  47. data/lib/cisco_node_utils/acl.rb +101 -0
  48. data/lib/cisco_node_utils/banner.rb +63 -0
  49. data/lib/cisco_node_utils/bfd_global.rb +305 -0
  50. data/lib/cisco_node_utils/bgp.rb +988 -0
  51. data/lib/cisco_node_utils/bgp_af.rb +545 -0
  52. data/lib/cisco_node_utils/bgp_af_aggr_addr.rb +207 -0
  53. data/lib/cisco_node_utils/bgp_neighbor.rb +527 -0
  54. data/lib/cisco_node_utils/bgp_neighbor_af.rb +780 -0
  55. data/lib/cisco_node_utils/bridge_domain.rb +178 -0
  56. data/lib/cisco_node_utils/bridge_domain_vni.rb +206 -0
  57. data/lib/cisco_node_utils/cisco_cmn_utils.rb +444 -0
  58. data/lib/cisco_node_utils/client/client.rb +238 -0
  59. data/lib/cisco_node_utils/client/grpc/client.rb +395 -0
  60. data/lib/cisco_node_utils/client/grpc/ems.proto +148 -0
  61. data/lib/cisco_node_utils/client/grpc/ems.rb +111 -0
  62. data/lib/cisco_node_utils/client/grpc/ems_services.rb +49 -0
  63. data/lib/cisco_node_utils/client/grpc.rb +33 -0
  64. data/lib/cisco_node_utils/client/nxapi/client.rb +368 -0
  65. data/lib/cisco_node_utils/client/nxapi.rb +31 -0
  66. data/lib/cisco_node_utils/client/utils.rb +180 -0
  67. data/lib/cisco_node_utils/client.rb +35 -0
  68. data/lib/cisco_node_utils/cmd_ref/README_YAML.md +590 -0
  69. data/lib/cisco_node_utils/cmd_ref/aaa_auth_login_service.yaml +25 -0
  70. data/lib/cisco_node_utils/cmd_ref/aaa_authentication_login.yaml +38 -0
  71. data/lib/cisco_node_utils/cmd_ref/aaa_authorization_service.yaml +40 -0
  72. data/lib/cisco_node_utils/cmd_ref/acl.yaml +48 -0
  73. data/lib/cisco_node_utils/cmd_ref/banner.yaml +11 -0
  74. data/lib/cisco_node_utils/cmd_ref/bfd_global.yaml +117 -0
  75. data/lib/cisco_node_utils/cmd_ref/bgp.yaml +383 -0
  76. data/lib/cisco_node_utils/cmd_ref/bgp_af.yaml +223 -0
  77. data/lib/cisco_node_utils/cmd_ref/bgp_af_aa.yaml +38 -0
  78. data/lib/cisco_node_utils/cmd_ref/bgp_neighbor.yaml +174 -0
  79. data/lib/cisco_node_utils/cmd_ref/bgp_neighbor_af.yaml +236 -0
  80. data/lib/cisco_node_utils/cmd_ref/bridge_domain.yaml +49 -0
  81. data/lib/cisco_node_utils/cmd_ref/bridge_domain_vni.yaml +33 -0
  82. data/lib/cisco_node_utils/cmd_ref/dhcp_relay_global.yaml +128 -0
  83. data/lib/cisco_node_utils/cmd_ref/dnsclient.yaml +55 -0
  84. data/lib/cisco_node_utils/cmd_ref/encapsulation.yaml +25 -0
  85. data/lib/cisco_node_utils/cmd_ref/evpn_multicast.yaml +12 -0
  86. data/lib/cisco_node_utils/cmd_ref/evpn_multisite.yaml +18 -0
  87. data/lib/cisco_node_utils/cmd_ref/evpn_stormcontrol.yaml +18 -0
  88. data/lib/cisco_node_utils/cmd_ref/evpn_vni.yaml +48 -0
  89. data/lib/cisco_node_utils/cmd_ref/fabricpath.yaml +183 -0
  90. data/lib/cisco_node_utils/cmd_ref/fabricpath_topology.yaml +40 -0
  91. data/lib/cisco_node_utils/cmd_ref/feature.yaml +126 -0
  92. data/lib/cisco_node_utils/cmd_ref/hostname.yaml +8 -0
  93. data/lib/cisco_node_utils/cmd_ref/hsrp_global.yaml +25 -0
  94. data/lib/cisco_node_utils/cmd_ref/images.yaml +8 -0
  95. data/lib/cisco_node_utils/cmd_ref/interface.yaml +781 -0
  96. data/lib/cisco_node_utils/cmd_ref/interface_channel_group.yaml +45 -0
  97. data/lib/cisco_node_utils/cmd_ref/interface_evpn_multisite.yaml +17 -0
  98. data/lib/cisco_node_utils/cmd_ref/interface_hsrp_group.yaml +120 -0
  99. data/lib/cisco_node_utils/cmd_ref/interface_ospf.yaml +112 -0
  100. data/lib/cisco_node_utils/cmd_ref/interface_portchannel.yaml +87 -0
  101. data/lib/cisco_node_utils/cmd_ref/interface_service_vni.yaml +42 -0
  102. data/lib/cisco_node_utils/cmd_ref/inventory.yaml +45 -0
  103. data/lib/cisco_node_utils/cmd_ref/ip_multicast.yaml +22 -0
  104. data/lib/cisco_node_utils/cmd_ref/itd_device_group.yaml +83 -0
  105. data/lib/cisco_node_utils/cmd_ref/itd_service.yaml +119 -0
  106. data/lib/cisco_node_utils/cmd_ref/memory.yaml +24 -0
  107. data/lib/cisco_node_utils/cmd_ref/ntp_auth_key.yaml +10 -0
  108. data/lib/cisco_node_utils/cmd_ref/ntp_config.yaml +27 -0
  109. data/lib/cisco_node_utils/cmd_ref/ntp_server.yaml +34 -0
  110. data/lib/cisco_node_utils/cmd_ref/object_group.yaml +32 -0
  111. data/lib/cisco_node_utils/cmd_ref/ospf.yaml +91 -0
  112. data/lib/cisco_node_utils/cmd_ref/ospf_area.yaml +91 -0
  113. data/lib/cisco_node_utils/cmd_ref/ospf_area_vlink.yaml +88 -0
  114. data/lib/cisco_node_utils/cmd_ref/overlay_global.yaml +37 -0
  115. data/lib/cisco_node_utils/cmd_ref/pim.yaml +43 -0
  116. data/lib/cisco_node_utils/cmd_ref/portchannel_global.yaml +86 -0
  117. data/lib/cisco_node_utils/cmd_ref/radius_global.yaml +37 -0
  118. data/lib/cisco_node_utils/cmd_ref/radius_server.yaml +100 -0
  119. data/lib/cisco_node_utils/cmd_ref/radius_server_group.yaml +19 -0
  120. data/lib/cisco_node_utils/cmd_ref/route_map.yaml +601 -0
  121. data/lib/cisco_node_utils/cmd_ref/show_system.yaml +9 -0
  122. data/lib/cisco_node_utils/cmd_ref/show_version.yaml +84 -0
  123. data/lib/cisco_node_utils/cmd_ref/snmp_community.yaml +81 -0
  124. data/lib/cisco_node_utils/cmd_ref/snmp_group.yaml +9 -0
  125. data/lib/cisco_node_utils/cmd_ref/snmp_notification_receiver.yaml +74 -0
  126. data/lib/cisco_node_utils/cmd_ref/snmp_server.yaml +91 -0
  127. data/lib/cisco_node_utils/cmd_ref/snmp_user.yaml +57 -0
  128. data/lib/cisco_node_utils/cmd_ref/snmpnotification.yaml +23 -0
  129. data/lib/cisco_node_utils/cmd_ref/span_session.yaml +65 -0
  130. data/lib/cisco_node_utils/cmd_ref/stp_global.yaml +235 -0
  131. data/lib/cisco_node_utils/cmd_ref/syslog_facility.yaml +10 -0
  132. data/lib/cisco_node_utils/cmd_ref/syslog_server.yaml +34 -0
  133. data/lib/cisco_node_utils/cmd_ref/syslog_settings.yaml +45 -0
  134. data/lib/cisco_node_utils/cmd_ref/system.yaml +7 -0
  135. data/lib/cisco_node_utils/cmd_ref/tacacs_global.yaml +37 -0
  136. data/lib/cisco_node_utils/cmd_ref/tacacs_server.yaml +63 -0
  137. data/lib/cisco_node_utils/cmd_ref/tacacs_server_group.yaml +45 -0
  138. data/lib/cisco_node_utils/cmd_ref/tacacs_server_host.yaml +64 -0
  139. data/lib/cisco_node_utils/cmd_ref/upgrade.yaml +38 -0
  140. data/lib/cisco_node_utils/cmd_ref/vdc.yaml +52 -0
  141. data/lib/cisco_node_utils/cmd_ref/virtual_service.yaml +8 -0
  142. data/lib/cisco_node_utils/cmd_ref/vlan.yaml +106 -0
  143. data/lib/cisco_node_utils/cmd_ref/vpc.yaml +233 -0
  144. data/lib/cisco_node_utils/cmd_ref/vrf.yaml +86 -0
  145. data/lib/cisco_node_utils/cmd_ref/vrf_af.yaml +139 -0
  146. data/lib/cisco_node_utils/cmd_ref/vtp.yaml +32 -0
  147. data/lib/cisco_node_utils/cmd_ref/vxlan_vtep.yaml +114 -0
  148. data/lib/cisco_node_utils/cmd_ref/vxlan_vtep_vni.yaml +71 -0
  149. data/lib/cisco_node_utils/cmd_ref/yang.yaml +7 -0
  150. data/lib/cisco_node_utils/cmd_ref/yum.yaml +68 -0
  151. data/lib/cisco_node_utils/command_reference.rb +724 -0
  152. data/lib/cisco_node_utils/configparser_lib.rb +195 -0
  153. data/lib/cisco_node_utils/constants.rb +40 -0
  154. data/lib/cisco_node_utils/dhcp_relay_global.rb +302 -0
  155. data/lib/cisco_node_utils/dns_domain.rb +93 -0
  156. data/lib/cisco_node_utils/domain_name.rb +82 -0
  157. data/lib/cisco_node_utils/encapsulation.rb +112 -0
  158. data/lib/cisco_node_utils/environment.rb +110 -0
  159. data/lib/cisco_node_utils/evpn_multicast.rb +66 -0
  160. data/lib/cisco_node_utils/evpn_multisite.rb +96 -0
  161. data/lib/cisco_node_utils/evpn_stormcontrol.rb +84 -0
  162. data/lib/cisco_node_utils/evpn_vni.rb +159 -0
  163. data/lib/cisco_node_utils/exceptions.rb +140 -0
  164. data/lib/cisco_node_utils/fabricpath_global.rb +405 -0
  165. data/lib/cisco_node_utils/fabricpath_topology.rb +137 -0
  166. data/lib/cisco_node_utils/feature.rb +377 -0
  167. data/lib/cisco_node_utils/hostname.rb +62 -0
  168. data/lib/cisco_node_utils/hsrp_global.rb +97 -0
  169. data/lib/cisco_node_utils/interface.rb +2128 -0
  170. data/lib/cisco_node_utils/interface_channel_group.rb +142 -0
  171. data/lib/cisco_node_utils/interface_evpn_multisite.rb +72 -0
  172. data/lib/cisco_node_utils/interface_hsrp_group.rb +557 -0
  173. data/lib/cisco_node_utils/interface_ospf.rb +378 -0
  174. data/lib/cisco_node_utils/interface_portchannel.rb +180 -0
  175. data/lib/cisco_node_utils/interface_service_vni.rb +132 -0
  176. data/lib/cisco_node_utils/ip_multicast.rb +90 -0
  177. data/lib/cisco_node_utils/itd_device_group.rb +228 -0
  178. data/lib/cisco_node_utils/itd_device_group_node.rb +144 -0
  179. data/lib/cisco_node_utils/itd_service.rb +511 -0
  180. data/lib/cisco_node_utils/logger.rb +78 -0
  181. data/lib/cisco_node_utils/name_server.rb +64 -0
  182. data/lib/cisco_node_utils/node.rb +443 -0
  183. data/lib/cisco_node_utils/node_util.rb +111 -0
  184. data/lib/cisco_node_utils/ntp_auth_key.rb +67 -0
  185. data/lib/cisco_node_utils/ntp_config.rb +83 -0
  186. data/lib/cisco_node_utils/ntp_server.rb +86 -0
  187. data/lib/cisco_node_utils/object_group.rb +75 -0
  188. data/lib/cisco_node_utils/object_group_entry.rb +143 -0
  189. data/lib/cisco_node_utils/overlay_global.rb +142 -0
  190. data/lib/cisco_node_utils/pim.rb +131 -0
  191. data/lib/cisco_node_utils/pim_group_list.rb +109 -0
  192. data/lib/cisco_node_utils/pim_rp_address.rb +103 -0
  193. data/lib/cisco_node_utils/platform.rb +217 -0
  194. data/lib/cisco_node_utils/portchannel_global.rb +347 -0
  195. data/lib/cisco_node_utils/radius_global.rb +165 -0
  196. data/lib/cisco_node_utils/radius_server.rb +421 -0
  197. data/lib/cisco_node_utils/radius_server_group.rb +117 -0
  198. data/lib/cisco_node_utils/route_map.rb +2540 -0
  199. data/lib/cisco_node_utils/router_ospf.rb +77 -0
  200. data/lib/cisco_node_utils/router_ospf_area.rb +416 -0
  201. data/lib/cisco_node_utils/router_ospf_area_vlink.rb +313 -0
  202. data/lib/cisco_node_utils/router_ospf_vrf.rb +342 -0
  203. data/lib/cisco_node_utils/snmp_notification_receiver.rb +176 -0
  204. data/lib/cisco_node_utils/snmpcommunity.rb +109 -0
  205. data/lib/cisco_node_utils/snmpgroup.rb +54 -0
  206. data/lib/cisco_node_utils/snmpnotification.rb +57 -0
  207. data/lib/cisco_node_utils/snmpserver.rb +132 -0
  208. data/lib/cisco_node_utils/snmpuser.rb +403 -0
  209. data/lib/cisco_node_utils/span_session.rb +149 -0
  210. data/lib/cisco_node_utils/stp_global.rb +676 -0
  211. data/lib/cisco_node_utils/syslog_facility.rb +64 -0
  212. data/lib/cisco_node_utils/syslog_server.rb +146 -0
  213. data/lib/cisco_node_utils/syslog_settings.rb +174 -0
  214. data/lib/cisco_node_utils/tacacs_global.rb +137 -0
  215. data/lib/cisco_node_utils/tacacs_server.rb +173 -0
  216. data/lib/cisco_node_utils/tacacs_server_group.rb +149 -0
  217. data/lib/cisco_node_utils/tacacs_server_host.rb +216 -0
  218. data/lib/cisco_node_utils/upgrade.rb +122 -0
  219. data/lib/cisco_node_utils/vdc.rb +118 -0
  220. data/lib/cisco_node_utils/version.rb +21 -0
  221. data/lib/cisco_node_utils/vlan.rb +301 -0
  222. data/lib/cisco_node_utils/vpc.rb +466 -0
  223. data/lib/cisco_node_utils/vrf.rb +192 -0
  224. data/lib/cisco_node_utils/vrf_af.rb +327 -0
  225. data/lib/cisco_node_utils/vtp.rb +125 -0
  226. data/lib/cisco_node_utils/vxlan_vtep.rb +286 -0
  227. data/lib/cisco_node_utils/vxlan_vtep_vni.rb +331 -0
  228. data/lib/cisco_node_utils/yang.rb +160 -0
  229. data/lib/cisco_node_utils/yum.rb +213 -0
  230. data/lib/cisco_node_utils.rb +21 -0
  231. data/lib/minitest/environment_plugin.rb +31 -0
  232. data/lib/minitest/log_level_plugin.rb +41 -0
  233. data/spec/client_spec.rb +7 -0
  234. data/spec/environment_spec.rb +384 -0
  235. data/spec/grpc_client_spec.rb +23 -0
  236. data/spec/isolate/all_clients_spec.rb +9 -0
  237. data/spec/isolate/grpc_only_spec.rb +16 -0
  238. data/spec/isolate/no_clients_spec.rb +26 -0
  239. data/spec/isolate/nxapi_only_spec.rb +16 -0
  240. data/spec/nxapi_client_spec.rb +42 -0
  241. data/spec/schema.yaml +82 -0
  242. data/spec/shared_examples_for_clients.rb +14 -0
  243. data/spec/spec_helper.rb +91 -0
  244. data/spec/whitespace_spec.rb +10 -0
  245. data/spec/yaml_spec.rb +42 -0
  246. data/tests/.rubocop.yml +18 -0
  247. data/tests/CSCuxdublin-1.0.0-7.0.3.I3.1.lib32_n9000.rpm +0 -0
  248. data/tests/basetest.rb +243 -0
  249. data/tests/ciscotest.rb +577 -0
  250. data/tests/cmd_config.yaml +75 -0
  251. data/tests/cmd_config_invalid.yaml +16 -0
  252. data/tests/n9000_sample-1.0.0-7.0.3.x86_64.rpm +0 -0
  253. data/tests/noop.rb +7 -0
  254. data/tests/platform_info.rb +63 -0
  255. data/tests/tacacs_server.yaml.example +6 -0
  256. data/tests/test_aaa_authentication_login.rb +243 -0
  257. data/tests/test_aaa_authentication_login_service.rb +761 -0
  258. data/tests/test_aaa_authorization_service.rb +874 -0
  259. data/tests/test_ace.rb +304 -0
  260. data/tests/test_acl.rb +185 -0
  261. data/tests/test_banner.rb +85 -0
  262. data/tests/test_bfd_global.rb +272 -0
  263. data/tests/test_bgp_af.rb +875 -0
  264. data/tests/test_bgp_af_aa.rb +108 -0
  265. data/tests/test_bgp_neighbor.rb +596 -0
  266. data/tests/test_bgp_neighbor_af.rb +781 -0
  267. data/tests/test_bridge_domain.rb +198 -0
  268. data/tests/test_bridge_domain_vni.rb +109 -0
  269. data/tests/test_client_utils.rb +111 -0
  270. data/tests/test_cmn_utils.rb +76 -0
  271. data/tests/test_command_config.rb +206 -0
  272. data/tests/test_command_reference.rb +669 -0
  273. data/tests/test_dhcp_relay_global.rb +286 -0
  274. data/tests/test_dns_domain.rb +123 -0
  275. data/tests/test_domain_name.rb +96 -0
  276. data/tests/test_encapsulation.rb +75 -0
  277. data/tests/test_evpn_multicast.rb +65 -0
  278. data/tests/test_evpn_multisite.rb +70 -0
  279. data/tests/test_evpn_stormcontrol.rb +56 -0
  280. data/tests/test_evpn_vni.rb +131 -0
  281. data/tests/test_fabricpath_global.rb +246 -0
  282. data/tests/test_fabricpath_topology.rb +77 -0
  283. data/tests/test_feature.rb +272 -0
  284. data/tests/test_grpc.rb +166 -0
  285. data/tests/test_hostname.rb +64 -0
  286. data/tests/test_hsrp_global.rb +79 -0
  287. data/tests/test_interface.rb +1958 -0
  288. data/tests/test_interface_bdi.rb +80 -0
  289. data/tests/test_interface_channel_group.rb +131 -0
  290. data/tests/test_interface_evpn_multisite.rb +94 -0
  291. data/tests/test_interface_hsrp.rb +134 -0
  292. data/tests/test_interface_hsrp_group.rb +570 -0
  293. data/tests/test_interface_ospf.rb +820 -0
  294. data/tests/test_interface_portchannel.rb +135 -0
  295. data/tests/test_interface_private_vlan.rb +365 -0
  296. data/tests/test_interface_service_vni.rb +203 -0
  297. data/tests/test_interface_svi.rb +210 -0
  298. data/tests/test_interface_switchport.rb +468 -0
  299. data/tests/test_ip_multicast.rb +80 -0
  300. data/tests/test_itd_device_group.rb +145 -0
  301. data/tests/test_itd_device_group_node.rb +199 -0
  302. data/tests/test_itd_service.rb +314 -0
  303. data/tests/test_logger.rb +43 -0
  304. data/tests/test_name_server.rb +94 -0
  305. data/tests/test_node.rb +50 -0
  306. data/tests/test_node_ext.rb +406 -0
  307. data/tests/test_node_util.rb +119 -0
  308. data/tests/test_ntp_auth_key.rb +77 -0
  309. data/tests/test_ntp_config.rb +100 -0
  310. data/tests/test_ntp_server.rb +146 -0
  311. data/tests/test_nxapi.rb +236 -0
  312. data/tests/test_object_group.rb +122 -0
  313. data/tests/test_overlay_global.rb +108 -0
  314. data/tests/test_pim.rb +203 -0
  315. data/tests/test_pim_group_list.rb +147 -0
  316. data/tests/test_pim_rp_address.rb +155 -0
  317. data/tests/test_platform.rb +254 -0
  318. data/tests/test_portchannel_global.rb +322 -0
  319. data/tests/test_radius_global.rb +108 -0
  320. data/tests/test_radius_server.rb +377 -0
  321. data/tests/test_radius_server_group.rb +151 -0
  322. data/tests/test_route_map.rb +1479 -0
  323. data/tests/test_router_bgp.rb +1325 -0
  324. data/tests/test_router_ospf.rb +56 -0
  325. data/tests/test_router_ospf_area.rb +433 -0
  326. data/tests/test_router_ospf_area_vlink.rb +298 -0
  327. data/tests/test_router_ospf_vrf.rb +690 -0
  328. data/tests/test_snmp_notification_receiver.rb +169 -0
  329. data/tests/test_snmpcommunity.rb +422 -0
  330. data/tests/test_snmpgroup.rb +71 -0
  331. data/tests/test_snmpnotification.rb +91 -0
  332. data/tests/test_snmpserver.rb +251 -0
  333. data/tests/test_snmpuser.rb +666 -0
  334. data/tests/test_span_session.rb +155 -0
  335. data/tests/test_stp_global.rb +575 -0
  336. data/tests/test_syslog_facility.rb +80 -0
  337. data/tests/test_syslog_server.rb +119 -0
  338. data/tests/test_syslog_settings.rb +123 -0
  339. data/tests/test_tacacs_global.rb +109 -0
  340. data/tests/test_tacacs_server.rb +436 -0
  341. data/tests/test_tacacs_server_group.rb +434 -0
  342. data/tests/test_tacacs_server_host.rb +427 -0
  343. data/tests/test_upgrade.rb +105 -0
  344. data/tests/test_vdc.rb +64 -0
  345. data/tests/test_vlan.rb +386 -0
  346. data/tests/test_vlan_private.rb +656 -0
  347. data/tests/test_vpc.rb +548 -0
  348. data/tests/test_vrf.rb +248 -0
  349. data/tests/test_vrf_af.rb +288 -0
  350. data/tests/test_vtp.rb +278 -0
  351. data/tests/test_vxlan_vtep.rb +327 -0
  352. data/tests/test_vxlan_vtep_vni.rb +326 -0
  353. data/tests/test_yang.rb +369 -0
  354. data/tests/test_yum.rb +109 -0
  355. data/tests/upgrade_info.yaml.example +3 -0
  356. data/tests/yum_package.yaml +94 -0
  357. metadata +534 -0
@@ -0,0 +1,235 @@
1
+
2
+ # stp_global
3
+ ---
4
+ _exclude: [ios_xr]
5
+
6
+ _template:
7
+ get_command: "show running-config spanning-tree"
8
+
9
+ bd_designated_priority:
10
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, N9k]
11
+ multiple:
12
+ get_context: ['/^spanning-tree pseudo-information$/']
13
+ get_value: '/^bridge-domain (.*) designated priority (.*)$/'
14
+ set_context: ["spanning-tree pseudo-information"]
15
+ set_value: "<state> bridge-domain <range> designated priority <val>"
16
+ default_value: []
17
+
18
+ bd_forward_time:
19
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, N9k]
20
+ multiple:
21
+ get_value: '/^spanning-tree bridge-domain (.*) forward-time (.*)$/'
22
+ set_value: "<state> spanning-tree bridge-domain <range> forward-time <val>"
23
+ default_value: []
24
+
25
+ bd_hello_time:
26
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, N9k]
27
+ multiple:
28
+ get_value: '/^spanning-tree bridge-domain (.*) hello-time (.*)$/'
29
+ set_value: "<state> spanning-tree bridge-domain <range> hello-time <val>"
30
+ default_value: []
31
+
32
+ bd_max_age:
33
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, N9k]
34
+ multiple:
35
+ get_value: '/^spanning-tree bridge-domain (.*) max-age (.*)$/'
36
+ set_value: "<state> spanning-tree bridge-domain <range> max-age <val>"
37
+ default_value: []
38
+
39
+ bd_priority:
40
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, N9k]
41
+ multiple:
42
+ get_value: '/^spanning-tree bridge-domain (.*) priority (.*)$/'
43
+ set_value: "<state> spanning-tree bridge-domain <range> priority <val>"
44
+ default_value: []
45
+
46
+ bd_range:
47
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, N9k]
48
+ kind: string
49
+ default_only: "2-3967"
50
+
51
+ bd_root_priority:
52
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, N9k]
53
+ multiple:
54
+ get_context: ['/^spanning-tree pseudo-information$/']
55
+ get_value: '/^bridge-domain (.*) root priority (.*)$/'
56
+ set_context: ["spanning-tree pseudo-information"]
57
+ set_value: "<state> bridge-domain <range> root priority <val>"
58
+ default_value: []
59
+
60
+ bpdufilter:
61
+ kind: boolean
62
+ get_value: '/^spanning-tree port type edge bpdufilter default$/'
63
+ set_value: "<state> spanning-tree port type edge bpdufilter default"
64
+ default_value: false
65
+
66
+ bpduguard:
67
+ kind: boolean
68
+ get_value: '/^spanning-tree port type edge bpduguard default$/'
69
+ set_value: "<state> spanning-tree port type edge bpduguard default"
70
+ default_value: false
71
+
72
+ bridge_assurance:
73
+ kind: boolean
74
+ auto_default: false
75
+ get_command: "show running-config spanning-tree all"
76
+ get_value: '/^spanning-tree bridge assurance$/'
77
+ set_value: "<state> spanning-tree bridge assurance"
78
+ default_value: true
79
+
80
+ domain:
81
+ _exclude: [N3k-F, N9k-F]
82
+ os_version: 'N3k, N9k:7.0.3.I6.1'
83
+ kind: int
84
+ get_value: '/^spanning-tree domain (\d+)$/'
85
+ set_value: "<state> spanning-tree domain <domain>"
86
+ default_value: false
87
+
88
+ fcoe:
89
+ _exclude: [N3k, N5k, N6k, N7k]
90
+ kind: boolean
91
+ auto_default: false
92
+ get_command: "show running-config spanning-tree all"
93
+ get_value: '/^spanning-tree fcoe$/'
94
+ set_value: "<state> spanning-tree fcoe"
95
+ default_value: true
96
+
97
+ loopguard:
98
+ kind: boolean
99
+ get_value: '/^spanning-tree loopguard default$/'
100
+ set_value: "<state> spanning-tree loopguard default"
101
+ default_value: false
102
+
103
+ mode:
104
+ kind: string
105
+ get_value: '/^spanning-tree mode (.*)$/'
106
+ set_value: "<state> spanning-tree mode <mode>"
107
+ default_value: "rapid-pvst"
108
+
109
+ mst_designated_priority:
110
+ multiple:
111
+ get_context: ['/^spanning-tree pseudo-information$/']
112
+ get_value: '/^mst (.*) designated priority (.*)$/'
113
+ set_context: ["spanning-tree pseudo-information"]
114
+ set_value: "<state> mst <range> designated priority <val>"
115
+ default_value: []
116
+
117
+ mst_forward_time:
118
+ kind: int
119
+ get_value: '/^spanning-tree mst forward-time (\d+)$/'
120
+ set_value: "<state> spanning-tree mst forward-time <ft>"
121
+ default_value: 15
122
+
123
+ mst_hello_time:
124
+ kind: int
125
+ get_value: '/^spanning-tree mst hello-time (\d+)$/'
126
+ set_value: "<state> spanning-tree mst hello-time <ht>"
127
+ default_value: 2
128
+
129
+ mst_inst_range:
130
+ kind: string
131
+ default_only: "1-4094"
132
+
133
+ mst_inst_vlan_map:
134
+ multiple:
135
+ get_context: ['/^spanning-tree mst configuration$/']
136
+ get_value: '/^instance (.*) vlan (.*)$/'
137
+ set_context: ["spanning-tree mst configuration"]
138
+ set_value: "<state> instance <instance> <vlan> <range>"
139
+ default_value: []
140
+
141
+ mst_max_age:
142
+ kind: int
143
+ get_value: '/^spanning-tree mst max-age (\d+)$/'
144
+ set_value: "<state> spanning-tree mst max-age <ma>"
145
+ default_value: 20
146
+
147
+ mst_max_hops:
148
+ kind: int
149
+ get_value: '/^spanning-tree mst max-hops (\d+)$/'
150
+ set_value: "<state> spanning-tree mst max-hops <mh>"
151
+ default_value: 20
152
+
153
+ mst_name:
154
+ kind: string
155
+ get_context: ['/^spanning-tree mst configuration$/']
156
+ get_value: '/^name (.*)$/'
157
+ set_context: ["spanning-tree mst configuration"]
158
+ set_value: "<state> name <name>"
159
+ default_value: false
160
+
161
+ mst_priority:
162
+ multiple:
163
+ get_value: '/^spanning-tree mst (.*) priority (.*)$/'
164
+ set_value: "<state> spanning-tree mst <range> priority <val>"
165
+ default_value: []
166
+
167
+ mst_range:
168
+ kind: string
169
+ default_only: "0-4094"
170
+
171
+ mst_revision:
172
+ kind: int
173
+ get_context: ['/^spanning-tree mst configuration$/']
174
+ get_value: '/^revision (\d+)$/'
175
+ set_context: ["spanning-tree mst configuration"]
176
+ set_value: "<state> revision <rev>"
177
+ default_value: 0
178
+
179
+ mst_root_priority:
180
+ multiple:
181
+ get_context: ['/^spanning-tree pseudo-information$/']
182
+ get_value: '/^mst (.*) root priority (.*)$/'
183
+ set_context: ["spanning-tree pseudo-information"]
184
+ set_value: "<state> mst <range> root priority <val>"
185
+ default_value: []
186
+
187
+ pathcost:
188
+ kind: string
189
+ get_value: '/^spanning-tree pathcost method (.*)$/'
190
+ set_value: "<state> spanning-tree pathcost method <method>"
191
+ default_value: "short"
192
+
193
+ vlan_designated_priority:
194
+ multiple:
195
+ get_context: ['/^spanning-tree pseudo-information$/']
196
+ get_value: '/^vlan (.*) designated priority (.*)$/'
197
+ set_context: ["spanning-tree pseudo-information"]
198
+ set_value: "<state> vlan <range> designated priority <val>"
199
+ default_value: []
200
+
201
+ vlan_forward_time:
202
+ multiple:
203
+ get_value: '/^spanning-tree vlan (.*) forward-time (.*)$/'
204
+ set_value: "<state> spanning-tree vlan <range> forward-time <val>"
205
+ default_value: []
206
+
207
+ vlan_hello_time:
208
+ multiple:
209
+ get_value: '/^spanning-tree vlan (.*) hello-time (.*)$/'
210
+ set_value: "<state> spanning-tree vlan <range> hello-time <val>"
211
+ default_value: []
212
+
213
+ vlan_max_age:
214
+ multiple:
215
+ get_value: '/^spanning-tree vlan (.*) max-age (.*)$/'
216
+ set_value: "<state> spanning-tree vlan <range> max-age <val>"
217
+ default_value: []
218
+
219
+ vlan_priority:
220
+ multiple:
221
+ get_value: '/^spanning-tree vlan (.*) priority (.*)$/'
222
+ set_value: "<state> spanning-tree vlan <range> priority <val>"
223
+ default_value: []
224
+
225
+ vlan_range:
226
+ kind: string
227
+ default_only: "1-3967"
228
+
229
+ vlan_root_priority:
230
+ multiple:
231
+ get_context: ['/^spanning-tree pseudo-information$/']
232
+ get_value: '/^vlan (.*) root priority (.*)$/'
233
+ set_context: ["spanning-tree pseudo-information"]
234
+ set_value: "<state> vlan <range> root priority <val>"
235
+ default_value: []
@@ -0,0 +1,10 @@
1
+ # syslog_facility
2
+ ---
3
+ _exclude: [ios_xr]
4
+
5
+ facility:
6
+ multiple: true
7
+ get_command: "show running-config | include '^logging level'"
8
+ # Returns <facility>, <level>
9
+ get_value: '/^(?:logging level)\s+(.*)\s+([0-7])/'
10
+ set_value: '<state> logging level <facility> <level>'
@@ -0,0 +1,34 @@
1
+ # syslog_server
2
+ ---
3
+ level:
4
+ default_value: ~
5
+ nexus:
6
+ kind: int
7
+ get_command: "show running-config all | include '^logging server'"
8
+ get_value: '/^logging server %s (\d).*/'
9
+ ios_xr:
10
+ multiple: true
11
+ get_command: "show running-config logging"
12
+ get_value: '/^logging %s.* severity (\S+)/'
13
+
14
+ server:
15
+ multiple: true
16
+ nexus:
17
+ get_command: "show running-config all | include '^logging server'"
18
+ # Returns <ip>, <level>, <port>, <vrf>, <facility>
19
+ get_value: '/^(?:logging server )([^\s]+)(?: (\d+))?(?: port (\d+))?(?: use-vrf (\S+))?(?: facility (\S+))?/'
20
+ set_value: '<state> logging server <ip> <level> <port> <vrf> <facility>'
21
+ ios_xr:
22
+ get_command: "show running-config logging"
23
+ get_value: '/^logging (\S+).*/'
24
+ set_value: '<state> logging <ip> <vrf> <level>'
25
+
26
+ vrf:
27
+ default_value: default
28
+ nexus:
29
+ get_command: "show running-config all | include '^logging server(.*)(use-vrf)'"
30
+ get_value: '/^logging server %s.* use-vrf (.*)$/'
31
+ ios_xr:
32
+ multiple: true
33
+ get_command: "show running-config logging"
34
+ get_value: '/^logging %s.* vrf (\S+)/'
@@ -0,0 +1,45 @@
1
+ # syslog_settings
2
+ ---
3
+ _exclude: [ios_xr]
4
+
5
+ console:
6
+ default_value: 2
7
+ get_command: "show running-config all | include 'logging'"
8
+ # Returns <state> and <severity>
9
+ get_value: '/^(no)?\s*logging console\s*(\d)?/'
10
+ set_value: '<state> logging console <severity>'
11
+
12
+ logfile_name:
13
+ get_command: "show running-config all | include 'logging'"
14
+ # Returns <state> and <name>
15
+ get_value: '/^(no)?\s*logging logfile\s(\S*)\s*?/'
16
+ set_value: '<state> logging logfile <logname> <severity> <size>'
17
+
18
+ logfile_severity_level:
19
+ get_command: "show running-config all | include 'logging'"
20
+ # Returns <state> and <severity>
21
+ get_value: '/^(no)?\s*logging logfile\s\S*\s*(\d)?/'
22
+
23
+ logfile_size:
24
+ get_command: "show running-config all | include 'logging'"
25
+ # Returns <state> and <size>
26
+ get_value: '/^(no)?\s*logging logfile.*size\s(\d*)/'
27
+
28
+ monitor:
29
+ default_value: 5
30
+ get_command: "show running-config all | include 'logging'"
31
+ # Returns <state> and <severity>
32
+ get_value: '/^(no)?\s*logging monitor\s*(\d)?/'
33
+ set_value: '<state> logging monitor <severity>'
34
+
35
+ source_interface:
36
+ default_value: ~
37
+ get_command: "show running-config all | include 'logging'"
38
+ get_value: '/^logging source-interface\s+(.*)$/'
39
+ set_value: '<state> logging source-interface <source_interface>'
40
+
41
+ timestamp:
42
+ get_command: "show running-config all | include 'logging'"
43
+ get_value: '/^logging timestamp (.*)$/'
44
+ set_value: '<state> logging timestamp <units>'
45
+ default_value: 'seconds'
@@ -0,0 +1,7 @@
1
+ # system
2
+ ---
3
+ resources:
4
+ # grpc doesn't allow this command
5
+ # get_command: 'monitor threads iteration 1'
6
+ _exclude: [ios_xr]
7
+ get_command: "show system resources"
@@ -0,0 +1,37 @@
1
+ # tacacs_global.yaml
2
+ ---
3
+ encryption:
4
+ set_value: "<state> tacacs-server key <option> <key>"
5
+
6
+ key:
7
+ get_value: '/^tacacs-server key (\d+)\s+(.*)/'
8
+ default_value: ""
9
+ nexus:
10
+ get_command: "show run tacacs all"
11
+ ios_xr:
12
+ get_command: "show running-config tacacs-server"
13
+
14
+ key_format:
15
+ get_value: '/^tacacs-server key (\d+)\s+(\S+)/'
16
+ default_value: 0
17
+ nexus:
18
+ get_command: "show run tacacs all"
19
+ ios_xr:
20
+ get_command: "show running-config tacacs-server"
21
+
22
+ source_interface:
23
+ default_value: ~
24
+ get_value: '/^ip tacacs source-interface\s+(.*)$/'
25
+ set_value: '<state> ip tacacs source-interface <source_interface>'
26
+ nexus:
27
+ get_command: "show running-config all | include '^ip tacacs source-interface'"
28
+
29
+ timeout:
30
+ kind: int
31
+ get_value: '/tacacs-server timeout\s+(\d+)/'
32
+ set_value: "<state> tacacs-server timeout <timeout>"
33
+ default_value: 5
34
+ nexus:
35
+ get_command: "show run tacacs all"
36
+ ios_xr:
37
+ get_command: "show running-config tacacs-server"
@@ -0,0 +1,63 @@
1
+ # tacacs_server
2
+ ---
3
+
4
+ deadtime:
5
+ _exclude: [ios_xr]
6
+ kind: int
7
+ get_command: "show run tacacs all"
8
+ get_value: '/^tacacs-server deadtime\s+(\d+)/'
9
+ set_value: "%s tacacs-server deadtime %d"
10
+ default_value: 0
11
+
12
+ directed_request:
13
+ _exclude: [ios_xr]
14
+ kind: boolean
15
+ # oddly, directed request must be retrieved from aaa output
16
+ get_command: "show running aaa all"
17
+ get_value: '/(?:no)?\s*tacacs-server directed-request/'
18
+ set_value: "%s tacacs-server directed-request"
19
+ default_value: false
20
+
21
+ encryption:
22
+ set_value: "<state> tacacs-server key <option> <key>"
23
+
24
+ encryption_password:
25
+ get_value: '/^tacacs-server key (\d+)\s+(.*)/'
26
+ default_value: ""
27
+ nexus:
28
+ get_command: "show run tacacs all"
29
+ ios_xr:
30
+ get_command: "show running-config tacacs-server"
31
+
32
+ encryption_type:
33
+ auto_default: false
34
+ get_value: '/^tacacs-server key (\d+)\s+(\S+)/'
35
+ default_value: 0
36
+ nexus:
37
+ get_command: "show run tacacs all"
38
+ ios_xr:
39
+ get_command: "show running-config tacacs-server"
40
+
41
+ feature:
42
+ _exclude: [ios_xr]
43
+ kind: boolean
44
+ get_command: "show run tacacs all"
45
+ get_value: '/^feature tacacs/'
46
+ set_value: "%s feature tacacs+"
47
+
48
+ source_interface:
49
+ _exclude: [ios_xr]
50
+ get_command: "show run tacacs all"
51
+ get_value: '/(no)?\s*ip tacacs source-interface\s+(\S+)?/'
52
+ set_value: "%s ip tacacs source-interface %s"
53
+ default_value: ""
54
+
55
+ timeout:
56
+ kind: int
57
+ get_value: '/tacacs-server timeout\s+(\d+)/'
58
+ set_value: "<state> tacacs-server timeout <timeout>"
59
+ default_value: 5
60
+ nexus:
61
+ get_command: "show run tacacs all"
62
+ ios_xr:
63
+ get_command: "show running-config tacacs-server"
@@ -0,0 +1,45 @@
1
+ # tacacs_server_group
2
+ ---
3
+ _template:
4
+ nexus:
5
+ get_command: "show run tacacs all"
6
+ ios_xr:
7
+ get_command: "show running-config aaa"
8
+
9
+ deadtime:
10
+ _exclude: [ios_xr]
11
+ get_context: ['/^aaa group server tacacs\+ %s/']
12
+ get_value: '/^deadtime (\d+)/'
13
+ set_context: ["aaa group server tacacs <name>"]
14
+ set_value: "<state> deadtime <deadtime>"
15
+ default_value: 0
16
+
17
+ group:
18
+ multiple: true
19
+ get_value: '/^aaa group server tacacs\+ (\S+)/'
20
+ set_value: '<state> aaa group server tacacs <name>'
21
+ default_value: []
22
+
23
+ servers:
24
+ multiple: true
25
+ get_context: ['/^aaa group server tacacs\+ %s/']
26
+ get_value: '/^server (\S+)/'
27
+ set_context: ["aaa group server tacacs <name>"]
28
+ set_value: '<state> server <server>'
29
+ default_value: []
30
+
31
+ source_interface:
32
+ _exclude: [ios_xr]
33
+ get_context: ['/^aaa group server tacacs\+ %s/']
34
+ get_value: '/^source-interface (\S+)/'
35
+ set_context: ["aaa group server tacacs <name>"]
36
+ set_value: "<state> source-interface <interface>"
37
+ default_value: ""
38
+
39
+ vrf:
40
+ _exclude: [ios_xr]
41
+ get_context: ['/^aaa group server tacacs\+ %s/']
42
+ get_value: '/^use-vrf (\S+)/'
43
+ set_context: ["aaa group server tacacs <name>"]
44
+ set_value: "<state> use-vrf <vrf>"
45
+ default_value: "default"
@@ -0,0 +1,64 @@
1
+ # tacacs_server_host
2
+ ---
3
+ _template:
4
+ nexus:
5
+ get_command: "show run tacacs all"
6
+ ios_xr:
7
+ get_command: "show running-config tacacs-server"
8
+
9
+ encryption:
10
+ nexus:
11
+ set_value: "<state> tacacs-server host <ip> key <enc_type> <password>"
12
+ ios_xr:
13
+ context: ["tacacs-server host <ip> port <port>"]
14
+ set_value: '<state> key <enc_type> <password>'
15
+
16
+ encryption_password:
17
+ default_value: ""
18
+ nexus:
19
+ get_value: '/^tacacs-server host <ip> key \d+\s+(.*)/'
20
+ ios_xr:
21
+ context: ["tacacs-server host <ip> port <port>"]
22
+ get_value: '/key \d+\s+(\S+)$/'
23
+
24
+ encryption_type:
25
+ nexus:
26
+ get_value: '/^tacacs-server host <ip> key (\d+)/'
27
+ ios_xr:
28
+ context: ["tacacs-server host <ip> port <port>"]
29
+ get_value: '/key (\d+)/'
30
+
31
+ host:
32
+ nexus:
33
+ set_value: "<state> tacacs-server host <ip>"
34
+ ios_xr:
35
+ set_value: "<state> tacacs-server host <ip> port <port>"
36
+
37
+ host_port_pairs:
38
+ _exclude: [nexus]
39
+ multiple: true
40
+ get_command: "show running-config tacacs-server"
41
+ get_value: '/^tacacs-server host <ip> port (\d+)/'
42
+ default_value: ''
43
+
44
+ hosts:
45
+ multiple: true
46
+ get_value: '/^tacacs-server host (\S+)/'
47
+
48
+ port:
49
+ default_value: 49
50
+ kind: int
51
+ get_value: '/^tacacs-server host <ip>\s.*port (\d+).*$/'
52
+ nexus:
53
+ set_value: "tacacs-server host <ip> port <port>"
54
+
55
+ timeout:
56
+ default_value: 0
57
+ kind: int
58
+ nexus:
59
+ get_value: '/^tacacs-server host <ip>\s.*timeout (\d+)/'
60
+ set_value: "<state> tacacs-server host <ip> timeout <timeout>"
61
+ ios_xr:
62
+ context: ["tacacs-server host <ip> port <port>"]
63
+ get_value: '/timeout (\d+).*$/'
64
+ set_value: '<state> timeout <timeout>'
@@ -0,0 +1,38 @@
1
+ # upgrade
2
+ ---
3
+ _exclude: [ios_xr, N5k, N6k, N7k]
4
+
5
+ clear_status:
6
+ set_value: "clear install status"
7
+
8
+ delete:
9
+ set_context: ['terminal dont-ask']
10
+ set_value: "delete <uri><image>"
11
+
12
+ delete_boot:
13
+ set_context: ['terminal dont-ask', 'allow delete boot-image']
14
+ set_value: "delete <uri><image>"
15
+
16
+ image_version:
17
+ get_command: "show version image <uri><image>"
18
+ get_value: '/NXOS:\s+version\s(\S+)/'
19
+
20
+ is_box_online:
21
+ set_context: ['conf t']
22
+ set_value: "sh clock"
23
+
24
+ save_config:
25
+ set_value: "copy running-config startup-config"
26
+
27
+ upgrade:
28
+ set_context: ['terminal dont-ask']
29
+ set_value: "install all nxos <uri><image>"
30
+
31
+ upgrade_force:
32
+ set_context: ['terminal dont-ask']
33
+ set_value: "install force-all nxos <uri><image>"
34
+
35
+ upgraded:
36
+ kind: boolean
37
+ get_command: 'show install all status'
38
+ get_value: '/Finishing the upgrade, switch will reboot|Install has been successful/'
@@ -0,0 +1,52 @@
1
+ # vdc
2
+ #
3
+ # The current simplified implementation assumes no admin-vdc and that the
4
+ # default vdc name uses id 1. Full multi-vdc support is TBD.
5
+ ---
6
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, N9k, ios_xr]
7
+
8
+ _template:
9
+ get_command: 'show run vdc all'
10
+ get_context: ['/^vdc <vdc>/']
11
+ set_context: ['terminal dont-ask', 'vdc <vdc>']
12
+
13
+ all_vdcs:
14
+ multiple:
15
+ get_command: 'show run vdc all'
16
+ get_context: ~
17
+ get_value: '/^vdc (\S+) id/'
18
+
19
+ allocate_interface:
20
+ get_value: '/^allocate interface (.*)/'
21
+ default_value: ~
22
+
23
+ allocate_interface_unallocated:
24
+ kind: boolean
25
+ set_value: 'allocate interface unallocated-interfaces'
26
+
27
+ default_vdc_name:
28
+ # Name of the default vdc. Assumes no admin-vdc.
29
+ get_context: ~
30
+ get_value: '/^vdc (\S+) id 1$/' # Assumes id 1 for default vdc
31
+
32
+ limit_resource_module_type:
33
+ get_value: '/^limit-resource module-type (.*)/'
34
+ set_value: '<state> limit-resource module-type <mods>'
35
+ default_value: ''
36
+
37
+ membership:
38
+ multiple:
39
+ get_command: 'show vdc membership'
40
+ get_context: ['/^vdc_id: \d+ vdc_name: <vdc> interfaces:$/']
41
+ get_value: '/(Ethernet\d+\/\d+)/'
42
+ set_value: 'allocate interface <intf>'
43
+ default_value: []
44
+
45
+ vdc_support:
46
+ # This is a only used for determining support for VDCs
47
+ kind: boolean
48
+ N7k:
49
+ default_only: true
50
+ else:
51
+ # this feature is always off on these platforms and cannot be changed
52
+ default_only: false
@@ -0,0 +1,8 @@
1
+ # virtual_service
2
+ ---
3
+ services:
4
+ _exclude: [ios_xr]
5
+ multiple: true
6
+ get_data_format: nxapi_structured
7
+ get_command: 'show virtual-service detail'
8
+ get_context: ["TABLE_detail", "ROW_detail"]