Class: VCloudSdk::NIC

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/ruby_vcloud_sdk/nic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entity_xml, is_primary) ⇒ NIC

Returns a new instance of NIC.



11
12
13
14
# File 'lib/ruby_vcloud_sdk/nic.rb', line 11

def initialize(entity_xml, is_primary)
  @entity_xml = entity_xml
  @is_primary = is_primary
end

Instance Attribute Details

#is_primaryObject (readonly)

Returns the value of attribute is_primary.



9
10
11
# File 'lib/ruby_vcloud_sdk/nic.rb', line 9

def is_primary
  @is_primary
end

Instance Method Details

#is_connectedObject



20
21
22
# File 'lib/ruby_vcloud_sdk/nic.rb', line 20

def is_connected
  @entity_xml.is_connected == "true"
end

#network_connection_indexObject Also known as: nic_index



16
17
18
# File 'lib/ruby_vcloud_sdk/nic.rb', line 16

def network_connection_index
  @entity_xml.network_connection_index.to_i
end