Method: Rbeapi::Api::Bgp#set_maximum_paths
- Defined in:
- lib/rbeapi/api/bgp.rb
#set_maximum_paths(maximum_paths, maximum_ecmp_paths, opts = {}) ⇒ Boolean
set_maximum_paths sets the maximum number of equal cost paths and the maximum number of installed ECMP routes.
Commands
router bgp <bgp_as>
{no | default}
maximum-paths <maximum_paths> [ecmp <maximum_ecmp_paths>]
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 |
# File 'lib/rbeapi/api/bgp.rb', line 374 def set_maximum_paths(maximum_paths, maximum_ecmp_paths, opts = {}) enable = opts.fetch(:enable, true) default = opts[:default] || false case default when true cmd = 'default maximum-paths' when false if enable cmd = "maximum-paths #{maximum_paths} ecmp #{maximum_ecmp_paths}" else cmd = 'no maximum-paths' end end configure_bgp(cmd) end |