Method: Rbeapi::Api::BaseInterface#set_shutdown
- Defined in:
- lib/rbeapi/api/interfaces.rb
#set_shutdown(name, opts = {}) ⇒ Boolean
set_shutdown configures the administrative state of the specified interface in the node. If the enable keyword is false, then the interface is administratively disabled. If the enable keyword is true, then the interface is administratively enabled. If the default keyword is set to true, then the interface shutdown value is configured using the default keyword. The default keyword takes precedence over the enable keyword if both are provided.
410 411 412 413 414 415 416 417 |
# File 'lib/rbeapi/api/interfaces.rb', line 410 def set_shutdown(name, 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 commands = command_builder('shutdown', opts) configure_interface(name, commands) end |