cisco_node_utils_mgx 2.1.0.1

Sign up to get free protection for your applications and to get access to all the features.
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,45 @@
1
+ # interface_channel_group
2
+ ---
3
+ _template:
4
+ context: ['interface <name>']
5
+ ios_xr:
6
+ get_command: "show running interface"
7
+ nexus:
8
+ get_command: "show running interface <show_name> all"
9
+ N7k:
10
+ get_command: "show running interface all | section '^interface <show_name>'"
11
+
12
+
13
+ all_interfaces:
14
+ multiple:
15
+ get_context: ~
16
+ get_value: '/^interface (Ethernet.*)/i'
17
+
18
+ channel_group:
19
+ default_value: false
20
+ nexus:
21
+ get_value: '/^channel-group (\d+)(?:\s+mode\s+(\S+))?$/'
22
+ set_value: '<state> channel-group <group> <force> <mode> <val>'
23
+ ios_xr:
24
+ kind: int
25
+ get_value: '/^bundle id (\d+).*$/'
26
+ set_value: '<state> bundle id <group>'
27
+
28
+ channel_group_mode:
29
+ _exclude: [ios_xr]
30
+ default_value: false
31
+
32
+ description:
33
+ kind: string
34
+ get_value: '/^description (.*)/'
35
+ set_value: '<state> description <desc>'
36
+ default_value: ''
37
+
38
+ shutdown:
39
+ kind: boolean
40
+ get_value: '/^(?:no )?shutdown$/'
41
+ set_value: '<state> shutdown'
42
+ nexus:
43
+ default_value: true
44
+ ios_xr:
45
+ default_value: false
@@ -0,0 +1,17 @@
1
+ # interface_evpn_multisite
2
+ ---
3
+ _exclude: [ios_xr, N3k, N3k-F, N5k, N6k, N7k, N9k-F]
4
+
5
+ _template:
6
+ get_command: "show running interface <show_name> all"
7
+ context:
8
+ - "interface <interface>"
9
+
10
+ all_interfaces:
11
+ multiple:
12
+ get_context: ~
13
+ get_value: '/^interface (.*)/'
14
+
15
+ evpn_multisite:
16
+ get_value: '/^evpn multisite (\S+)$/'
17
+ set_value: "<state> evpn multisite <tracking>"
@@ -0,0 +1,120 @@
1
+ # interface_hsrp_group
2
+ ---
3
+ _exclude: [ios_xr, N5k, N6k]
4
+
5
+ _template:
6
+ get_command: "show running hsrp"
7
+ context:
8
+ - "interface <name>"
9
+ - "hsrp <group> <iptype>"
10
+
11
+ all_hsrp:
12
+ get_context: ~
13
+
14
+ authentication:
15
+ get_value: '/^authentication (.*)$/'
16
+ set_value: '<state> authentication <authtype> <keytype> <enctype> <passwd> <compatible> <timeout> <tval>'
17
+
18
+ authentication_auth_type:
19
+ default_value: 'cleartext'
20
+
21
+ authentication_compatibility:
22
+ kind: boolean
23
+ default_value: false
24
+
25
+ authentication_enc_type:
26
+ default_value: '0'
27
+
28
+ authentication_key_type:
29
+ default_value: ~
30
+
31
+ authentication_string:
32
+ default_value: ~
33
+
34
+ authentication_timeout:
35
+ kind: int
36
+ default_value: ~
37
+
38
+ group_name:
39
+ get_value: '/^name (\S+)/'
40
+ set_value: '<state> name <word>'
41
+ default_value: false
42
+
43
+ groups:
44
+ multiple: true
45
+ context:
46
+ - "interface <name>"
47
+ get_value: '/^hsrp (\d+)(?:\s+(ipv6))?/'
48
+ set_value: '<state> hsrp <group> <iptype>'
49
+
50
+ ipv4_enable:
51
+ default_value: false
52
+
53
+ ipv4_vip:
54
+ # the config can be 'ip' or 'ip <vip>' or
55
+ # no ipv4 config at all so need to grab the
56
+ # optional match to get the whole config
57
+ get_value: '/^ip(?:\s+\S+)?$/'
58
+ set_value: '<state> ip <vip>'
59
+ default_value: ''
60
+
61
+ ipv6_autoconfig:
62
+ kind: boolean
63
+ get_value: '/^ip autoconfig$/'
64
+ set_value: '<state> ip autoconfig'
65
+ default_value: false
66
+
67
+ ipv6_vip:
68
+ multiple: true
69
+ get_value: '/^ip (\S+)$/'
70
+ set_value: '<state> ip <vip>'
71
+ default_value: []
72
+
73
+ mac_addr:
74
+ get_value: '/^mac-address (\S+)$/'
75
+ set_value: '<state> mac-address <mac>'
76
+ default_value: false
77
+
78
+ preempt:
79
+ get_command: "show running hsrp all"
80
+ get_value: '/^preempt delay minimum (\d+) reload (\d+) sync (\d+)/'
81
+ set_value: '<state> preempt <delay> <minimum> <minval> <reload> <relval> <sync> <syncval>'
82
+ default_value: false
83
+
84
+ preempt_delay_minimum:
85
+ default_value: 0
86
+
87
+ preempt_delay_reload:
88
+ default_value: 0
89
+
90
+ preempt_delay_sync:
91
+ default_value: 0
92
+
93
+ priority:
94
+ default_value: 100
95
+
96
+ priority_forward_thresh_lower:
97
+ default_value: ''
98
+
99
+ priority_forward_thresh_upper:
100
+ default_value: ''
101
+
102
+ priority_level:
103
+ get_value: '/^priority (\d+)(?:\s+(?:forwarding-threshold lower)\s+(\d+)\s+(?:upper)\s+(\d+))?$/'
104
+ set_value: '<state> priority <pri> <forward> <lval> <upper> <uval>'
105
+
106
+ timers:
107
+ get_value: '/^timers (.*)$/'
108
+ set_value: '<state> timers <mshello> <hello> <mshold> <hold>'
109
+
110
+ timers_hello:
111
+ default_value: 3
112
+
113
+ timers_hello_msec:
114
+ default_value: false
115
+
116
+ timers_hold:
117
+ default_value: 10
118
+
119
+ timers_hold_msec:
120
+ default_value: false
@@ -0,0 +1,112 @@
1
+ # interface_ospf
2
+ ---
3
+ _exclude: [ios_xr]
4
+
5
+ _template:
6
+ context: ['interface <name>']
7
+ get_command: 'show running interface <show_name> all'
8
+ N7k:
9
+ get_command: "show running interface all | section '^interface <show_name>'"
10
+
11
+ all_interfaces:
12
+ multiple:
13
+ get_context: ~
14
+ get_value: '/^interface (.*)/'
15
+
16
+ area:
17
+ get_value: '/^\s*ip router ospf (\S+) area (\S+)/'
18
+ set_value: '<state> ip router ospf <ospf_name> area <area>'
19
+
20
+ bfd:
21
+ # the config can be 'ip ospf bfd' or
22
+ # 'ip ospf bfd disable' or
23
+ # no config at all so need to grab the optional
24
+ # match to get the whole config for checking
25
+ # the mode
26
+ get_value: '/^\s*ip ospf bfd *(?:\S*)$/'
27
+ set_value: '<state> ip ospf bfd <disable>'
28
+ default_value: ~
29
+
30
+ cost:
31
+ kind: int
32
+ get_value: '/^\s*ip ospf cost (\d+)/'
33
+ set_value: '<state> ip ospf cost <cost>'
34
+ default_value: 0
35
+
36
+ dead_interval:
37
+ kind: int
38
+ get_value: '/^\s*ip ospf dead-interval (\d+)/'
39
+ set_value: '<state> ip ospf dead-interval <interval>'
40
+ default_value: 40
41
+
42
+ hello_interval:
43
+ kind: int
44
+ get_value: '/^\s*ip ospf hello-interval (\d+)/'
45
+ set_value: '<state> ip ospf hello-interval <interval>'
46
+ default_value: 10
47
+
48
+ message_digest:
49
+ kind: boolean
50
+ get_value: '/^\s*ip ospf authentication message-digest/'
51
+ set_value: '<state> ip ospf authentication message-digest'
52
+ default_value: false
53
+
54
+ message_digest_alg_type:
55
+ get_value: '/^\s*ip ospf message-digest-key \d+ (\S+)/'
56
+ default_value: 'md5'
57
+
58
+ message_digest_enc_type:
59
+ get_value: '/^\s*ip ospf message-digest-key \d+ \S+ (\d+)/'
60
+ default_value: '0'
61
+
62
+ message_digest_key_id:
63
+ kind: int
64
+ get_value: '/^\s*ip ospf message-digest-key (\d+)/'
65
+ default_value: 0
66
+
67
+ message_digest_key_set:
68
+ set_value: '<state> ip ospf message-digest-key <keyid> <algtype> <enctype> <password>'
69
+
70
+ message_digest_password:
71
+ default_value: ~
72
+ get_value: '/^\s*ip ospf message-digest-key \d+ \S+ \d+ (\S+)/'
73
+
74
+ mtu_ignore:
75
+ kind: boolean
76
+ get_value: '/^\s*ip ospf mtu-ignore/'
77
+ set_value: '<state> ip ospf mtu-ignore'
78
+ default_value: false
79
+
80
+ network_type:
81
+ get_value: '/^\s*ip ospf network (\S+)$/'
82
+ set_value: '<state> ip ospf network <network_type>'
83
+
84
+ network_type_default:
85
+ default_value: 'broadcast'
86
+
87
+ network_type_loopback_default:
88
+ default_value: 'loopback'
89
+
90
+ passive_interface:
91
+ kind: boolean
92
+ get_value: '/^\s*ip ospf passive-interface/'
93
+ set_value: '<state> ip ospf passive-interface'
94
+ default_value: false
95
+
96
+ priority:
97
+ kind: int
98
+ get_value: '/^\s*ip ospf priority (\d+)/'
99
+ set_value: '<state> ip ospf priority <priority>'
100
+ default_value: 1
101
+
102
+ shutdown:
103
+ kind: boolean
104
+ get_value: '/^\s*ip ospf shutdown/'
105
+ set_value: '<state> ip ospf shutdown'
106
+ default_value: false
107
+
108
+ transmit_delay:
109
+ kind: int
110
+ get_value: '/^\s*ip ospf transmit-delay (\d+)/'
111
+ set_value: '<state> ip ospf transmit-delay <delay>'
112
+ default_value: 1
@@ -0,0 +1,87 @@
1
+ # interface_portchannel
2
+ ---
3
+ _exclude: [ios_xr]
4
+
5
+ _template:
6
+ get_command: "show running interface all"
7
+ get_context: ['/^interface %s$/i']
8
+ set_context: ["interface %s"]
9
+
10
+ all_interfaces:
11
+ multiple:
12
+ get_context: ~
13
+ get_value: '/^interface (.*)/'
14
+
15
+ bfd_per_link:
16
+ kind: boolean
17
+ get_value: '/^bfd per-link$/'
18
+ set_value: "%s bfd per-link"
19
+ default_value: false
20
+
21
+ create:
22
+ set_context: ~
23
+ set_value: "interface %s"
24
+
25
+ destroy:
26
+ set_context: ~
27
+ set_value: "no interface %s"
28
+
29
+ lacp_graceful_convergence:
30
+ kind: boolean
31
+ auto_default: false
32
+ get_value: '/^lacp graceful.convergence$/'
33
+ set_value: "%s lacp graceful-convergence"
34
+ default_value: true
35
+
36
+ lacp_max_bundle:
37
+ kind: int
38
+ get_value: '/^lacp max.bundle (\d+)$/'
39
+ set_value: "lacp max-bundle %s"
40
+ N3k: &lacp_max_bundle_32
41
+ default_value: 32
42
+ N5k: &lacp_max_bundle_16
43
+ default_value: 16
44
+ N6k: *lacp_max_bundle_16
45
+ N7k: *lacp_max_bundle_16
46
+ N3k-F: *lacp_max_bundle_32
47
+ N9k-F: *lacp_max_bundle_32
48
+ N9k: *lacp_max_bundle_32
49
+
50
+ lacp_min_links:
51
+ kind: int
52
+ get_value: '/^lacp min.links (\d+)$/'
53
+ set_value: "lacp min-links %s"
54
+ default_value: 1
55
+
56
+ lacp_suspend_individual:
57
+ kind: boolean
58
+ get_value: '/^lacp suspend.individual$/'
59
+ set_value: "%s lacp suspend-individual"
60
+ N3k:
61
+ default_value: false
62
+ else:
63
+ auto_default: false
64
+ default_value: true
65
+
66
+ lacp_suspend_shut_needed:
67
+ # This is used to determine if the port-channel interface
68
+ # must be shutdown before setting lacp_suspend_individual
69
+ kind: boolean
70
+ N9k:
71
+ default_only: true
72
+ else:
73
+ default_only: false
74
+
75
+ port_hash_distribution:
76
+ _exclude: [N6k, N5k]
77
+ set_context: ['terminal dont-ask', "interface %s"]
78
+ get_value: '/^port-channel port hash.distribution (.*)$/'
79
+ set_value: "%s port-channel port hash-distribution %s"
80
+ default_value: false
81
+
82
+ port_load_defer:
83
+ _exclude: [N6k, N5k]
84
+ kind: boolean
85
+ get_value: '/^port-channel port load.defer$/'
86
+ set_value: "%s port-channel port load-defer"
87
+ default_value: false
@@ -0,0 +1,42 @@
1
+ # interface_service_vni
2
+ ---
3
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, N9k, ios_xr]
4
+
5
+ _template:
6
+ get_command: 'show running interface all'
7
+ get_context:
8
+ - '/^interface <name>$/i'
9
+ - '/^service instance <sid> vni$/'
10
+ set_context:
11
+ - 'interface <name>'
12
+ - 'service instance <sid> vni'
13
+
14
+ all_interfaces:
15
+ multiple:
16
+ get_context: ~
17
+ get_value: '/^interface (.*)/'
18
+
19
+ all_service_vni_ids:
20
+ multiple:
21
+ get_context:
22
+ - '/^interface <name>$/i'
23
+ get_value: '/^service instance (\d+) vni/'
24
+
25
+ create_destroy:
26
+ set_context:
27
+ - 'interface <name>'
28
+ set_value: '<state> service instance <sid> vni'
29
+
30
+ encapsulation_profile_vni:
31
+ get_value: '/encapsulation profile (\S+) default/'
32
+ set_value: '<state> encapsulation profile <profile> default'
33
+ default_value: ''
34
+
35
+ shutdown:
36
+ N7k:
37
+ kind: boolean
38
+ get_value: '/^(?:no )?shutdown$/'
39
+ set_value: "<state> shutdown"
40
+ default_value: true
41
+ else:
42
+ default_value: false
@@ -0,0 +1,45 @@
1
+ # inventory
2
+ ---
3
+ _template:
4
+ get_command: 'show inventory'
5
+ ios_xr:
6
+ data_format: cli
7
+ nexus:
8
+ data_format: nxapi_structured
9
+ get_context: ["TABLE_inv", "ROW_inv"]
10
+
11
+ all:
12
+ multiple: true
13
+
14
+ chassis:
15
+ nexus:
16
+ # Get all the inventory and we'll filter it down to the chassis
17
+ multiple: true
18
+ get_context: ["TABLE_inv", "ROW_inv"]
19
+
20
+ productid:
21
+ ios_xr:
22
+ get_value: '/"Rack 0".*\n.*PID: ([^ ,]+)/'
23
+ nexus:
24
+ get_value: ["name \"Chassis\"", "productid"]
25
+ N5k: &productid5k
26
+ get_value: ["name Chassis", "productid"]
27
+ N6k: *productid5k
28
+
29
+ serialnum:
30
+ ios_xr:
31
+ get_value: '/"Rack 0".*\n.*SN: ([^ ,]+)/'
32
+ nexus:
33
+ get_value: ["name \"Chassis\"", "serialnum"]
34
+ N5k: &serialnum5k
35
+ get_value: ["name Chassis", "serialnum"]
36
+ N6k: *serialnum5k
37
+
38
+ versionid:
39
+ ios_xr:
40
+ get_value: '/"Rack 0".*\n.*VID: ([^ ,]+)/'
41
+ nexus:
42
+ get_value: ["name \"Chassis\"", "vendorid"]
43
+ N5k: &vendorid5k
44
+ get_value: ["name Chassis", "vendorid"]
45
+ N6k: *vendorid5k
@@ -0,0 +1,22 @@
1
+ # ip_multicast.yaml
2
+ ---
3
+ _exclude: [ios_xr, N3k, N3k-F, N5k, N6k, N7k, N9k-F]
4
+
5
+ _template:
6
+ get_command: "show running-config | section 'ip multicast'"
7
+
8
+ overlay_distributed_dr:
9
+ context: ~
10
+ kind: boolean
11
+ get_value: '^ip multicast overlay-distributed-dr$'
12
+ set_value: "<state> ip multicast overlay-distributed-dr"
13
+ default_value: false
14
+
15
+ overlay_spt_only:
16
+ context: ~
17
+ kind: boolean
18
+ auto_default: false
19
+ get_command: "show fabric multicast globals"
20
+ get_value: '^Overlay spt-only:\s+TRUE$'
21
+ set_value: "<state> ip multicast overlay-spt-only"
22
+ default_value: true
@@ -0,0 +1,83 @@
1
+ # itd_device_group
2
+ ---
3
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, ios_xr]
4
+
5
+ _template:
6
+ get_command: "show running-config all | section itd"
7
+ get_context:
8
+ - '/^itd device-group <name>/'
9
+ - '(?)/^node <ntype> <nname>/'
10
+ set_context: ["itd device-group <name>", "(?)node <ntype> <nname>"]
11
+
12
+ all_itd_device_group_nodes:
13
+ multiple:
14
+ get_context: ['/^itd device-group <name>/']
15
+ get_value: '/^node (\S+) (\S+)/'
16
+
17
+ all_itd_device_groups:
18
+ multiple:
19
+ get_context: ~
20
+ get_value: '/^itd device-group (\S+)/'
21
+
22
+ create:
23
+ set_context: ~
24
+ set_value: "itd device-group <name>"
25
+
26
+ create_node:
27
+ set_context: ["itd device-group <name>"]
28
+ set_value: "node <ntype> <nname>"
29
+
30
+ destroy:
31
+ set_context: ~
32
+ set_value: "no itd device-group <name>"
33
+
34
+ destroy_node:
35
+ set_context: ["itd device-group <name>"]
36
+ set_value: "no node <ntype> <nname>"
37
+
38
+ hot_standby:
39
+ kind: boolean
40
+ get_value: '/^mode hot-standby/'
41
+ set_value: "<state> mode hot-standby"
42
+ default_value: false
43
+
44
+ probe:
45
+ get_value: '/^probe .+$/'
46
+ set_value: "probe <type> <dns_host> <port> <control> <frequency> <timeout> <retry_down_count> <retry_up_count>"
47
+
48
+ probe_control:
49
+ kind: boolean
50
+ default_value: false
51
+
52
+ probe_dns_host:
53
+ kind: string
54
+
55
+ probe_frequency:
56
+ kind: int
57
+ default_value: 10
58
+
59
+ probe_port:
60
+ kind: int
61
+
62
+ probe_retry_down:
63
+ kind: int
64
+ default_value: 3
65
+
66
+ probe_retry_up:
67
+ kind: int
68
+ default_value: 3
69
+
70
+ probe_timeout:
71
+ kind: int
72
+ default_value: 5
73
+
74
+ probe_type:
75
+ kind: string
76
+ set_value: "<state> probe icmp"
77
+ default_value: false
78
+
79
+ weight:
80
+ kind: int
81
+ get_value: '/^weight (\d+)/'
82
+ set_value: "<state> weight <weight>"
83
+ default_value: 1
@@ -0,0 +1,119 @@
1
+ # itd_service
2
+ ---
3
+ _exclude: [N3k, N5k, N6k, N3k-F, N9k-F, ios_xr]
4
+
5
+ _template:
6
+ get_command: "show running-config all | section itd"
7
+ get_context: ['/^itd <name>/']
8
+ set_context: ["itd <name>"]
9
+
10
+ access_list:
11
+ kind: string
12
+ get_value: '/^access-list (\S+)$/'
13
+ set_value: "<state> access-list <al>"
14
+ default_value: ''
15
+
16
+ all_itds:
17
+ multiple:
18
+ get_context: ~
19
+ get_value: '/^itd (\S+)/'
20
+
21
+ create:
22
+ set_context: ~
23
+ set_value: "itd <name>"
24
+
25
+ destroy:
26
+ set_context: ~
27
+ set_value: "no itd <name>"
28
+
29
+ device_group:
30
+ kind: string
31
+ get_value: '/^device-group (\S+)$/'
32
+ set_value: "<state> device-group <dg>"
33
+ default_value: ''
34
+
35
+ exclude_access_list:
36
+ kind: string
37
+ get_value: '/^exclude access-list (\S+)$/'
38
+ set_value: "<state> exclude access-list <al>"
39
+ default_value: ''
40
+
41
+ fail_action:
42
+ kind: boolean
43
+ get_value: '/^failaction node reassign/'
44
+ set_value: "<state> failaction node reassign"
45
+ default_value: false
46
+
47
+ ingress_interface:
48
+ multiple:
49
+ get_value: '/^ingress interface (\S+)(?: next-hop (\S+))*/'
50
+ set_value: "<state> ingress interface <interface> <next> <nhop>"
51
+ default_value: []
52
+
53
+ load_bal_buckets:
54
+ kind: int
55
+ default_value: false
56
+
57
+ load_bal_enable:
58
+ kind: boolean
59
+ default_value: false
60
+
61
+ load_bal_mask_pos:
62
+ kind: int
63
+ default_value: false
64
+
65
+ load_bal_method_bundle_hash:
66
+ kind: string
67
+ default_value: ''
68
+
69
+ load_bal_method_bundle_select:
70
+ kind: string
71
+ default_value: ''
72
+
73
+ load_bal_method_end_port:
74
+ kind: int
75
+ default_value: false
76
+
77
+ load_bal_method_proto:
78
+ kind: string
79
+ default_value: ''
80
+
81
+ load_bal_method_start_port:
82
+ kind: int
83
+ default_value: false
84
+
85
+ load_balance:
86
+ get_value: '/^load-balance .+$/'
87
+ set_value: "<state> load-balance <bundle_select> <bundle_hash> <proto> <start_port> <endPort> <buckets> <mask>"
88
+
89
+ nat_destination:
90
+ _exclude: [N9k]
91
+ kind: boolean
92
+ get_value: '/^nat destination$/'
93
+ set_value: "<state> nat destination"
94
+ default_value: false
95
+
96
+ peer_local:
97
+ _exclude: [N7k]
98
+ get_value: '/^peer local service (\S+)$/'
99
+ set_value: "<state> peer local service <service>"
100
+ default_value: ''
101
+
102
+ peer_vdc:
103
+ _exclude: [N9k]
104
+ get_value: '/^peer vdc (\S+) service (\S+)$/'
105
+ set_value: "<state> peer vdc <vdc> service <service>"
106
+ default_value: []
107
+
108
+ shutdown:
109
+ kind: boolean
110
+ auto_default: true
111
+ get_value: '/^no shut$/'
112
+ set_value: "<state> shutdown"
113
+ default_value: true
114
+
115
+ virtual_ip:
116
+ multiple:
117
+ get_value: '/^virtual (.*)/'
118
+ set_value : "<state> virtual <string>"
119
+ default_value: []