openstack.network.v2.subnet¶
The Subnet Class¶
The Subnet class inherits from Resource.
-
class
openstack.network.v2.subnet.Subnet(attrs=None, loaded=False)¶ Construct a Resource to interact with a service’s REST API.
The Resource class offers two class methods to construct resource objects, which are preferrable to entering through this initializer. See
Resource.new()andResource.existing().Parameters: - attrs (dict) – The attributes to set when constructing this Resource.
- loaded (bool) –
Trueif this Resource exists on the server,Falseif it does not.
-
allocation_pools= None¶ The start and end addresses for the allocation pools.
-
cidr= None¶ The CIDR.
-
dns_nameservers= None¶ A list of DNS nameservers.
-
enable_dhcp= None¶ Set to
Trueif DHCP is enabled andFalseif DHCP is disabled. Type: bool
-
gateway_ip= None¶ The gateway IP address.
-
host_routes= None¶ A list of host routes.
-
ip_version= None¶ The IP version, which is
4or6.
-
ipv6_address_mode= None¶ The IPv6 address modes which are ‘dhcpv6-stateful’, ‘dhcpv6-stateless’, or ‘SLAAC’
-
ipv6_ra_mode= None¶ The IPv6 router advertisements modes
-
name= None¶ The subnet name.
-
network_id= None¶ The ID of the attached network.
-
project_id= None¶ The ID of the project this subnet is associated with.
-
subnet_pool_id= None¶ The subnet pool ID from which to obtain a CIDR.