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.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/openstack/network/port.rb', line 19

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"]
  @qos_policy_id = port_hash["qos_policy_id"]
  @allowed_address_pairs = port_hash["allowed_address_pairs"]
  @updated_at = port_hash["updated_at"]
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

#allowed_address_pairsObject (readonly)

Returns the value of attribute allowed_address_pairs.



16
17
18
# File 'lib/openstack/network/port.rb', line 16

def allowed_address_pairs
  @allowed_address_pairs
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

#qos_policy_idObject (readonly)

Returns the value of attribute qos_policy_id.



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

def qos_policy_id
  @qos_policy_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

#updated_atObject (readonly)

Returns the value of attribute updated_at.



17
18
19
# File 'lib/openstack/network/port.rb', line 17

def updated_at
  @updated_at
end