Class: OpenStack::Network::Port

Inherits:
Object
  • Object
show all
Defined in:
lib/openstack/network/port.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(port_hash = {}) ⇒ Port

Returns a new instance of Port.



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/openstack/network/port.rb', line 16

def initialize(port_hash={})
  @id = port_hash["id"]
  @network_id = port_hash["network_id"]
  @name = port_hash["name"]
  @admin_state_up = port_hash["admin_state_up"]
  @status = port_hash["status"]
  @mac_address = port_hash["mac_address"]
  @fixed_ips = port_hash["fixed_ips"]
  @device_id = port_hash["device_id"]
  @device_owner = port_hash["device_owner"]
  @tenant_id = port_hash["tenant_id"]
end

Instance Attribute Details

#admin_state_upObject (readonly)

Returns the value of attribute admin_state_up.



8
9
10
# File 'lib/openstack/network/port.rb', line 8

def admin_state_up
  @admin_state_up
end

#device_idObject (readonly)

Returns the value of attribute device_id.



12
13
14
# File 'lib/openstack/network/port.rb', line 12

def device_id
  @device_id
end

#device_ownerObject (readonly)

Returns the value of attribute device_owner.



13
14
15
# File 'lib/openstack/network/port.rb', line 13

def device_owner
  @device_owner
end

#fixed_ipsObject (readonly)

Returns the value of attribute fixed_ips.



11
12
13
# File 'lib/openstack/network/port.rb', line 11

def fixed_ips
  @fixed_ips
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/openstack/network/port.rb', line 5

def id
  @id
end

#mac_addressObject (readonly)

Returns the value of attribute mac_address.



10
11
12
# File 'lib/openstack/network/port.rb', line 10

def mac_address
  @mac_address
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/openstack/network/port.rb', line 7

def name
  @name
end

#network_idObject (readonly)

Returns the value of attribute network_id.



6
7
8
# File 'lib/openstack/network/port.rb', line 6

def network_id
  @network_id
end

#statusObject (readonly)

Returns the value of attribute status.



9
10
11
# File 'lib/openstack/network/port.rb', line 9

def status
  @status
end

#tenant_idObject (readonly)

Returns the value of attribute tenant_id.



14
15
16
# File 'lib/openstack/network/port.rb', line 14

def tenant_id
  @tenant_id
end