Class: EthernetInterface

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/antfarm/ethernet_interface.rb

Overview

EthernetInterface class that wraps the ethernet_interfaces table in the ANTFARM database.

  • belongs to a layer 2 interface

The node_name and node_device_type attributes are only applicable when an existing node is not specified.

The node and layer2_interface_media_type attributes are only applicable when an existing layer 2 interface is not specified.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#layer2_interface_media_type=(value) ⇒ Object (writeonly)

Media type of the layer 2 interface automatically creted for this ethernet interface.



39
40
41
# File 'lib/antfarm/ethernet_interface.rb', line 39

def layer2_interface_media_type=(value)
  @layer2_interface_media_type = value
end

#node=(value) ⇒ Object (writeonly)

Existing node the layer 2 interface automatically created for this ethernet interface should belong to.



43
44
45
# File 'lib/antfarm/ethernet_interface.rb', line 43

def node=(value)
  @node = value
end

#node_device_type=(value) ⇒ Object (writeonly)

Device type of the node automatically created by the layer 2 interface created for this ethernet interface.



51
52
53
# File 'lib/antfarm/ethernet_interface.rb', line 51

def node_device_type=(value)
  @node_device_type = value
end

#node_name=(value) ⇒ Object (writeonly)

Name of the node automatically created by the layer 2 interface created for this ethernet interface.



47
48
49
# File 'lib/antfarm/ethernet_interface.rb', line 47

def node_name=(value)
  @node_name = value
end

Instance Method Details

#to_labelObject

This is for ActiveScaffold



63
64
65
# File 'lib/antfarm/ethernet_interface.rb', line 63

def to_label #:nodoc:
  return address
end