• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Subnets
  6. Introduction

Introduction

Object

This interface is used to manage and perform operations on subnet resources, including querying subnets, creating a subnet, querying a specified subnet, deleting a subnet, and updating a subnet.

Object Model

Table 1 subnet object

Attribute

Type

CRUD

Default Value

Restriction

Description

id

Uuid-str

R

Automatically generated

N/A

Specifies the subnet ID.

name

String(255)

CRU

N/A

N/A

Specifies the subnet name.

ip_version

Int

CR

N/A

The value can only be 4 or 6.

Specifies an IP version.

Only IPv4 is supported.

ipv6_address_mode

String

CR

N/A

The value can only be dhcpv6-stateful, dhcpv6-stateless, or slaac.

Specifies the IPv6 addressing mode.

This attribute is not supported.

ipv6_ra_mode

String

CR

N/A

The value can only be dhcpv6-stateful, dhcpv6-stateless, or slaac.

Specifies the IPv6 route broadcast mode.

This attribute is not supported.

network_id

Uuid-str

CR

N/A

The value must be an existing network ID.

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

cidr

String(64)

CR

N/A

The value must be in valid CIDR format.

Specifies the CIDR format.

Only the addresses in the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 network segments are supported. In addition, the subnet mask cannot be greater than 24.

gateway_ip

String(64)

CRUD

First IP address in a CIDR block

The value must be a valid IP address or null.

Specifies a gateway IP address. The value cannot conflict with an IP address in the allocation_pools range. If the parameter value is changed, this change does not take effect in the l3 plug-in delivered with FusionSphere OpenStack V100R005C10.

allocation_pools

List(allocation_pool)

CR

All IP addresses in a CIDR block excepting the gateway and broadcast addresses

The start and end IP addresses must be valid.

Specifies the available IP address pool. For details about the allocation_pool object, see Table 2.

For example, [ { "start": "10.0.0.2", "end": "10.0.0.254"} ].

When updating an IP address pool, the allocation_pool value can contain neither gateway nor broadcast IP addresses.

dns_nameservers

List(String)

CRU

N/A

A maximum of five DNS server addresses are supported.

Specifies the DNS server address.

For example, "dns_nameservers": ["8.8.8.8","8.8.4.4"].

host_routes

List(host_route)

CRU

N/A

A maximum of 20 static VM routes are supported.

Specifies the static VM routes. For details, see Table 3.

Static routes are not supported, and entered information will be ignored.

tenant_id

String(255)

CR

N/A

N/A

Specifies the tenant ID. Only the administrator can specify tenant_id of other tenants.

enable_dhcp

Bool

CRU

true

The value can only be true or false.

Specifies whether to enable the DHCP function. Value false indicates that the DHCP function is not enabled.

The value can only be true.

Table 2 allocation_pool object

Parameter

Type

Restriction

Mandatory

Remarks

start

String(64)

The value must be a valid IP address.

No

Specifies the start IP address of a network pool.

end

String(64)

The value must be a valid IP address.

No

Specifies the end IP address of a network pool.

Table 3 host_route object

Parameter

Type

Restriction

Mandatory

Remarks

destination

String(64)

The value must be in valid CIDR format.

No

Specifies the destination subnet of a route.

nexthop

String(64)

The value must be a valid IP address.

No

Specifies the next-hop IP address of a route.