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
# 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"]
  @tenant_id = net_info["tenant_id"]
end

Instance Attribute Details

#admin_state_upObject (readonly)

Returns the value of attribute admin_state_up.



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

def admin_state_up
  @admin_state_up
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#sharedObject (readonly)

Returns the value of attribute shared.



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

def shared
  @shared
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

#subnetsObject (readonly)

Returns the value of attribute subnets.



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

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