Class: OpenStack::Network::Subnet
- Defined in:
- lib/openstack/network/subnet.rb
Instance Attribute Summary collapse
-
#allocation_pools ⇒ Object
readonly
Returns the value of attribute allocation_pools.
-
#cidr ⇒ Object
readonly
Returns the value of attribute cidr.
-
#dns_nameservers ⇒ Object
readonly
Returns the value of attribute dns_nameservers.
-
#enable_dhcp ⇒ Object
readonly
Returns the value of attribute enable_dhcp.
-
#gateway_ip ⇒ Object
readonly
Returns the value of attribute gateway_ip.
-
#host_routes ⇒ Object
readonly
Returns the value of attribute host_routes.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#ip_version ⇒ Object
readonly
Returns the value of attribute ip_version.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#network_id ⇒ Object
readonly
Returns the value of attribute network_id.
-
#tenant_id ⇒ Object
readonly
Returns the value of attribute tenant_id.
Instance Method Summary collapse
-
#initialize(subnet_hash = {}) ⇒ Subnet
constructor
A new instance of Subnet.
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_pools ⇒ Object (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 |
#cidr ⇒ Object (readonly)
Returns the value of attribute cidr.
9 10 11 |
# File 'lib/openstack/network/subnet.rb', line 9 def cidr @cidr end |
#dns_nameservers ⇒ Object (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_dhcp ⇒ Object (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_ip ⇒ Object (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_routes ⇒ Object (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 |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/openstack/network/subnet.rb', line 5 def id @id end |
#ip_version ⇒ Object (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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/openstack/network/subnet.rb', line 7 def name @name end |
#network_id ⇒ Object (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_id ⇒ Object (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 |