Class: OpenStack::Network::Network
- Defined in:
- lib/openstack/network/network.rb
Instance Attribute Summary collapse
-
#admin_state_up ⇒ Object
readonly
Returns the value of attribute admin_state_up.
-
#external ⇒ Object
readonly
Returns the value of attribute external.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#shared ⇒ Object
readonly
Returns the value of attribute shared.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#subnets ⇒ Object
readonly
Returns the value of attribute subnets.
-
#tenant_id ⇒ Object
readonly
Returns the value of attribute tenant_id.
Instance Method Summary collapse
-
#initialize(net_info = {}) ⇒ Network
constructor
A new instance of Network.
Constructor Details
#initialize(net_info = {}) ⇒ Network
Returns a new instance of Network.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/openstack/network/network.rb', line 13 def initialize(net_info = {}) @id = net_info['id'] @name = net_info['name'] @admin_state_up = net_info['admin_state_up'] @status = net_info['status'] @subnets = net_info['subnets'] @shared = net_info['shared'] @external = net_info['router:external'] @tenant_id = net_info['tenant_id'] end |
Instance Attribute Details
#admin_state_up ⇒ Object (readonly)
Returns the value of attribute admin_state_up.
6 7 8 |
# File 'lib/openstack/network/network.rb', line 6 def admin_state_up @admin_state_up end |
#external ⇒ Object (readonly)
Returns the value of attribute external.
10 11 12 |
# File 'lib/openstack/network/network.rb', line 10 def external @external end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/openstack/network/network.rb', line 4 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/openstack/network/network.rb', line 5 def name @name end |
#shared ⇒ Object (readonly)
Returns the value of attribute shared.
9 10 11 |
# File 'lib/openstack/network/network.rb', line 9 def shared @shared end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/openstack/network/network.rb', line 7 def status @status end |
#subnets ⇒ Object (readonly)
Returns the value of attribute subnets.
8 9 10 |
# File 'lib/openstack/network/network.rb', line 8 def subnets @subnets end |
#tenant_id ⇒ Object (readonly)
Returns the value of attribute tenant_id.
11 12 13 |
# File 'lib/openstack/network/network.rb', line 11 def tenant_id @tenant_id end |