Class: OpenStack::Network::Subnet

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subnet_hash = {}) ⇒ Subnet

Returns a new instance of Subnet.



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

def initialize(subnet_hash={})
  @id = subnet_hash["id"]
  @network_id = subnet_hash["network_id"]
  @name = subnet_hash["name"]
  @ip_version = subnet_hash["ip_version"]
  @cidr = subnet_hash["cidr"]
  @gateway_ip = subnet_hash["gateway_ip"]
  @dns_nameservers = subnet_hash["dns_nameservers"]
  @allocation_pools = subnet_hash["allocation_pools"]
  @host_routes = subnet_hash["host_routes"]
  @enable_dhcp = subnet_hash["enable_dhcp"]
  @tenant_id = subnet_hash["tenant_id"]
end

Instance Attribute Details

#allocation_poolsObject (readonly)

Returns the value of attribute allocation_pools.



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

def allocation_pools
  @allocation_pools
end

#cidrObject (readonly)

Returns the value of attribute cidr.



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

def cidr
  @cidr
end

#dns_nameserversObject (readonly)

Returns the value of attribute dns_nameservers.



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

def dns_nameservers
  @dns_nameservers
end

#enable_dhcpObject (readonly)

Returns the value of attribute enable_dhcp.



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

def enable_dhcp
  @enable_dhcp
end

#gateway_ipObject (readonly)

Returns the value of attribute gateway_ip.



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

def gateway_ip
  @gateway_ip
end

#host_routesObject (readonly)

Returns the value of attribute host_routes.



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

def host_routes
  @host_routes
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#ip_versionObject (readonly)

Returns the value of attribute ip_version.



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

def ip_version
  @ip_version
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#network_idObject (readonly)

Returns the value of attribute network_id.



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

def network_id
  @network_id
end

#tenant_idObject (readonly)

Returns the value of attribute tenant_id.



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

def tenant_id
  @tenant_id
end