cisco_node_utils 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/CHANGELOG.md +126 -1
  4. data/README.md +19 -12
  5. data/Rakefile +1 -0
  6. data/bin/git/hooks/commit-msg/enforce_style +8 -0
  7. data/cisco_node_utils.gemspec +4 -3
  8. data/docs/README-develop-best-practices.md +127 -109
  9. data/docs/README-develop-node-utils-APIs.md +47 -39
  10. data/docs/template-router.rb +3 -7
  11. data/lib/.rubocop.yml +4 -4
  12. data/lib/cisco_node_utils.rb +1 -1
  13. data/lib/cisco_node_utils/aaa_authentication_login.rb +96 -0
  14. data/lib/cisco_node_utils/aaa_authentication_login_service.rb +133 -0
  15. data/lib/cisco_node_utils/aaa_authorization_service.rb +150 -0
  16. data/lib/cisco_node_utils/ace.rb +196 -0
  17. data/lib/cisco_node_utils/acl.rb +100 -0
  18. data/lib/cisco_node_utils/bgp.rb +301 -163
  19. data/lib/cisco_node_utils/bgp_af.rb +187 -19
  20. data/lib/cisco_node_utils/bgp_neighbor.rb +18 -33
  21. data/lib/cisco_node_utils/bgp_neighbor_af.rb +25 -48
  22. data/lib/cisco_node_utils/cisco_cmn_utils.rb +23 -4
  23. data/lib/cisco_node_utils/cmd_ref/README_YAML.md +593 -0
  24. data/lib/cisco_node_utils/cmd_ref/aaa_auth_login_service.yaml +22 -0
  25. data/lib/cisco_node_utils/cmd_ref/aaa_authentication_login.yaml +31 -0
  26. data/lib/cisco_node_utils/cmd_ref/aaa_authorization_service.yaml +22 -0
  27. data/lib/cisco_node_utils/cmd_ref/acl.yaml +43 -0
  28. data/lib/cisco_node_utils/cmd_ref/bgp.yaml +242 -0
  29. data/lib/cisco_node_utils/cmd_ref/bgp_af.yaml +164 -0
  30. data/lib/cisco_node_utils/cmd_ref/bgp_neighbor.yaml +131 -0
  31. data/lib/cisco_node_utils/cmd_ref/bgp_neighbor_af.yaml +179 -0
  32. data/lib/cisco_node_utils/cmd_ref/dnsclient.yaml +34 -0
  33. data/lib/cisco_node_utils/cmd_ref/evpn_vni.yaml +42 -0
  34. data/lib/cisco_node_utils/cmd_ref/fabricpath.yaml +172 -0
  35. data/lib/cisco_node_utils/cmd_ref/fabricpath_topology.yaml +35 -0
  36. data/lib/cisco_node_utils/cmd_ref/feature.yaml +42 -0
  37. data/lib/cisco_node_utils/cmd_ref/fex.yaml +9 -0
  38. data/lib/cisco_node_utils/cmd_ref/images.yaml +7 -0
  39. data/lib/cisco_node_utils/cmd_ref/interface.yaml +339 -0
  40. data/lib/cisco_node_utils/cmd_ref/interface_channel_group.yaml +28 -0
  41. data/lib/cisco_node_utils/cmd_ref/interface_ospf.yaml +61 -0
  42. data/lib/cisco_node_utils/cmd_ref/interface_portchannel.yaml +54 -0
  43. data/lib/cisco_node_utils/cmd_ref/interface_service_vni.yaml +32 -0
  44. data/lib/cisco_node_utils/cmd_ref/inventory.yaml +45 -0
  45. data/lib/cisco_node_utils/cmd_ref/memory.yaml +13 -0
  46. data/lib/cisco_node_utils/cmd_ref/ntp_config.yaml +7 -0
  47. data/lib/cisco_node_utils/cmd_ref/ntp_server.yaml +14 -0
  48. data/lib/cisco_node_utils/cmd_ref/ospf.yaml +74 -0
  49. data/lib/cisco_node_utils/cmd_ref/overlay_global.yaml +33 -0
  50. data/lib/cisco_node_utils/cmd_ref/pim.yaml +40 -0
  51. data/lib/cisco_node_utils/cmd_ref/portchannel_global.yaml +69 -0
  52. data/lib/cisco_node_utils/cmd_ref/radius_global.yaml +25 -0
  53. data/lib/cisco_node_utils/cmd_ref/radius_server.yaml +64 -0
  54. data/lib/cisco_node_utils/cmd_ref/radius_server_group.yaml +14 -0
  55. data/lib/cisco_node_utils/cmd_ref/show_system.yaml +5 -0
  56. data/lib/cisco_node_utils/cmd_ref/show_version.yaml +72 -0
  57. data/lib/cisco_node_utils/cmd_ref/snmp_community.yaml +23 -0
  58. data/lib/cisco_node_utils/cmd_ref/snmp_group.yaml +7 -0
  59. data/lib/cisco_node_utils/cmd_ref/snmp_notification_receiver.yaml +50 -0
  60. data/lib/cisco_node_utils/cmd_ref/snmp_server.yaml +51 -0
  61. data/lib/cisco_node_utils/cmd_ref/snmp_user.yaml +55 -0
  62. data/lib/cisco_node_utils/cmd_ref/snmpnotification.yaml +11 -0
  63. data/lib/cisco_node_utils/cmd_ref/syslog_server.yaml +18 -0
  64. data/lib/cisco_node_utils/cmd_ref/syslog_settings.yaml +7 -0
  65. data/lib/cisco_node_utils/cmd_ref/system.yaml +6 -0
  66. data/lib/cisco_node_utils/cmd_ref/tacacs_server.yaml +49 -0
  67. data/lib/cisco_node_utils/cmd_ref/tacacs_server_group.yaml +33 -0
  68. data/lib/cisco_node_utils/cmd_ref/tacacs_server_host.yaml +35 -0
  69. data/lib/cisco_node_utils/cmd_ref/vdc.yaml +38 -0
  70. data/lib/cisco_node_utils/cmd_ref/virtual_service.yaml +6 -0
  71. data/lib/cisco_node_utils/cmd_ref/vlan.yaml +56 -0
  72. data/lib/cisco_node_utils/cmd_ref/vni.yaml +76 -0
  73. data/lib/cisco_node_utils/cmd_ref/vpc.yaml +197 -0
  74. data/lib/cisco_node_utils/cmd_ref/vrf.yaml +88 -0
  75. data/lib/cisco_node_utils/cmd_ref/vtp.yaml +38 -0
  76. data/lib/cisco_node_utils/cmd_ref/vxlan_vtep.yaml +60 -0
  77. data/lib/cisco_node_utils/cmd_ref/vxlan_vtep_vni.yaml +39 -0
  78. data/lib/cisco_node_utils/cmd_ref/yum.yaml +13 -0
  79. data/lib/cisco_node_utils/command_reference.rb +359 -187
  80. data/lib/cisco_node_utils/configparser_lib.rb +1 -1
  81. data/lib/cisco_node_utils/dns_domain.rb +19 -5
  82. data/lib/cisco_node_utils/domain_name.rb +4 -8
  83. data/lib/cisco_node_utils/evpn_vni.rb +157 -0
  84. data/lib/cisco_node_utils/fabricpath_global.rb +388 -0
  85. data/lib/cisco_node_utils/fabricpath_topology.rb +150 -0
  86. data/lib/cisco_node_utils/feature.rb +111 -0
  87. data/lib/cisco_node_utils/interface.rb +390 -97
  88. data/lib/cisco_node_utils/interface_channel_group.rb +124 -0
  89. data/lib/cisco_node_utils/interface_ospf.rb +11 -34
  90. data/lib/cisco_node_utils/interface_portchannel.rb +157 -0
  91. data/lib/cisco_node_utils/interface_service_vni.rb +132 -0
  92. data/lib/cisco_node_utils/name_server.rb +1 -1
  93. data/lib/cisco_node_utils/node.rb +55 -249
  94. data/lib/cisco_node_utils/node_util.rb +5 -1
  95. data/lib/cisco_node_utils/ntp_config.rb +2 -2
  96. data/lib/cisco_node_utils/ntp_server.rb +14 -5
  97. data/lib/cisco_node_utils/overlay_global.rb +153 -0
  98. data/lib/cisco_node_utils/pim.rb +124 -0
  99. data/lib/cisco_node_utils/pim_group_list.rb +108 -0
  100. data/lib/cisco_node_utils/pim_rp_address.rb +102 -0
  101. data/lib/cisco_node_utils/platform.rb +8 -9
  102. data/lib/cisco_node_utils/portchannel_global.rb +277 -0
  103. data/lib/cisco_node_utils/radius_global.rb +9 -19
  104. data/lib/cisco_node_utils/radius_server.rb +31 -41
  105. data/lib/cisco_node_utils/radius_server_group.rb +117 -0
  106. data/lib/cisco_node_utils/router_ospf.rb +1 -1
  107. data/lib/cisco_node_utils/router_ospf_vrf.rb +14 -19
  108. data/lib/cisco_node_utils/snmp_notification_receiver.rb +158 -0
  109. data/lib/cisco_node_utils/snmpcommunity.rb +3 -5
  110. data/lib/cisco_node_utils/snmpgroup.rb +1 -1
  111. data/lib/cisco_node_utils/snmpnotification.rb +57 -0
  112. data/lib/cisco_node_utils/snmpserver.rb +8 -17
  113. data/lib/cisco_node_utils/snmpuser.rb +67 -28
  114. data/lib/cisco_node_utils/syslog_server.rb +3 -9
  115. data/lib/cisco_node_utils/syslog_settings.rb +2 -10
  116. data/lib/cisco_node_utils/tacacs_server.rb +9 -14
  117. data/lib/cisco_node_utils/tacacs_server_group.rb +145 -0
  118. data/lib/cisco_node_utils/tacacs_server_host.rb +5 -9
  119. data/lib/cisco_node_utils/vdc.rb +88 -0
  120. data/lib/cisco_node_utils/version.rb +5 -2
  121. data/lib/cisco_node_utils/vlan.rb +71 -8
  122. data/lib/cisco_node_utils/vni.rb +227 -0
  123. data/lib/cisco_node_utils/vpc.rb +377 -0
  124. data/lib/cisco_node_utils/vrf.rb +60 -9
  125. data/lib/cisco_node_utils/vrf_af.rb +191 -0
  126. data/lib/cisco_node_utils/vtp.rb +8 -6
  127. data/lib/cisco_node_utils/vxlan_vtep.rb +151 -0
  128. data/lib/cisco_node_utils/vxlan_vtep_vni.rb +234 -0
  129. data/lib/cisco_node_utils/yum.rb +1 -1
  130. data/tests/.rubocop.yml +1 -1
  131. data/tests/basetest.rb +16 -7
  132. data/tests/ciscotest.rb +55 -13
  133. data/tests/cmd_config.yaml +2 -2
  134. data/tests/platform_info.rb +3 -2
  135. data/tests/test_aaa_authentication_login.rb +219 -0
  136. data/tests/test_aaa_authentication_login_service.rb +759 -0
  137. data/tests/test_aaa_authorization_service.rb +1041 -0
  138. data/tests/test_ace.rb +160 -0
  139. data/tests/test_acl.rb +176 -0
  140. data/tests/test_bgp_af.rb +269 -13
  141. data/tests/test_bgp_neighbor.rb +38 -40
  142. data/tests/test_bgp_neighbor_af.rb +92 -32
  143. data/tests/test_command_config.rb +5 -5
  144. data/tests/test_command_reference.rb +284 -101
  145. data/tests/test_dns_domain.rb +1 -1
  146. data/tests/test_domain_name.rb +1 -1
  147. data/tests/test_evpn_vni.rb +106 -0
  148. data/tests/test_fabricpath_global.rb +243 -0
  149. data/tests/test_fabricpath_topology.rb +98 -0
  150. data/tests/test_interface.rb +292 -74
  151. data/tests/test_interface_channel_group.rb +74 -0
  152. data/tests/test_interface_ospf.rb +9 -4
  153. data/tests/test_interface_portchannel.rb +105 -0
  154. data/tests/test_interface_service_vni.rb +232 -0
  155. data/tests/test_interface_svi.rb +77 -62
  156. data/tests/test_interface_switchport.rb +17 -5
  157. data/tests/test_name_server.rb +1 -1
  158. data/tests/test_node.rb +1 -1
  159. data/tests/test_node_ext.rb +10 -20
  160. data/tests/test_ntp_config.rb +1 -1
  161. data/tests/test_ntp_server.rb +18 -6
  162. data/tests/test_overlay_global.rb +102 -0
  163. data/tests/test_pim.rb +177 -0
  164. data/tests/test_pim_group_list.rb +181 -0
  165. data/tests/test_pim_rp_address.rb +153 -0
  166. data/tests/test_platform.rb +3 -3
  167. data/tests/test_portchannel_global.rb +202 -0
  168. data/tests/test_radius_global.rb +1 -1
  169. data/tests/test_radius_server.rb +92 -57
  170. data/tests/test_radius_server_group.rb +149 -0
  171. data/tests/test_router_bgp.rb +283 -112
  172. data/tests/test_router_ospf.rb +2 -2
  173. data/tests/test_router_ospf_vrf.rb +4 -4
  174. data/tests/test_snmp_notification_receiver.rb +167 -0
  175. data/tests/test_snmpcommunity.rb +1 -1
  176. data/tests/test_snmpgroup.rb +1 -1
  177. data/tests/test_snmpnotification.rb +72 -0
  178. data/tests/test_snmpserver.rb +29 -105
  179. data/tests/test_snmpuser.rb +32 -30
  180. data/tests/test_syslog_server.rb +36 -10
  181. data/tests/test_syslog_settings.rb +1 -1
  182. data/tests/test_tacacs_server.rb +1 -1
  183. data/tests/test_tacacs_server_group.rb +405 -0
  184. data/tests/test_tacacs_server_host.rb +1 -1
  185. data/tests/test_vdc.rb +78 -0
  186. data/tests/test_vlan.rb +74 -19
  187. data/tests/test_vlan_mt_full.rb +95 -0
  188. data/tests/test_vni.rb +106 -0
  189. data/tests/test_vpc.rb +361 -0
  190. data/tests/test_vrf.rb +172 -29
  191. data/tests/test_vtp.rb +1 -1
  192. data/tests/test_vxlan_vtep.rb +214 -0
  193. data/tests/test_vxlan_vtep_vni.rb +201 -0
  194. data/tests/test_yum.rb +1 -1
  195. metadata +120 -11
  196. data/lib/cisco_node_utils/README_YAML.md +0 -325
  197. data/lib/cisco_node_utils/command_reference_common.yaml +0 -1051
  198. data/lib/cisco_node_utils/command_reference_common_bgp.yaml +0 -535
  199. data/lib/cisco_node_utils/command_reference_n3064.yaml +0 -13
  200. data/lib/cisco_node_utils/command_reference_n7k.yaml +0 -52
  201. data/lib/cisco_node_utils/command_reference_n9k.yaml +0 -26
  202. data/tests/platform_info.yaml +0 -10
@@ -0,0 +1,61 @@
1
+ # interface_ospf
2
+ ---
3
+ _template:
4
+ config_get: 'show running interface all'
5
+ config_get_token: ['/^interface %s$/i']
6
+ config_set: ["interface %s"]
7
+
8
+ area:
9
+ config_get_token_append: ['/^\s*ip router ospf (\S+) area (\S+)/']
10
+ config_set_append: ["%s ip router ospf %s area %s"]
11
+
12
+ cost:
13
+ kind: int
14
+ config_get_token_append: ['/^\s*ip ospf cost (\d+)/']
15
+ config_set_append: ["%s ip ospf cost %s"]
16
+ default_value: 0
17
+
18
+ dead_interval:
19
+ kind: int
20
+ config_get_token_append: ['/^\s*ip ospf dead-interval (\d+)/']
21
+ config_set_append: ["%s ip ospf dead-interval %s"]
22
+ default_value: 40
23
+ test_config_result: [262141]
24
+
25
+ hello_interval:
26
+ kind: int
27
+ config_get_token_append: ['/^\s*ip ospf hello-interval (\d+)/']
28
+ config_set_append: ["%s ip ospf hello-interval %s"]
29
+ default_value: 10
30
+
31
+ message_digest:
32
+ kind: boolean
33
+ config_get_token_append: ['/^\s*ip ospf authentication message-digest/']
34
+ config_set_append: ["%s ip ospf authentication message-digest"]
35
+ default_value: false
36
+
37
+ message_digest_alg_type:
38
+ config_get_token_append: ['/^\s*ip ospf message-digest-key \d+ (\S+)/']
39
+ default_value: 'md5'
40
+
41
+ message_digest_enc_type:
42
+ config_get_token_append: ['/^\s*ip ospf message-digest-key \d+ \S+ (\d+)/']
43
+ default_value: '0'
44
+
45
+ message_digest_key_id:
46
+ kind: int
47
+ config_get_token_append: ['/^\s*ip ospf message-digest-key (\d+)/']
48
+ default_value: 0
49
+
50
+ message_digest_key_set:
51
+ config_set_append: ["%s ip ospf message-digest-key %s %s %s %s"]
52
+
53
+ message_digest_password:
54
+ default_value: ~
55
+ config_get_token_append: ['/^\s*ip ospf message-digest-key \d+ \S+ \d+ (\S+)/']
56
+
57
+ passive_interface:
58
+ kind: boolean
59
+ config_get_token_append: ['/^\s*ip ospf passive-interface/']
60
+ config_set_append: ["%s ip ospf passive-interface"]
61
+ default_value: false
@@ -0,0 +1,54 @@
1
+ # interface_portchannel
2
+ ---
3
+ _template:
4
+ config_set: ["interface %s"]
5
+ config_get_token: '/^interface %s$/i'
6
+ config_get: "show running interface all"
7
+
8
+ create:
9
+ config_set: "interface %s"
10
+
11
+ destroy:
12
+ config_set: "no interface %s"
13
+
14
+ lacp_graceful_convergence:
15
+ kind: boolean
16
+ auto_default: false
17
+ config_get_token_append: ['/^lacp graceful.convergence$/']
18
+ config_set_append: ["%s lacp graceful-convergence"]
19
+ default_value: true
20
+
21
+ lacp_max_bundle:
22
+ kind: int
23
+ config_get_token_append: ['/^lacp max.bundle (\d+)$/']
24
+ config_set_append: ["lacp max-bundle %s"]
25
+ /N(3|9)/:
26
+ default_value: 32
27
+ else:
28
+ default_value: 16
29
+
30
+ lacp_min_links:
31
+ kind: int
32
+ config_get_token_append: ['/^lacp min.links (\d+)$/']
33
+ config_set_append: ["lacp min-links %s"]
34
+ default_value: 1
35
+
36
+ lacp_suspend_individual:
37
+ kind: boolean
38
+ auto_default: false
39
+ config_get_token_append: ['/^lacp suspend.individual$/']
40
+ config_set_append: ["%s lacp suspend-individual"]
41
+ default_value: true
42
+
43
+ port_hash_distribution:
44
+ _exclude: [/N6/, /N5/]
45
+ config_get_token_append: ['/^port-channel port hash.distribution (.*)$/']
46
+ config_set: ["terminal dont-ask", "interface %s", "%s port-channel port hash-distribution %s", "end"]
47
+ default_value: false
48
+
49
+ port_load_defer:
50
+ _exclude: [/N6/, /N5/]
51
+ kind: boolean
52
+ config_get_token_append: ['/^port-channel port load.defer$/']
53
+ config_set_append: ["%s port-channel port load-defer"]
54
+ default_value: false
@@ -0,0 +1,32 @@
1
+ # interface_service_vni
2
+ ---
3
+ _template:
4
+ _exclude: [/N(3|5|6|9)/]
5
+ config_get: 'show running interface all'
6
+ config_get_token: '/^interface <name>$/i'
7
+ config_get_token_append:
8
+ - '/^service instance <sid> vni$/'
9
+ config_set: 'interface <name>'
10
+ config_set_append:
11
+ - 'service instance <sid> vni'
12
+
13
+ all_service_vni_ids:
14
+ multiple:
15
+ config_get_token_append: '/^service instance (\d+) vni/'
16
+
17
+ create_destroy:
18
+ config_set: ['interface <name>', '<state> service instance <sid> vni']
19
+
20
+ encapsulation_profile_vni:
21
+ config_get_token_append: '/encapsulation profile (\S+) default/'
22
+ config_set_append: '<state> encapsulation profile <profile> default'
23
+ default_value: ''
24
+
25
+ shutdown:
26
+ /N7/:
27
+ kind: boolean
28
+ config_get_token_append: '/^(?:no )?shutdown$/'
29
+ config_set_append: "<state> shutdown"
30
+ default_value: true
31
+ else:
32
+ default_value: false
@@ -0,0 +1,45 @@
1
+ # inventory
2
+ ---
3
+ _template:
4
+ cli_nexus:
5
+ config_get: 'show inventory'
6
+ test_config_get: 'show inventory | no-more'
7
+
8
+ all:
9
+ multiple: true
10
+ cli_nexus:
11
+ config_get_token: ["TABLE_inv", "ROW_inv"]
12
+
13
+ chassis:
14
+ cli_nexus:
15
+ config_get_token: ["TABLE_inv", "ROW_inv", {'name': '"Chassis"'}]
16
+
17
+ inventory:
18
+ # TODO: clean this up
19
+ /N7/:
20
+ test_config_get_regex: [
21
+ '/.*\nNAME: "(.+)",\s+DESCR: "(.+)"\s+\nPID: (\S+)\s+,\s+VID: (.+) ,\s+SN: (.+)\s+\n/',
22
+ '/.*NAME: "(.+)",\s+DESCR: "(.+)"\s+PID: (\S+)\s+,\s+VID: (.+) ,\s+SN: (.+)\s+\n/'
23
+ ]
24
+ /N9K/:
25
+ test_config_get_regex: [
26
+ '/.*\nNAME: "(.+)",\s+DESCR: "(.+)"\s+\nPID: (\S+)\s+,\s+VID: (.+) ,\s+SN: (.+)\s+\n/',
27
+ '/.*NAME: "(.+)",\s+DESCR: "(.+)"\s+PID: (\S+)\s+,\s+VID: (.+) ,\s+SN: (.+)\s+\n/'
28
+ ]
29
+ else:
30
+ test_config_get_regex: [
31
+ '/.*\nNAME: "(.+)",\s+DESCR: "(.+)"\nPID: (\S+)\s+, VID: (.+) , SN: (.+)\n/',
32
+ '/.*\nNAME: "(.+)",\s+DESCR: "(.+)"\nPID: (\S+)\s+, VID: (.+) , SN: (.+)\n/'
33
+ ]
34
+
35
+ productid:
36
+ cli_nexus:
37
+ config_get_token: ["TABLE_inv", "ROW_inv", 0, "productid"]
38
+
39
+ serialnum:
40
+ cli_nexus:
41
+ config_get_token: ["TABLE_inv", "ROW_inv", 0, "serialnum"]
42
+
43
+ versionid:
44
+ cli_nexus:
45
+ config_get_token: ["TABLE_inv", "ROW_inv", 0, "vendorid"]
@@ -0,0 +1,13 @@
1
+ # memory
2
+ ---
3
+ free:
4
+ config_get: 'show system resources'
5
+ config_get_token: '/Memory.* (\S+) free/'
6
+
7
+ total:
8
+ config_get: 'show system resources'
9
+ config_get_token: '/Memory.* (\S+) total/'
10
+
11
+ used:
12
+ config_get: 'show system resources'
13
+ config_get_token: '/Memory.* (\S+) used/'
@@ -0,0 +1,7 @@
1
+ # ntp_config
2
+ ---
3
+ source_interface:
4
+ config_get: "show running-config ntp"
5
+ config_get_token: '/^ntp source-interface\s+(.*)$/'
6
+ config_set: '<state> ntp source-interface <source_interface>'
7
+ default_value: ~
@@ -0,0 +1,14 @@
1
+ # ntp_server
2
+ ---
3
+ prefer:
4
+ multiple: true
5
+ config_get: "show running-config all | include 'ntp server(.*)(prefer)'"
6
+ config_get_token: '/ntp server (\S+)/'
7
+ default_value: []
8
+
9
+ server:
10
+ multiple: true
11
+ config_get: "show running-config all | include 'ntp server'"
12
+ config_get_token: '/ntp server (\S+)/'
13
+ config_set: '<state> ntp server <ip> <prefer>'
14
+ default_value: []
@@ -0,0 +1,74 @@
1
+ # ospf
2
+ ---
3
+ _template:
4
+ config_get: "show running ospf all"
5
+ config_get_token: '/^router ospf <name>$/'
6
+ config_get_token_append:
7
+ - '/^vrf <vrf>$/'
8
+ config_set: "router ospf <name>"
9
+ config_set_append:
10
+ - "vrf <vrf>"
11
+
12
+ auto_cost:
13
+ config_get_token_append: '/^auto-cost reference-bandwidth (\d+)\s*(\S+)?$/'
14
+ config_set_append: "auto-cost reference-bandwidth <cost> <type>"
15
+ default_value: [40, "Gbps"]
16
+
17
+ default_metric:
18
+ kind: int
19
+ config_get_token_append: '/^default-metric (\d+)?$/'
20
+ config_set_append: "<state> default-metric <metric>"
21
+ default_value: 0
22
+
23
+ feature:
24
+ config_get: "show running ospf"
25
+ config_get_token: '/^feature ospf$/'
26
+ config_set: "%s feature ospf"
27
+
28
+ log_adjacency:
29
+ auto_default: false
30
+ config_get_token_append: '/^(log-adjacency-changes)\s*(detail)?$/'
31
+ config_set_append: "<state> log-adjacency-changes <type>"
32
+ default_value: :none
33
+
34
+ router:
35
+ multiple: true
36
+ config_get: "show running ospf"
37
+ config_get_token: '/^router ospf (\S+)$/'
38
+ config_set: "%s router ospf %s"
39
+
40
+ router_id:
41
+ config_get_token_append: '/^router-id (\S+)?$/'
42
+ config_set_append: "<state> router-id <router_id>"
43
+ default_value: ""
44
+
45
+ timer_throttle_lsa:
46
+ config_get_token_append: '/^timers throttle lsa (\d+) (\d+) (\d+)$/'
47
+ config_set_append: "timers throttle lsa <start> <hold> <max>"
48
+
49
+ timer_throttle_lsa_hold:
50
+ default_value: 5000
51
+
52
+ timer_throttle_lsa_max:
53
+ default_value: 5000
54
+
55
+ timer_throttle_lsa_start:
56
+ default_value: 0
57
+
58
+ timer_throttle_spf:
59
+ config_get_token_append: '/^timers throttle spf (\d+) (\d+) (\d+)$/'
60
+ config_set_append: "timers throttle spf <start> <hold> <max>"
61
+
62
+ timer_throttle_spf_hold:
63
+ default_value: 1000
64
+
65
+ timer_throttle_spf_max:
66
+ default_value: 5000
67
+
68
+ timer_throttle_spf_start:
69
+ default_value: 200
70
+
71
+ vrf:
72
+ multiple: true
73
+ config_get_token: ['/^router ospf <name>$/i', '/^vrf\s+(\S+)$/']
74
+ config_set: ["router ospf <name>", "<state> vrf <vrf>", "end"]
@@ -0,0 +1,33 @@
1
+ # overlay_global
2
+ ---
3
+ anycast_gateway_mac:
4
+ kind: string
5
+ config_get: "show running all | inc 'fabric forwarding'"
6
+ config_get_token: '/^fabric forwarding anycast-gateway-mac (\S+)$/'
7
+ config_set: "<state> fabric forwarding anycast-gateway-mac <mac_addr>"
8
+ default_value: ""
9
+
10
+ dup_host_ip_addr_detection:
11
+ config_get: "show running all | inc 'fabric forwarding'"
12
+ config_get_token: '/^fabric forwarding dup-host-ip-addr-detection (\d+) (\d+)$/'
13
+ config_set: "<state> fabric forwarding dup-host-ip-addr-detection <host_moves> <timeout>"
14
+
15
+ dup_host_ip_addr_detection_host_moves:
16
+ default_value: 5
17
+
18
+ dup_host_ip_addr_detection_timeout:
19
+ default_value: 180
20
+
21
+ dup_host_mac_detection:
22
+ config_get: 'show running | i l2rib'
23
+ config_get_token: '/^l2rib dup-host-mac-detection (\d+) (\d+)$/'
24
+ config_set: "l2rib dup-host-mac-detection <host_moves> <timeout>"
25
+
26
+ dup_host_mac_detection_default:
27
+ config_set: "l2rib dup-host-mac-detection default"
28
+
29
+ dup_host_mac_detection_host_moves:
30
+ default_value: 5
31
+
32
+ dup_host_mac_detection_timeout:
33
+ default_value: 180
@@ -0,0 +1,40 @@
1
+ # pim
2
+ ---
3
+ _template:
4
+ config_get : "show run pim all"
5
+ config_get_token :
6
+ - '/^vrf context <vrf>$/'
7
+ config_set :
8
+ - "vrf context <vrf>"
9
+
10
+ all_group_lists:
11
+ multiple:
12
+ config_get_token_append : '/^<afi> pim rp-address ([0-9\.]+) group-list (\S+)/'
13
+
14
+ all_rp_addresses:
15
+ multiple:
16
+ config_get_token_append: '/^<afi> pim rp-address ([0-9\.]+)/'
17
+
18
+ all_ssm_ranges:
19
+ multiple:
20
+ config_get_token_append : '/^<afi> pim ssm range (.*)$/'
21
+
22
+ feature:
23
+ config_get: 'show running | section feature'
24
+ config_get_token: '/^feature pim$/' # TBD pim6
25
+ config_set: 'feature pim'
26
+
27
+ group_list:
28
+ default_value: ~
29
+ config_get_token_append: '/^<afi> pim rp-address (\S+) group-list (\S+)/'
30
+ config_set_append: "<state> <afi> pim rp-address <addr> group-list <group>"
31
+
32
+ rp_address:
33
+ multiple:
34
+ config_get_token_append: '/^<afi> pim rp-address (\S+)/'
35
+ config_set_append: "<state> <afi> pim rp-address <addr>"
36
+ default_value: ~
37
+
38
+ ssm_range:
39
+ config_get_token_append: '/^<afi> pim ssm range (.*)/'
40
+ config_set_append: "<state> <afi> pim ssm range <ssm_range>"
@@ -0,0 +1,69 @@
1
+ # portchannel_global
2
+ ---
3
+ _template:
4
+ config_get: "show running all"
5
+
6
+ asymmetric:
7
+ _exclude: [/N6/, /N5/, /N3/, /N9/]
8
+ default_value: false
9
+
10
+ bundle_hash:
11
+ /N(5|6|7)/:
12
+ default_value: 'ip'
13
+ /N(3|9)/:
14
+ default_value: 'ip-l4port'
15
+
16
+ bundle_select:
17
+ default_value: 'src-dst'
18
+
19
+ concatenation:
20
+ _exclude: [/N7/, /N5/, /N6/]
21
+ default_value: false
22
+
23
+ hash_distribution:
24
+ _exclude: [/N6/, /N5/, /N3/, /N9/]
25
+ config_get_token: ['/^port.channel hash.distribution (.*)$/']
26
+ config_set: ["terminal dont-ask", "port-channel hash-distribution %s", "end"]
27
+ default_value: 'adaptive'
28
+
29
+ hash_poly:
30
+ _exclude: [/N7/, /N3/, /N9/]
31
+ default_value: 'CRC10b'
32
+
33
+ load_balance_type:
34
+ kind: string
35
+ /N(5|6)/:
36
+ default_only: "ethernet"
37
+ /N7/:
38
+ default_only: "asymmetric"
39
+ /N(3|9)/:
40
+ default_only: "symmetry"
41
+
42
+ load_defer:
43
+ _exclude: [/N6/, /N5/, /N3/, /N9/]
44
+ kind: int
45
+ config_get_token: ['/^port.channel load.defer (\d+)$/']
46
+ config_set: ["port-channel load-defer %s"]
47
+ default_value: 120
48
+
49
+ port_channel_load_balance:
50
+ multiple:
51
+ config_get_token: '/^port-channel load-balance (.*)$/'
52
+ config_set: "port-channel load-balance %s %s %s %s %s %s"
53
+
54
+ resilient:
55
+ _exclude: [/N6/, /N5/, /N7/]
56
+ kind: boolean
57
+ config_get: "show running-config all"
58
+ config_get_token: '/^port-channel load-balance resilient$/'
59
+ config_set: "%s port-channel load-balance resilient"
60
+ default_value: false
61
+
62
+ rotate:
63
+ _exclude: [/N5/, /N6/]
64
+ kind: int
65
+ default_value: 0
66
+
67
+ symmetry:
68
+ _exclude: [/N7/, /N3/, /N5/, /N6/]
69
+ default_value: false