rbeapi 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGELOG.md +12 -0
  3. data/Gemfile +4 -0
  4. data/README.md +9 -9
  5. data/Rakefile +20 -0
  6. data/lib/rbeapi/api/bgp.rb +770 -0
  7. data/lib/rbeapi/api/dns.rb +32 -31
  8. data/lib/rbeapi/api/interfaces.rb +106 -87
  9. data/lib/rbeapi/api/ipinterfaces.rb +27 -42
  10. data/lib/rbeapi/api/logging.rb +9 -19
  11. data/lib/rbeapi/api/mlag.rb +60 -90
  12. data/lib/rbeapi/api/ntp.rb +12 -17
  13. data/lib/rbeapi/api/ospf.rb +9 -26
  14. data/lib/rbeapi/api/radius.rb +29 -43
  15. data/lib/rbeapi/api/snmp.rb +54 -83
  16. data/lib/rbeapi/api/staticroutes.rb +68 -21
  17. data/lib/rbeapi/api/stp.rb +41 -49
  18. data/lib/rbeapi/api/switchports.rb +41 -68
  19. data/lib/rbeapi/api/system.rb +6 -12
  20. data/lib/rbeapi/api/tacacs.rb +12 -21
  21. data/lib/rbeapi/api/varp.rb +25 -26
  22. data/lib/rbeapi/api/vlans.rb +19 -28
  23. data/lib/rbeapi/api.rb +30 -21
  24. data/lib/rbeapi/client.rb +3 -1
  25. data/lib/rbeapi/version.rb +1 -1
  26. data/rbeapi.spec.tmpl +4 -0
  27. data/spec/spec_helper.rb +8 -0
  28. data/spec/system/api_ospf_interfaces_spec.rb +16 -0
  29. data/spec/system/api_ospf_spec.rb +14 -0
  30. data/spec/system/api_varp_interfaces_spec.rb +16 -0
  31. data/spec/system/rbeapi/api/dns_spec.rb +66 -0
  32. data/spec/system/rbeapi/api/interfaces_base_spec.rb +4 -4
  33. data/spec/system/rbeapi/api/interfaces_ethernet_spec.rb +6 -6
  34. data/spec/system/rbeapi/api/interfaces_portchannel_spec.rb +6 -6
  35. data/spec/system/rbeapi/api/interfaces_vxlan_spec.rb +4 -4
  36. data/spec/system/rbeapi/api/ipinterfaces_spec.rb +44 -0
  37. data/spec/system/rbeapi/api/logging_spec.rb +18 -2
  38. data/spec/system/rbeapi/api/mlag_spec.rb +94 -2
  39. data/spec/system/rbeapi/api/ntp_spec.rb +14 -0
  40. data/spec/system/rbeapi/api/snmp_spec.rb +105 -0
  41. data/spec/system/rbeapi/api/stp_interfaces_spec.rb +43 -6
  42. data/spec/system/rbeapi/api/stp_spec.rb +18 -6
  43. data/spec/system/rbeapi/api/switchports_spec.rb +75 -3
  44. data/spec/system/rbeapi/api/system_spec.rb +16 -0
  45. data/spec/system/rbeapi/api/vlans_spec.rb +28 -0
  46. data/spec/unit/rbeapi/api/bgp/bgp_neighbors_spec.rb +289 -0
  47. data/spec/unit/rbeapi/api/bgp/bgp_spec.rb +192 -0
  48. data/spec/unit/rbeapi/api/bgp/fixture_bgp.text +101 -0
  49. data/spec/unit/rbeapi/api/interfaces/base_spec.rb +7 -13
  50. data/spec/unit/rbeapi/api/interfaces/ethernet_spec.rb +3 -3
  51. data/spec/unit/rbeapi/api/interfaces/portchannel_spec.rb +11 -16
  52. data/spec/unit/rbeapi/api/interfaces/vxlan_spec.rb +15 -21
  53. data/spec/unit/rbeapi/api/mlag/default_spec.rb +13 -19
  54. data/spec/unit/rbeapi/api/staticroutes/default_spec.rb +138 -0
  55. data/spec/unit/rbeapi/api/staticroutes/fixture_staticroutes.text +5 -0
  56. data/spec/unit/rbeapi/api/vlans/default_spec.rb +4 -4
  57. metadata +15 -4
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2014, Arista Networks, Inc.
2
+ # Copyright (c) 2014,2015, Arista Networks, Inc.
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without
@@ -50,7 +50,7 @@ module Rbeapi
50
50
  # "domain_list": array<strings>
51
51
  # }
52
52
  #
53
- # @return [Hash] A Ruby hash objec that provides the SNMP settings as
53
+ # @return [Hash] A Ruby hash object that provides the SNMP settings as
54
54
  # key / value pairs.
55
55
  def get
56
56
  response = {}
@@ -81,25 +81,19 @@ module Rbeapi
81
81
  #
82
82
  # @param [Hash] opts The configuration parameters
83
83
  # @option opts [string] :value The value to set the domain-name to
84
+ # @option :opts [Boolean] :enable If false then the command is
85
+ # negated. Default is true.
84
86
  # @option opts [Boolean] :default The value should be set to default
85
87
  #
86
88
  # @return [Boolean] returns true if the command completed successfully
87
89
  def set_domain_name(opts = {})
88
- value = opts[:value]
89
- default = opts[:default] || false
90
-
91
- case default
92
- when true
93
- cmds = 'default ip domain-name'
94
- when false
95
- cmds = (value ? "ip domain-name #{value}" : 'no ip domain-name')
96
- end
90
+ cmds = command_builder('ip domain-name', opts)
97
91
  configure(cmds)
98
92
  end
99
93
 
100
94
  ##
101
95
  # set_name_servers configures the set of name servers that eos will use
102
- # to resolve dns queries. If the value option is not provided, the
96
+ # to resolve dns queries. If the enable option is false, then the
103
97
  # name-server list will be configured using the no keyword. If the
104
98
  # default option is specified, then the name server list will be
105
99
  # configured using the default keyword. If both options are provided the
@@ -112,28 +106,30 @@ module Rbeapi
112
106
  # no ip name-server
113
107
  # default ip name-server
114
108
  #
115
- # @option [Array] :value The set of name servers to configure on the
109
+ # @param [Hash] opts The configuration parameters
110
+ # @option opts [string] :value The set of name servers to configure on the
116
111
  # node. The list of name servers will be replace in the nodes running
117
112
  # configuration by the list provided in value
118
- #
113
+ # @option :opts [Boolean] :enable If false then the command is
114
+ # negated. Default is true.
119
115
  # @option [Boolean] :default Configures the ip name-servers using the
120
- # default keyword argument
116
+ # default keyword argument. Default takes precedence over enable.
121
117
  #
122
- # @return [Boolean] returns true if the commands completed successfuly
118
+ # @return [Boolean] returns true if the commands completed successfully
123
119
  def set_name_servers(opts = {})
124
- value = opts[:value] || []
120
+ value = opts[:value]
121
+ enable = opts.fetch(:enable, true)
125
122
  default = opts[:default] || false
126
123
 
127
124
  case default
128
125
  when true
129
126
  cmds = 'default ip name-server'
130
127
  when false
131
- cmds = []
132
- parse_name_servers[:name_servers].each do |srv|
133
- cmds << "no ip name-server #{srv}"
134
- end
135
- value.each do |srv|
136
- cmds << "ip name-server #{srv}"
128
+ cmds = ['no ip name-server']
129
+ if enable
130
+ value.each do |srv|
131
+ cmds << "ip name-server #{srv}"
132
+ end
137
133
  end
138
134
  end
139
135
  configure cmds
@@ -149,8 +145,8 @@ module Rbeapi
149
145
 
150
146
  ##
151
147
  # set_domain_list configures the set of domain names to search when
152
- # making dns queries for the FQDN. If the value option is not provided,
153
- # the domain-list will be configured using the no keyword. If the
148
+ # making dns queries for the FQDN. If the enable option is set to false,
149
+ # then the domain-list will be configured using the no keyword. If the
154
150
  # default option is specified, then the domain list will be configured
155
151
  # using the default keyword. If both options are provided the default
156
152
  # keyword option will take precedence.
@@ -169,21 +165,26 @@ module Rbeapi
169
165
  # @option [Boolean] :default Configures the ip domain-list using the
170
166
  # default keyword argument
171
167
  #
172
- # @return [Boolean] returns true if the commands completed successfuly
168
+ # @return [Boolean] returns true if the commands completed successfully
173
169
  def set_domain_list(opts = {})
174
- value = opts[:value] || []
170
+ value = opts[:value]
171
+ enable = opts.fetch(:enable, true)
175
172
  default = opts[:default] || false
176
173
 
174
+ cmds = []
177
175
  case default
178
176
  when true
179
- cmds = 'default ip domain-list'
177
+ parse_domain_list[:domain_list].each do |name|
178
+ cmds << "default ip domain-list #{name}"
179
+ end
180
180
  when false
181
- cmds = []
182
181
  parse_domain_list[:domain_list].each do |name|
183
182
  cmds << "no ip domain-list #{name}"
184
183
  end
185
- value.each do |name|
186
- cmds << "ip domain-list #{name}"
184
+ if enable
185
+ value.each do |name|
186
+ cmds << "ip domain-list #{name}"
187
+ end
187
188
  end
188
189
  end
189
190
  configure cmds
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2014, Arista Networks, Inc.
2
+ # Copyright (c) 2014,2015, Arista Networks, Inc.
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without
@@ -100,7 +100,7 @@ module Rbeapi
100
100
  ##
101
101
  # get returns the specified interface resource hash that represents the
102
102
  # node's current interface configuration. The BaseInterface class
103
- # provides all the set of attributres that are common to all interfaces
103
+ # provides all the set of attributes that are common to all interfaces
104
104
  # in EOS. This method will return an interface type of generic
105
105
  #
106
106
  # @example
@@ -129,14 +129,14 @@ module Rbeapi
129
129
 
130
130
  ##
131
131
  # parse_description scans the provided configuration block and parses
132
- # the description value if it exists in the cofiguration. If the
132
+ # the description value if it exists in the configuration. If the
133
133
  # description value is not configured, then the DEFALT_INTF_DESCRIPTION
134
- # value is returned. The hash returned by this method is inteded to be
134
+ # value is returned. The hash returned by this method is intended to be
135
135
  # merged into the interface resource hash returned by the get method.
136
136
  #
137
137
  # @api private
138
138
  #
139
- # @eturn [Hash<Symbol, Object>] resource hash attribute
139
+ # @return [Hash<Symbol, Object>] resource hash attribute
140
140
  def parse_description(config)
141
141
  mdata = /^\s{3}description\s(.+)$/.match(config)
142
142
  { description: mdata.nil? ? DEFAULT_INTF_DESCRIPTION : mdata[1] }
@@ -148,7 +148,7 @@ module Rbeapi
148
148
  # the shutdown value. If the shutdown value is configured then true
149
149
  # is returned as its value otherwise false is returned. The hash
150
150
  # returned by this method is intended to be merged into the interface
151
- # ressource hash returned by the get method.
151
+ # resource hash returned by the get method.
152
152
  #
153
153
  # @api private
154
154
  #
@@ -171,7 +171,7 @@ module Rbeapi
171
171
  # interface name must be the full interface identifier (ie Loopback,
172
172
  # not Lo)
173
173
  #
174
- # @return [Boolean] returns true if the command completed succesfully
174
+ # @return [Boolean] returns true if the command completed successfully
175
175
  def create(value)
176
176
  configure("interface #{value}")
177
177
  end
@@ -212,12 +212,11 @@ module Rbeapi
212
212
 
213
213
  ##
214
214
  # set_description configures the description value for the specified
215
- # interface name in the nodes running configuration. If the value is
216
- # not provided in the opts keyword hash then the description value is
217
- # negated using the no keyword. If the default keyword is set to
218
- # true, then the description value is defaulted using the default
219
- # keyword. The default keyword takes precedence over the value
220
- # keyword if both are provided.
215
+ # interface name in the nodes running configuration. If the enable
216
+ # keyword is false then the description value is negated using the no
217
+ # keyword. If the default keyword is set to true, then the description
218
+ # value is defaulted using the default keyword. The default keyword takes
219
+ # precedence over the enable keyword if both are provided.
221
220
  #
222
221
  # @eos_version 4.13.7M
223
222
  #
@@ -229,6 +228,9 @@ module Rbeapi
229
228
  # @option :opts [String] :value The value to configure the description
230
229
  # to in the node's configuration.
231
230
  #
231
+ # @option :opts [Boolean] :enable If false then the command is
232
+ # negated. Default is true.
233
+ #
232
234
  # @option :opts [Boolean] :default Configure the interface description
233
235
  # using the default keyword
234
236
  #
@@ -239,14 +241,13 @@ module Rbeapi
239
241
  end
240
242
 
241
243
  ##
242
- # set_shutdown configures the adminstrative state of the specified
243
- # interface in the node. If the value is true, then the interface
244
- # is adminstratively disabled. If the value is false, then the
245
- # interface is adminstratively enabled. If no value is provided, then
246
- # the interface is configured with the no keyword which is equivalent
247
- # to false. If the default keyword is set to true, then the interface
248
- # shutdown value is configured using the default keyword. The default
249
- # keyword takes precedence over the value keyword if both are provided.
244
+ # set_shutdown configures the administrative state of the specified
245
+ # interface in the node. If the enable keyword is false, then the
246
+ # interface is administratively disabled. If the enable keyword is
247
+ # true, then the interface is administratively enabled. If the default
248
+ # keyword is set to true, then the interface shutdown value is configured
249
+ # using the default keyword. The default keyword takes precedence
250
+ # over the enable keyword if both are provided.
250
251
  #
251
252
  # @eos_version 4.13.7M
252
253
  #
@@ -255,15 +256,19 @@ module Rbeapi
255
256
  #
256
257
  # @param [hash] :opts Optional keyword arguments
257
258
  #
258
- # @option :opts [Boolean] :value True if the interface should be
259
- # administratively disabled or false if the interface should be
260
- # administratively enabled
259
+ # @option :opts [Boolean] :enable True if the interface should be
260
+ # administratively enabled or false if the interface should be
261
+ # administratively disabled.
261
262
  #
262
263
  # @option :opts [Boolean] :default Configure the interface shutdown
263
264
  # using the default keyword
264
265
  #
265
266
  # @return [Boolean] returns true if the command completed successfully
266
267
  def set_shutdown(name, opts = {})
268
+ fail 'set_shutdown has the value option set' if opts[:value]
269
+ # Shutdown semantics are opposite of enable semantics so invert enable
270
+ value = !opts[:enable]
271
+ opts.merge!(enable: value)
267
272
  commands = command_builder('shutdown', opts)
268
273
  configure_interface(name, commands)
269
274
  end
@@ -279,8 +284,8 @@ module Rbeapi
279
284
  DEFAULT_FORCED = false
280
285
 
281
286
  ##
282
- # get returns the specified Etherent interface resource hash that
283
- # respresents the interface's current configuration in th e node.
287
+ # get returns the specified Ethernet interface resource hash that
288
+ # represents the interface's current configuration in the node.
284
289
  #
285
290
  # The resource hash returned contains the following information:
286
291
  #
@@ -288,11 +293,11 @@ module Rbeapi
288
293
  # * type (string): will always be 'ethernet'
289
294
  # * description (string): the interface description value
290
295
  # * speed (string): the current speed setting for the interface speed
291
- # * forced (boolean): true if autonegotiation is disabled otherwise
296
+ # * forced (boolean): true if auto negotiation is disabled otherwise
292
297
  # false
293
298
  # * sflow (boolean): true if sflow is enabled on the interface
294
299
  # otherwise false
295
- # * flowcontrol_send (string): the inteface flowcontrol send value.
300
+ # * flowcontrol_send (string): the interface flowcontrol send value.
296
301
  # Valid values are 'on' or 'off'
297
302
  # * flowconrol_receive (string): the interface flowcontrol receive
298
303
  # value. Valid values are 'on' or 'off'
@@ -411,7 +416,7 @@ module Rbeapi
411
416
 
412
417
  ##
413
418
  # set_speed configures the interface speed and negotiation values on the
414
- # specified interface. If the value option is not provide, the speed
419
+ # specified interface. If the enable option is false the speed
415
420
  # setting is configured using the no keyword. If the default options is
416
421
  # set to true, then the speed setting is configured using the default
417
422
  # keyword. If both options are specified, the default keyword takes
@@ -427,7 +432,10 @@ module Rbeapi
427
432
  # @option [String] :value The value to configure the speed setting to in
428
433
  # the nodes running configuration
429
434
  #
430
- # @option [Boolean] :forced Specifies if autonegotiation should be
435
+ # @option :opts [Boolean] :enable If false then the command is
436
+ # negated. Default is true.
437
+ #
438
+ # @option [Boolean] :forced Specifies if auto negotiation should be
431
439
  # enabled (true) or disabled (false)
432
440
  #
433
441
  # @option :opts [Boolean] :default Configures the sflow value on the
@@ -437,6 +445,7 @@ module Rbeapi
437
445
  def set_speed(name, opts = {})
438
446
  value = opts[:value]
439
447
  forced = opts.fetch(:forced, false)
448
+ enable = opts.fetch(:enable, true)
440
449
  default = opts.fetch(:default, false)
441
450
 
442
451
  forced = 'forced' if forced
@@ -447,19 +456,18 @@ module Rbeapi
447
456
  when true
448
457
  cmds << 'default speed'
449
458
  when false
450
- cmds << value ? "speed #{forced} #{value}" : 'no speed'
459
+ cmds << enable ? "speed #{forced} #{value}" : 'no speed'
451
460
  end
452
461
  configure cmds
453
462
  end
454
463
 
455
464
  ##
456
465
  # set_sflow configures the administrative state of sflow on the
457
- # interface. Setting the value to true enables sflow on the interface
458
- # and setting the value to false disables sflow on the interface. If the
459
- # value is not provided, the sflow state is negated using the no keyword.
466
+ # interface. Setting the enable keyword to true enables sflow on the
467
+ # interface and setting enable to false disables sflow on the interface.
460
468
  # If the default keyword is set to true, then the sflow value is
461
469
  # defaulted using the default keyword. The default keyword takes
462
- # precedence over the value keyword
470
+ # precedence over the enable keyword
463
471
  #
464
472
  # @eos_version 4.13.7M
465
473
  #
@@ -468,38 +476,25 @@ module Rbeapi
468
476
  #
469
477
  # @param [Hash] :opts optional keyword arguments
470
478
  #
471
- # @option :opts [Boolean] :value Enables sflow if the value is true or
472
- # disables sflow on the interface if false
479
+ # @option :opts [Boolean] :enable Enables sflow if the value is true or
480
+ # disables sflow on the interface if false. Default is true.
473
481
  #
474
482
  # @option :opts [Boolean] :default Configures the sflow value on the
475
483
  # interface using the default keyword
476
484
  #
477
485
  # @return [Boolean] returns true if the command completed successfully
478
486
  def set_sflow(name, opts = {})
479
- value = opts[:value]
480
- default = opts.fetch(:default, false)
481
-
482
- case default
483
- when true
484
- command = 'default sflow enable'
485
- when false
486
- case value
487
- when true
488
- command = 'sflow enable'
489
- when false
490
- command = 'no sflow enable'
491
- end
492
- end
493
- configure_interface(name, command)
487
+ commands = command_builder('sflow enable', opts)
488
+ configure_interface(name, commands)
494
489
  end
495
490
 
496
491
  ##
497
492
  # set_flowcontrol configures the flowcontrol value either on or off for
498
493
  # the for the specified interface in the specified direction (either send
499
- # or receive). If the value is not provided then the configuration is
494
+ # or receive). If the enable keyword is false then the configuration is
500
495
  # negated using the no keyword. If the default keyword is set to true,
501
496
  # then the state value is defaulted using the default keyword. The
502
- # default keyword takes precedence over the value keyword
497
+ # default keyword takes precedence over the enable keyword
503
498
  #
504
499
  # @eos_version 4.13.7M
505
500
  #
@@ -514,6 +509,9 @@ module Rbeapi
514
509
  # @option :opts [String] :value Specifies the value to configure the
515
510
  # flowcontrol setting for. Valid values include on or off
516
511
  #
512
+ # @option :opts [Boolean] :enable If false then the command is
513
+ # negated. Default is true.
514
+ #
517
515
  # @option :opts [Boolean] :default Configures the flowcontrol value on
518
516
  # the interface using the default keyword
519
517
  #
@@ -539,6 +537,9 @@ module Rbeapi
539
537
  # @option :opts [String] :value Specifies the value to configure the
540
538
  # flowcontrol setting for. Valid values include on or off
541
539
  #
540
+ # @option :opts [Boolean] :enable If false then the command is
541
+ # negated. Default is true.
542
+ #
542
543
  # @option :opts [Boolean] :default Configures the flowcontrol value on
543
544
  # the interface using the default keyword
544
545
  #
@@ -563,6 +564,9 @@ module Rbeapi
563
564
  # @option :opts [String] :value Specifies the value to configure the
564
565
  # flowcontrol setting for. Valid values include on or off
565
566
  #
567
+ # @option :opts [Boolean] :enable If false then the command is
568
+ # negated. Default is true.
569
+ #
566
570
  # @option :opts [Boolean] :default Configures the flowcontrol value on
567
571
  # the interface using the default keyword
568
572
  #
@@ -622,7 +626,7 @@ module Rbeapi
622
626
 
623
627
  ##
624
628
  # parse_members scans the nodes running config and returns all of the
625
- # ethernet members for the port-channel interface specified. If the
629
+ # Ethernet members for the port-channel interface specified. If the
626
630
  # port-channel interface has no members configured, then this method will
627
631
  # assign an empty array as the value for members. The hash returned is
628
632
  # intended to be merged into the interface resource hash
@@ -637,7 +641,7 @@ module Rbeapi
637
641
  grpid = name.scan(/(?<=Port-Channel)\d+/)[0]
638
642
  command = "show port-channel #{grpid} all-ports"
639
643
  config = node.enable(command, format: 'text')
640
- values = config.first[:result]['output'].scan(%r{\bEthernet[\d\/]*})
644
+ values = config.first[:result]['output'].scan(/\bEthernet[^\s]+/)
641
645
  { members: values }
642
646
  end
643
647
  private :parse_members
@@ -673,7 +677,7 @@ module Rbeapi
673
677
  #
674
678
  # @api private
675
679
  #
676
- # @param [String] :config The interface configuration blcok to extract
680
+ # @param [String] :config The interface configuration block to extract
677
681
  # the minimum links value from
678
682
  #
679
683
  # @return [Hash<Symbol, Object>] resource hash attribute
@@ -685,7 +689,7 @@ module Rbeapi
685
689
 
686
690
  ##
687
691
  # parse_lacp_fallback scans the interface config block and returns the
688
- # confiured value of the lacp fallback attribute. If the value is not
692
+ # configured value of the lacp fallback attribute. If the value is not
689
693
  # configured, then the method will return the value of
690
694
  # DEFAULT_LACP_FALLBACK. The hash returned is intended to be merged into
691
695
  # the interface resource hash
@@ -722,11 +726,11 @@ module Rbeapi
722
726
 
723
727
  ##
724
728
  # set_minimum_links configures the minimum physical links up required to
725
- # consider the logical portchannel interface operationally up. If no
726
- # value is provided then the minimum-links is configured using the no
727
- # keyword argument. If the default keyword argument is provided and set
728
- # to true, the minimum-links value is defaulted using the default
729
- # keyword. The default keyword takes precedence over the value keyword
729
+ # consider the logical portchannel interface operationally up. If the
730
+ # enable keyword is false then the minimum-links is configured using the
731
+ # no keyword argument. If the default keyword argument is provided and
732
+ # set to true, the minimum-links value is defaulted using the default
733
+ # keyword. The default keyword takes precedence over the enable keyword
730
734
  # argument if both are provided.
731
735
  #
732
736
  # @eos_version 4.13.7M
@@ -740,6 +744,9 @@ module Rbeapi
740
744
  # configure the minimum-links to in the configuration. Valid values
741
745
  # are in the range of 1 to 16.
742
746
  #
747
+ # @option :opts [Boolean] :enable If false then the command is
748
+ # negated. Default is true.
749
+ #
743
750
  # @option :opts [Boolean] :default Configures the minimum links value on
744
751
  # the interface using the default keyword
745
752
  #
@@ -796,7 +803,7 @@ module Rbeapi
796
803
  # @param [String] :name The name of the port-channel interface to apply
797
804
  # the configuration to.
798
805
  #
799
- # @param [String] :member The name of the physical ethernet interface to
806
+ # @param [String] :member The name of the physical Ethernet interface to
800
807
  # add to the logical port-channel interface.
801
808
  #
802
809
  # @return [Boolean] returns true if the command completed successfully
@@ -816,7 +823,7 @@ module Rbeapi
816
823
  # @param [String] :name The name of the port-channel interface to apply
817
824
  # the configuration to.
818
825
  #
819
- # @param [String] :member The name of the physical ethernet interface to
826
+ # @param [String] :member The name of the physical Ethernet interface to
820
827
  # remove from the logical port-channel interface.
821
828
  #
822
829
  # @return [Boolean] returns true if the command completed successfully
@@ -859,11 +866,11 @@ module Rbeapi
859
866
 
860
867
  ##
861
868
  # set_lacp_fallback configures the lacp fallback mode for the
862
- # port-channel interface. If no value is provided, lacp fallback is
863
- # configured using the no keyword argument. If the default option is
869
+ # port-channel interface. If the enable keyword is false, lacp fallback
870
+ # is configured using the no keyword argument. If the default option is
864
871
  # specified and set to true, the lacp fallback value is configured using
865
872
  # the default keyword. The default keyword takes precedence over the
866
- # value keyword if both options are provided.
873
+ # enable keyword if both options are provided.
867
874
  #
868
875
  # @eos_version 4.13.7M
869
876
  #
@@ -876,23 +883,25 @@ module Rbeapi
876
883
  # the port-channel lacp fallback. Valid values are individual and
877
884
  # static
878
885
  #
886
+ # @option :opts [Boolean] :enable If false then the command is
887
+ # negated. Default is true.
888
+ #
879
889
  # @option :opts [Boolean] :default Configures the lacp fallback value on
880
890
  # the interface using the default keyword
881
891
  #
882
892
  # @return [Boolean] returns true if the command completed successfully
883
893
  def set_lacp_fallback(name, opts = {})
884
- opts[:value] = nil if opts[:value] == 'disabled'
885
894
  commands = command_builder('port-channel lacp fallback', opts)
886
895
  configure_interface(name, commands)
887
896
  end
888
897
 
889
898
  ##
890
- # set_lacp_timeout configures the lacp fallback timeou for the
891
- # port-channel interface. If no value is provided, lacp fallback timeout
892
- # is configured using the no keyword argument. If the default option is
893
- # specified and set to true, the lacp fallback timeout value is
899
+ # set_lacp_timeout configures the lacp fallback timeout for the
900
+ # port-channel interface. If the enable keyword is false, lacp fallback
901
+ # timeout is configured using the no keyword argument. If the default
902
+ # option is specified and set to true, the lacp fallback timeout value is
894
903
  # configured using the default keyword. The default keyword takes
895
- # precedence over the value keyword if both options are provided.
904
+ # precedence over the enable keyword if both options are provided.
896
905
  #
897
906
  # @eos_version 4.13.7M
898
907
  #
@@ -905,6 +914,9 @@ module Rbeapi
905
914
  # the port-channel lacp fallback timeout. Valid values range from
906
915
  # 1 to 100 seconds
907
916
  #
917
+ # @option :opts [Boolean] :enable If false then the command is
918
+ # negated. Default is true.
919
+ #
908
920
  # @option :opts [Boolean] :default Configures the lacp fallback timeout
909
921
  # value on the interface using the default keyword
910
922
  #
@@ -931,7 +943,7 @@ module Rbeapi
931
943
  #
932
944
  # * name: (String) The full interface name identifier
933
945
  # * type: (String) 'vxlan'
934
- # * descripition: (String) The configured interface description
946
+ # * description: (String) The configured interface description
935
947
  # * shutdown: (Boolean) The admin state of the interface
936
948
  # * source_interface: (String) The vxlan source-interface value
937
949
  # * multicast_group: (String) The vxlan multicast-group value
@@ -960,7 +972,7 @@ module Rbeapi
960
972
 
961
973
  ##
962
974
  # parse_source_interface scans the interface config block and returns the
963
- # value of the vxlan source-interace. If the source-interface is not
975
+ # value of the vxlan source-interface. If the source-interface is not
964
976
  # configured then the value of DEFAULT_SRC_INTF is used. The hash
965
977
  # returned is intended to be merged into the interface resource hash
966
978
  #
@@ -1016,7 +1028,7 @@ module Rbeapi
1016
1028
  # parse_flood_list scans the interface config block and returns the list
1017
1029
  # of configured VTEPs that comprise the flood list. If there are no
1018
1030
  # flood list values configured, the value will return DEFAULT_FLOOD_LIST.
1019
- # The returned value is intended to be merged into the inteface resource
1031
+ # The returned value is intended to be merged into the interface resource
1020
1032
  # Hash.
1021
1033
  #
1022
1034
  # @api private
@@ -1034,7 +1046,7 @@ module Rbeapi
1034
1046
 
1035
1047
  ##
1036
1048
  # parse_vlans scans the interface config block and returns the set of
1037
- # configured vlan to vni mappings. if there are no vlans configured, the
1049
+ # configured vlan to vni mappings. If there are no vlans configured, the
1038
1050
  # value will return an empty Hash
1039
1051
  #
1040
1052
  # @api private
@@ -1054,7 +1066,7 @@ module Rbeapi
1054
1066
 
1055
1067
  ##
1056
1068
  # Configures the vxlan source-interface to the specified value. This
1057
- # parameter should be a the interface identifier of the interface to act
1069
+ # parameter should be the interface identifier of the interface to act
1058
1070
  # as the source for all Vxlan traffic
1059
1071
  #
1060
1072
  # @param [String] :name The name of the interface to apply the
@@ -1063,12 +1075,14 @@ module Rbeapi
1063
1075
  # @param [Hash] :opt Optional keyword arguments
1064
1076
  #
1065
1077
  # @option :opts [String] :value Configures the vxlan source-interface to
1066
- # the spcified value. If no value is provided and the
1067
- # default keyword is not specified then the value is negated
1078
+ # the specified value
1079
+ #
1080
+ # @option :opts [Boolean] :enable If false then the command is
1081
+ # negated. Default is true.
1068
1082
  #
1069
1083
  # @option :opts [Boolean] :default Specifies whether or not the
1070
1084
  # multicast-group command is configured as default. The value of this
1071
- # option has a higher precedence than :value
1085
+ # option has a higher precedence than :enable
1072
1086
  #
1073
1087
  # @return [Boolean] Returns true if the commands complete successfully
1074
1088
  def set_source_interface(name = 'Vxlan1', opts = {})
@@ -1077,7 +1091,7 @@ module Rbeapi
1077
1091
  end
1078
1092
 
1079
1093
  ##
1080
- # Configures the vxlan multcast-group flood address to the specified
1094
+ # Configures the vxlan multicast-group flood address to the specified
1081
1095
  # value. The value should be a valid multicast address
1082
1096
  #
1083
1097
  # @param [String] :name The name of the interface to apply the
@@ -1085,9 +1099,11 @@ module Rbeapi
1085
1099
  #
1086
1100
  # @param [Hash] :opt Optional keyword arguments
1087
1101
  #
1088
- # @option :opts [String] :value Configures the mutlicast-group flood
1089
- # address to the specified value. If no value is provided and the
1090
- # default keyword is not specified then the value is negated
1102
+ # @option :opts [String] :value Configures the multicast-group flood
1103
+ # address to the specified value.
1104
+ #
1105
+ # @option :opts [Boolean] :enable If false then the command is
1106
+ # negated. Default is true.
1091
1107
  #
1092
1108
  # @option :opts [Boolean] :default Specifies whether or not the
1093
1109
  # multicast-group command is configured as default. The value of this
@@ -1101,7 +1117,7 @@ module Rbeapi
1101
1117
 
1102
1118
  ##
1103
1119
  # set_udp_port configures the Vxlan udp-port value in EOS for the
1104
- # specified interface name. If the value option is not provided then the
1120
+ # specified interface name. If the enable keyword is false then the
1105
1121
  # no keyword is used to configure the value. If the default option is
1106
1122
  # provided and set to true, then the default keyword is used. If both
1107
1123
  # options are provided, the default keyword will take precedence.
@@ -1116,6 +1132,9 @@ module Rbeapi
1116
1132
  # udp-port setting to. Valid values are in the range of 1024 to
1117
1133
  # 65535
1118
1134
  #
1135
+ # @option :opts [Boolean] :enable If false then the command is
1136
+ # negated. Default is true.
1137
+ #
1119
1138
  # @option :opts [Boolean] :default Configures the udp-port value on
1120
1139
  # the interface using the default keyword
1121
1140
  #