Method: Rbeapi::Api::Ipinterfaces#create

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

#create(name) ⇒ Boolean

create will create a new IP interface on the node. If the ip interface already exists in the configuration, this method will still return successful. This method will cause an existing layer 2 interface (switchport) to be deleted if it exists in the node’s configuration.

Parameters:

  • :name (String)

    The full interface name of the port to create the logical interface on. The name must be the full interface identifier

Returns:

  • (Boolean)

    returns true if the commands complete successfully



169
170
171
# File 'lib/rbeapi/api/ipinterfaces.rb', line 169

def create(name)
  configure(["interface #{name}", 'no switchport'])
end