Description

  There is minimum length of time for you to use it. So you can't delete it imediately after being created.
This type of subnet requres the number of IPs.
When you set up VM interface, apply "/23" for it.

※Specify the bitmask to match the number of IPs you want to add.

 /32 =>1IP
 /31 =>2IPs
 /30 =>4IPs
 /29 =>8IPs
 /28 =>16IPs

example : For 100.0.0.8/30,
10.0.0.8, 10.0.0.9, 10.0.0.10, 10.0.0.10, 10.0.0.11 are available.
Subnet is for summarizing the number. You can use your network adress and broadcast address.

Request URL

Network API v2.0

POST /v2.0/allocateips

Request Paramters

Parameter Value Style Description
X-Auth-Token User Token header
bitmask 28~32 plain Showing subnet masks as a bit. It can be used when specifying the number of Global IP.

Request Json

{
    "allocateip": {
        "bitmask": "28"
    }
}

Normal response codes

201

Example

curl -i -X POST \
-H "Accept: application/json" \
-H "X-Auth-Token: 0925897a3d4543218ff0dcd2bb378a8e" \
-d '{"allocateip": {"bitmask": "28"}}' \
https://networking.tyo1.cloud.z.com/v2.0/allocateips
HTTP/1.1 201 Created
Server: openresty/1.7.10.1
Date: Fri, 08 May 2015 11:47:09 GMT
Content-Type: application/json
Content-Length: 425
Connection: keep-alive

{
  "subnet": {
    "name": "add-157-7-110-112-28",
    "enable_dhcp": false,
    "network_id": "4f1733ec-daa5-4969-bf99-cf248151a40a",
    "tenant_id": "22394afc818d471ca2f0308c06ae7460",
    "dns_nameservers": [],
    "gateway_ip": "157.7.110.1",
    "ipv6_ra_mode": null,
    "allocation_pools": [
      {
        "start": "157.7.110.112",
        "end": "157.7.110.127"
      }
    ],
    "host_routes": [],
    "ip_version": 4,
    "ipv6_address_mode": null,
    "cidr": "157.7.110.112/28",
    "id": "5029d907-26ec-41d8-849f-a3e4ab6d3b21"
  }
}