otcextensions.sdk.vpc.v1.subnet

The VPC Subnet Class

The Subnet class inherits from Resource.

class otcextensions.sdk.vpc.v1.subnet.Subnet(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key: ty.Optional[str] = 'subnet'

Singular form of key for resource.

resources_key: ty.Optional[str] = 'subnets'

Plural form of key for resource.

base_path: str = '/v1/%(project_id)s/subnets'

The base part of the URI for this resource.

allow_create = True

Allow create operation for this resource.

allow_fetch = True

Allow get operation for this resource.

allow_commit = True

Allow update operation for this resource.

allow_delete = True

Allow delete operation for this resource.

allow_list = True

Allow list operation for this resource.

cidr

Specifies the subnet CIDR block.

gateway_ip

Specifies the gateway of the subnet.

dhcp_enable

Specifies whether DHCP is enabled for the subnet.

primary_dns

Specifies the IP address of DNS server 1 on the subnet.

secondary_dns

Specifies the IP address of DNS server 2 on the subnet.

dns_list

Specifies the DNS server address list of a subnet. This field is required if use more than two DNS servers.

availability_zone

Specifies the AZ to which the subnet belongs

vpc_id

Specifies the ID of the VPC to which the subnet belongs.

extra_dhcp_opts

Specifies the NTP server address configured for the subnet.