[{"label":"Latest (4.4.0)","version":"latest"},{"version":"4.3.1"},{"link":"https://developer.vmware.com/apis/1126/vmware-cloud-foundation","version":"4.3"},{"link":"https://developer.vmware.com/apis/1077/vmware-cloud-foundation","version":"4.2"},{"link":"https://developer.vmware.com/apis/1032/vmware-cloud-foundation","version":"4.1"},{"link":"https://developer.vmware.com/apis/1002/vmware-cloud-foundation","version":"4.0.1"},{"link":"https://developer.vmware.com/apis/921/vmware-cloud-foundation","version":"4.0"},{"link":"https://developer.vmware.com/apis/925/vmware-cloud-foundation","version":"3.10"},{"link":"https://developer.vmware.com/apis/891/vmware-cloud-foundation","version":"3.9.1"},{"link":"https://developer.vmware.com/apis/723/vmware-cloud-foundation","version":"3.9.0"},{"link":"https://developer.vmware.com/apis/711/vmware-cloud-foundation","version":"3.8.1"},{"link":"https://developer.vmware.com/apis/685/vmware-cloud-foundation","version":"3.8"}]
vcf
VMware Cloud Foundation API Reference Guide

Network Pools

APIs for managing Network Pools

1. Create a Network Pool

  • Used to create a Network pool in the system. The added network pool would be used during domain deployments, host commission/expansion flows.

  • If a network pool which is already added before is added, you will get an error with HTTP status 400.

  • If a malformed network pool is added (payload for network parameters, name which is already exist), you will get an error.

1.1. Prerequisites

The following data is required

  • Name

  • List of networks associated with network pool in which each network has

    • Network type - It can be VSAN, VMOTION or NFS Type.

    • VLAN ID - Valid Vlan id range is 0 to 4096.

    • MTU - Valid MTU range is 1500 to 9216.

    • Subnet - Networks of diferent types (e.g. VSAN/VMOTION/NFS) must not have overlapping subnets

    • Subnet mask

    • gateway - The gateway defined for the specified subnet

    • List of IP address ranges - the start and end IP address of each IP Pool should be part of the subnet

1.2. Steps

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "name" : "engineering-networkpool",
  "networks" : [ {
    "type" : "VSAN",
    "vlanId" : 3002,
    "mtu" : 9001,
    "subnet" : "192.168.8.0",
    "mask" : "255.255.252.0",
    "gateway" : "192.168.8.1",
    "ipPools" : [ {
      "start" : "192.168.8.5",
      "end" : "192.168.8.8"
    } ]
  } ]
}'

HTTP Request

POST /v1/network-pools HTTP/1.1
Content-Type: application/json
Content-Length: 304
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "name" : "engineering-networkpool",
  "networks" : [ {
    "type" : "VSAN",
    "vlanId" : 3002,
    "mtu" : 9001,
    "subnet" : "192.168.8.0",
    "mask" : "255.255.252.0",
    "gateway" : "192.168.8.1",
    "ipPools" : [ {
      "start" : "192.168.8.5",
      "end" : "192.168.8.8"
    } ]
  } ]
}

HTTP Response

HTTP/1.1 201 Created
Location: /v1/network-pools/76d74e0d-c044-46df-bbd3-561b291dcb9b
Content-Type: application/json
Content-Length: 165

{
  "id" : "76d74e0d-c044-46df-bbd3-561b291dcb9b",
  "name" : "engineering-networkpool",
  "networks" : [ {
    "id" : "46115f0b-8838-4205-a1ba-a6a6124f34d6"
  } ]
}

2. Get the Network Pools

2.1. Prerequisites

None

2.2. Steps

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/network-pools HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 375

{
  "elements" : [ {
    "id" : "500e45b8-82dc-4c25-a918-543d317b2fc2",
    "name" : "engineering-networkpool",
    "networks" : [ {
      "id" : "56e99b81-030c-4b67-ad55-c17e50a8ce72"
    } ]
  }, {
    "id" : "451e01cc-d55a-46f3-a5ec-5a2d5abf8d9e",
    "name" : "finance-networkpool",
    "networks" : [ {
      "id" : "491cc9f9-293e-4d43-8d56-5c4aed7b6d77"
    } ]
  } ]
}

3. Get a Network Pool

3.1. Prerequisites

The following data is required

  • ID of the network pool

3.2. Steps

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools/627cab6b-219e-4ee5-b7a1-4fa33a68f084' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/network-pools/627cab6b-219e-4ee5-b7a1-4fa33a68f084 HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 165

{
  "id" : "627cab6b-219e-4ee5-b7a1-4fa33a68f084",
  "name" : "engineering-networkpool",
  "networks" : [ {
    "id" : "53fcce0f-0431-459e-876f-d85058652f3c"
  } ]
}

4. Get a Network of a Network Pool

4.1. Prerequisites

The following data is required

  • ID of the network

4.2. Steps

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools/4dcd1ed6-037d-430d-9633-af0b066db9ed/networks/02639e0d-09ff-42f3-8124-72dc4eadbe7b' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 270

{
  "id" : "02639e0d-09ff-42f3-8124-72dc4eadbe7b",
  "type" : "VSAN",
  "vlanId" : 3002,
  "mtu" : 9216,
  "subnet" : "192.168.8.0",
  "mask" : "255.255.252.0",
  "gateway" : "192.168.8.1",
  "ipPools" : [ {
    "start" : "192.168.8.5",
    "end" : "192.168.8.8"
  } ]
}

5. Rename a Network Pool

5.1. Prerequisites

  • Network pool must exist.

5.2. Steps

  • Get the ID of the network pool. Filter the response by the network pool’s current name to get the corresponding ID.

Tip : Get the Network Pools

  • Create a network pool update spec. Create a JSON with the “name” field containing the desired new network pool name.

Tip : NetworkPoolUpdateSpec

  • Invoke the network pool rename (update) task using the input spec and network pool ID.

Note : Running the updateNetworkPool API will ensure that the requested new name is valid. The API call will fail if the requested new name is invalid.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools/7b202441-6e6f-4c20-b88f-f7450280c26f' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "name" : "new_name"
}'

HTTP Request

PATCH /v1/network-pools/7b202441-6e6f-4c20-b88f-f7450280c26f HTTP/1.1
Content-Type: application/json
Content-Length: 25
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "name" : "new_name"
}

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 165

{
  "id" : "7b202441-6e6f-4c20-b88f-f7450280c26f",
  "name" : "engineering-networkpool",
  "networks" : [ {
    "id" : "ce907cb9-e278-4b6e-84fb-ffb24669d221"
  } ]
}

6. Delete a Network Pool

  • Used to delete a Network pool.

  • Deleting a networkpool which is being used, will give an error.

  • Deleting a networkpool which does not exist, will give a HTTP response code 404.

6.1. Prerequisites

The following data is required

  • ID of the network pool

6.2. Steps

  • Invoke the API

Tip : Refer to: Get the Network Pools to retrieve all network pools in the system and use the ID of network pool to be deleted.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools/c965b176-01dc-4a54-b60c-47400465a28b' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

DELETE /v1/network-pools/c965b176-01dc-4a54-b60c-47400465a28b HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 204 No Content

7. Add an IP Pool to a Network of a Network Pool

7.1. Prerequisites

The following data is required

  • ID of the network pool

Tip : Refer to: Get the Network Pools

  • ID of the network.

Tip : Refer to: Get a Network of a Network Pool

  • The start and end IP addresses for the IP pool

7.2. Steps

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools/baa47936-36fc-4a3b-bc09-77c4b293349c/networks/ea25d8a9-916e-4818-b48b-e8ad435a1a69/ip-pools' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "start" : "192.168.8.5",
  "end" : "192.168.8.8"
}'

HTTP Request

POST /v1/network-pools/baa47936-36fc-4a3b-bc09-77c4b293349c/networks/ea25d8a9-916e-4818-b48b-e8ad435a1a69/ip-pools HTTP/1.1
Content-Type: application/json
Content-Length: 54
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "start" : "192.168.8.5",
  "end" : "192.168.8.8"
}

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 270

{
  "id" : "83eae557-a26e-4bea-8c5e-8f3fa72d86d0",
  "type" : "VSAN",
  "vlanId" : 3002,
  "mtu" : 9216,
  "subnet" : "192.168.8.0",
  "mask" : "255.255.252.0",
  "gateway" : "192.168.8.1",
  "ipPools" : [ {
    "start" : "192.168.8.5",
    "end" : "192.168.8.8"
  } ]
}

8. Delete an IP Pool from a Network of a Network Pool

8.1. Prerequisites

The following data is required

  • ID of the IP pool

8.2. Steps

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools/6a6429cf-d2f2-47b6-a7d6-bb3c35f9a407/networks/cc0f1f96-ff7e-42b8-8171-b7e93e28f93a/ip-pools' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "start" : "192.168.8.5",
  "end" : "192.168.8.8"
}'

HTTP Request

DELETE /v1/network-pools/6a6429cf-d2f2-47b6-a7d6-bb3c35f9a407/networks/cc0f1f96-ff7e-42b8-8171-b7e93e28f93a/ip-pools HTTP/1.1
Content-Type: application/json
Content-Length: 54
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "start" : "192.168.8.5",
  "end" : "192.168.8.8"
}

HTTP Response

HTTP/1.1 204 No Content

Last updated 2021-11-03 05:03:41 PDT

Operations



[{"label":"Latest (4.4.0)","version":"latest"},{"version":"4.3.1"},{"link":"https://developer.vmware.com/apis/1126/vmware-cloud-foundation","version":"4.3"},{"link":"https://developer.vmware.com/apis/1077/vmware-cloud-foundation","version":"4.2"},{"link":"https://developer.vmware.com/apis/1032/vmware-cloud-foundation","version":"4.1"},{"link":"https://developer.vmware.com/apis/1002/vmware-cloud-foundation","version":"4.0.1"},{"link":"https://developer.vmware.com/apis/921/vmware-cloud-foundation","version":"4.0"},{"link":"https://developer.vmware.com/apis/925/vmware-cloud-foundation","version":"3.10"},{"link":"https://developer.vmware.com/apis/891/vmware-cloud-foundation","version":"3.9.1"},{"link":"https://developer.vmware.com/apis/723/vmware-cloud-foundation","version":"3.9.0"},{"link":"https://developer.vmware.com/apis/711/vmware-cloud-foundation","version":"3.8.1"},{"link":"https://developer.vmware.com/apis/685/vmware-cloud-foundation","version":"3.8"}]
vcf
Feedback

Was this page helpful?