Method: Rbeapi::Api::Bgp#set_shutdown

Defined in:
lib/rbeapi/api/bgp.rb

#set_shutdown(opts = {}) ⇒ Boolean

set_shutdown configures the administrative state for the global BGP routing process. The value option is not used by this method.

Commands

router bgp <bgp_as>
  {no | default} shutdown

Parameters:

  • opts (hash) (defaults to: {})

    Optional keyword arguments.

Options Hash (opts):

  • enable (Boolean)

    If enable is true then the BGP routing process is administratively enabled and if enable is False then the BGP routing process is administratively disabled.

  • default (Boolean)

    Configure the router-id using the default keyword.

Returns:

  • (Boolean)

    Returns true if the command complete successfully.



343
344
345
346
347
348
349
# File 'lib/rbeapi/api/bgp.rb', line 343

def set_shutdown(opts = {})
  raise 'set_shutdown has the value option set' if opts[:value]
  # Shutdown semantics are opposite of enable semantics so invert enable
  value = !opts[:enable]
  opts[:enable] = value
  configure_bgp(command_builder('shutdown', opts))
end