Network Pools APIs

Network Pools APIs

APIs for managing Network Pools

Table of Contents

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 API

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 API

  • 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/8f88f54d-c25a-4c9e-9c1d-b155445cc1ca
Content-Type: application/json
Content-Length: 165

{
  "id" : "8f88f54d-c25a-4c9e-9c1d-b155445cc1ca",
  "name" : "engineering-networkpool",
  "networks" : [ {
    "id" : "ec64b676-1184-4c11-8f1b-6966ffdb9a39"
  } ]
}

[_createnetworkpool] API

2. Get the Network Pools

2.1. Prerequisites API

None

2.2. Steps API

  • 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: 425

{
  "elements" : [ {
    "id" : "fb3c5c25-3eb0-4386-b86c-a16f60ff8b8a",
    "name" : "engineering-networkpool",
    "networks" : [ {
      "id" : "20c45f16-9158-479e-aeb0-a40a3636982f"
    } ]
  }, {
    "id" : "b3ffdaeb-710b-4a4e-8664-803a0cfe4a7b",
    "name" : "finance-networkpool",
    "networks" : [ {
      "id" : "b6206bdc-a6d7-4abc-a943-ccd916b3e6cc"
    } ]
  } ],
  "pageMetadata" : {
    "totalElements" : 2
  }
}

[_getnetworkpools] API [_getnetworkpool] API [_getnetworksofnetworkpool] API [_getnetworkofnetworkpool] API

3. Get a Network Pool

3.1. Prerequisites API

The following data is required

  • ID of the network pool

3.2. Steps API

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools/bf59bffa-49ba-4f82-961f-c69fcb9f5cbc' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/network-pools/bf59bffa-49ba-4f82-961f-c69fcb9f5cbc 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" : "bf59bffa-49ba-4f82-961f-c69fcb9f5cbc",
  "name" : "engineering-networkpool",
  "networks" : [ {
    "id" : "d70292b1-16b3-402e-8a98-a91c780d9f1d"
  } ]
}

[_getnetworkpools] API [_getnetworkpool] API [_getnetworksofnetworkpool] API [_getnetworkofnetworkpool] API

4. Get a Network of a Network Pool

4.1. Prerequisites API

The following data is required

  • ID of the network

4.2. Steps API

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools/2f93edf9-f881-445d-8924-5045845bee93/networks/23b83833-8cbc-41fa-a051-2483a403a53d' -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" : "23b83833-8cbc-41fa-a051-2483a403a53d",
  "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"
  } ]
}

[_getnetworkpools] API [_getnetworkpool] API [_getnetworksofnetworkpool] API [_getnetworkofnetworkpool] API

5. Rename a Network Pool

5.1. Prerequisites API

  • Network pool must exist.

5.2. Steps API

  • 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/861677c3-9d20-475f-a5d0-245e702e14b5' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "name" : "new_name"
}'

HTTP Request

PATCH /v1/network-pools/861677c3-9d20-475f-a5d0-245e702e14b5 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" : "861677c3-9d20-475f-a5d0-245e702e14b5",
  "name" : "engineering-networkpool",
  "networks" : [ {
    "id" : "206f1bae-4480-4895-ade7-6a1c0ff1104d"
  } ]
}

[_updatenetworkpool] API [_getnetworkpool] API [_getnetworkpools] API

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 API

The following data is required

  • ID of the network pool

6.2. Steps API

  • 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/6b539853-9e76-4b8c-b9be-cde02aafdc01' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

DELETE /v1/network-pools/6b539853-9e76-4b8c-b9be-cde02aafdc01 HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 204 No Content

[_deletenetworkpool] API [_getnetworkpools] API [_getnetworkpool] API

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

7.1. Prerequisites API

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 API

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools/b4f71663-f538-4056-a0e3-864e45665618/networks/1aef02ae-eaa9-466d-a37e-4e6c474368ae/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/b4f71663-f538-4056-a0e3-864e45665618/networks/1aef02ae-eaa9-466d-a37e-4e6c474368ae/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" : "a75f9f97-66fb-4625-9b09-f46041dfb587",
  "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"
  } ]
}

[_addippooltonetworkofnetworkpool] API [_getnetworkpools] API [_getnetworkpool] API [_getnetworksofnetworkpool] API [_getnetworkofnetworkpool] API

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

8.1. Prerequisites API

The following data is required

  • ID of the IP pool

8.2. Steps API

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/network-pools/6635b69c-3dd7-48c1-aaaf-988281c768ba/networks/7f16bc2c-adee-4d19-ab27-c8d268fcf326/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/6635b69c-3dd7-48c1-aaaf-988281c768ba/networks/7f16bc2c-adee-4d19-ab27-c8d268fcf326/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

[_deleteippoolfromnetworkofnetworkpool] API [_getnetworkpools] API [_getnetworkpool] API [_getnetworksofnetworkpool] API [_getnetworkofnetworkpool] API
Last updated 2024-06-21 01:22:12 -0700

Operations
POST
Add Ip Pool To Network Of Network Pool
Add an IP Pool to a Network of a Network Pool
POST
Create Network Pool
Create a Network Pool
DELETE
Delete Ip Pool From Network Of Network Pool
Delete an IP Pool from a Network of a Network Pool
DELETE
Delete Network Pool
Delete a Network Pool
GET
Get Network Of Network Pool
Get a Network of a Network Pool
GET
Get Network Pool
Get the list of all Network Pools
GET
Get Network Pool By ID
Get a Network Pool
GET
Get Networks Of Network Pool
Get the Networks of a Network Pool
PATCH
Update Network Pool
Update Network Pool