Class: OpenStack::Network::Network

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_upObject (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

#externalObject (readonly)

Returns the value of attribute external.



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

def external
  @external
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#sharedObject (readonly)

Returns the value of attribute shared.



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

def shared
  @shared
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

#subnetsObject (readonly)

Returns the value of attribute subnets.



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

def subnets
  @subnets
end

#tenant_idObject (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