Method: Rbeapi::Api::OspfInterfaces#set_network_type

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

#set_network_type(name, opts = {}) ⇒ Boolean

set_network_type sets network type with options.

Options Hash (opts):

  • value (String)

    The point-to-point value.

  • enable (Boolean)

    If false then the command is negated. Default is true.

  • default (Boolean)

    Configure the ip ospf network to default.



443
444
445
446
447
448
# File 'lib/rbeapi/api/ospf.rb', line 443

def set_network_type(name, opts = {})
  value = opts[:value]
  return false unless [nil, 'point-to-point'].include?(value)
  cmd = command_builder('ip ospf network', opts)
  configure_interface(name, cmd)
end