VMware Cloud Foundation API Reference Guide
2. Usecases
2.1. Hosts
2.1.1. Commission the Hosts
Prerequisites
-
The following data is required
-
Username of each host
-
Password of each host
-
FQDN of each host
-
Network pool name to which each host has to be associated with (Optional)
-
Network pool ID to which each host has to be associated with
-
|
Tip
|
Refer to: Get the Network Pools and Get a Network of a Network Pool |
-
The host, if intended to be used for a vSAN domain, should be vSAN compliant and certified as per the VMware Hardware Compatibility Guide.
-
BIOS, HBA, SSD, HDD, etc. of the host must match the VMware Hardware Compatibility Guide.
-
The host must have the drivers and firmware versions specified in the VMware Hardware Compatibility Guide.
-
The host must have the supported version of ESXi (i.e 6.7.0-13006603) pre-installed on it.
-
SSH and syslog must be enabled on the host.
-
The host must be configured with DNS server for forward and reverse lookup and FQDN.
-
The host name must be same as the FQDN.
-
The host must have a standard switch with two NIC ports with a minimum 10 Gbps speed.
-
The management IP must be configured to the first NIC port.
-
Ensure that the host has a standard switch and the default uplinks with 10Gb speed are configured starting with traditional numbering (e.g., vmnic0) and increasing sequentially.
-
Ensure that the host hardware health status is healthy without any errors.
-
All disk partitions on HDD / SSD are deleted.
-
The hosts, if intended to be used for vSAN, domain must be associated with vSAN enabled network pool.
-
The hosts, if intended to be used for NFS, domain must be associated with NFS enabled network pool.
-
The hosts, if intended to be used for VMFS on FC, domain must be associated with either a NFS enabled or vMotion enabled network pool.
=== Steps -
Validate the input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/hosts/validations/commissions' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-d '[ {
"fqdn" : "esfo01m01esx01.sfo01.rainpole.local",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool"
}, {
"fqdn" : "esfo01m01esx02.sfo01.rainpole.local",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool"
} ]'
HTTP Request
POST /v1/hosts/validations/commissions HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 486
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
[ {
"fqdn" : "esfo01m01esx01.sfo01.rainpole.local",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool"
}, {
"fqdn" : "esfo01m01esx02.sfo01.rainpole.local",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/hosts/validations/a33a2977-ca55-40b1-acb3-22878eff9a47
Content-Type: application/json;charset=UTF-8
Content-Length: 542
{
"id" : "a33a2977-ca55-40b1-acb3-22878eff9a47",
"description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
"executionStatus" : "IN_PROGRESS",
"validationChecks" : [ {
"description" : "Validating input specification",
"resultStatus" : "UNKNOWN"
}, {
"description" : "Validating host esfo01m01esx01.sfo01.rainpole.local",
"resultStatus" : "UNKNOWN"
}, {
"description" : "Validating host esfo01m01esx02.sfo01.rainpole.local",
"resultStatus" : "UNKNOWN"
} ]
}
-
Poll until "executionStatus" is not "IN_PROGRESS" using the "id" from the previous response.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/hosts/validations/a33a2977-ca55-40b1-acb3-22878eff9a47' -i -u 'admin:VMwareInfra@1' \
-H 'Content-Type: application/json'
HTTP Request
GET /v1/hosts/validations/a33a2977-ca55-40b1-acb3-22878eff9a47 HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 452
{
"id" : "a33a2977-ca55-40b1-acb3-22878eff9a47",
"description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
"executionStatus" : "IN_PROGRESS",
"validationChecks" : [ {
"description" : "Validating host esfo01m01esx01.sfo01.rainpole.local",
"resultStatus" : "SUCCEEDED"
}, {
"description" : "Validating host esfo01m01esx02.sfo01.rainpole.local",
"resultStatus" : "UNKNOWN"
} ]
}
-
In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "SUCCEEDED".
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/hosts/validations/a33a2977-ca55-40b1-acb3-22878eff9a47' -i -u 'admin:VMwareInfra@1' \
-H 'Content-Type: application/json'
HTTP Request
GET /v1/hosts/validations/a33a2977-ca55-40b1-acb3-22878eff9a47 HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 484
{
"id" : "a33a2977-ca55-40b1-acb3-22878eff9a47",
"description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
"executionStatus" : "COMPLETED",
"resultStatus" : "SUCCEEDED",
"validationChecks" : [ {
"description" : "Validating host esfo01m01esx01.sfo01.rainpole.local",
"resultStatus" : "SUCCEEDED"
}, {
"description" : "Validating host esfo01m01esx02.sfo01.rainpole.local",
"resultStatus" : "SUCCEEDED"
} ]
}
-
In case of errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "FAILED".
|
Note
|
Make changes to the input specification and re-validate using a new API invocation. |
-
Trigger the task using the valid input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/hosts' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-d '[ {
"fqdn" : "esfo01m01esx01.sfo01.rainpole.local",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool"
}, {
"fqdn" : "esfo01m01esx02.sfo01.rainpole.local",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool"
} ]'
HTTP Request
POST /v1/hosts HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 486
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
[ {
"fqdn" : "esfo01m01esx01.sfo01.rainpole.local",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
"networkPoolName" : "engineering-networkpool"
}, {
"fqdn" : "esfo01m01esx02.sfo01.rainpole.local",
"username" : "root",
"password" : "VMwareInfra@1",
"storageType" : "VSAN",
"networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
"networkPoolName" : "finance-networkpool"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/d9c95c72-5866-41c7-be3a-edf05bbbe76b
Content-Type: application/json;charset=UTF-8
Content-Length: 79
{
"id" : "d9c95c72-5866-41c7-be3a-edf05bbbe76b",
"status" : "IN_PROGRESS"
}
-
Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.
|
Tip
|
Refer to: Get a Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed.
|
Tip
|
Refer to: Retry a Task. |
Related APIs
Validate the input specification to commission the Hosts
Get the status of the validation of the input specification to commission the Hosts
Commission the Hosts
Get a Task
Retry a Task
Get the Network Pools
Get the Networks of a Network Pool
Get a Network of a Network Pool
Create a Network Pool
Add an IP Pool to a Network of a Network Pool
Delete an IP Pool from a Network of a Network Pool
2.1.2. Get the Hosts
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/hosts' -i -u 'admin:VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/hosts HTTP/1.1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 3793
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"esxiVersion" : "6.7.0-13006603",
"fqdn" : "esfo01m01esx01.sfo01.rainpole.local",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED"
}, {
"id" : "8045e44e-974e-4f43-9862-7f0326782638",
"esxiVersion" : "6.5.0-13006603",
"fqdn" : "esfo01m01esx02.sfo01.rainpole.local",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"ipAddresses" : [ {
"ipAddress" : "10.0.0.101",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3"
} ],
"status" : "UNASSIGNED_USEABLE"
}, {
"id" : "8045e44e-974e-4f43-9862-7f0326782638",
"esxiVersion" : "6.5.0-13006603",
"fqdn" : "esfo01m01esx03.sfo01.rainpole.local",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"ipAddresses" : [ {
"ipAddress" : "10.0.0.102",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3"
} ],
"status" : "UNASSIGNED_UNUSEABLE"
} ]
}
Get ASSIGNED Hosts
This API can be used to fetch all the hosts that are currently assigned to any domain and hence cannot be used for other domain tasks
Steps
-
Invoke the API by specifying the "status" as "ASSIGNED".
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/hosts?status=ASSIGNED' -i -u 'admin:VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/hosts?status=ASSIGNED HTTP/1.1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1373
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"esxiVersion" : "6.7.0-13006603",
"fqdn" : "esfo01m01esx01.sfo01.rainpole.local",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED"
} ]
}
Get UNASSIGNED_USEABLE Hosts
This API can be used to fetch all the hosts that are currently not assigned to any domain and hence can be used for other domain tasks
Steps
-
Invoke the API by specifying the "status" as "UNASSIGNED_USEABLE".
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/hosts?status=UNASSIGNED_USEABLE' -i -u 'admin:VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/hosts?status=UNASSIGNED_USEABLE HTTP/1.1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1230
{
"elements" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782638",
"esxiVersion" : "6.5.0-13006603",
"fqdn" : "esfo01m01esx02.sfo01.rainpole.local",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"ipAddresses" : [ {
"ipAddress" : "10.0.0.101",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3"
} ],
"status" : "UNASSIGNED_USEABLE"
} ]
}
Get UNASSIGNED_UNUSEABLE Hosts
This API can be used to fetch all the hosts that are currently not assigned to any domain and can be used for other domain tasks after completion of cleanup operation
|
Note
|
Cleanup operations must be performed to get these host back into "UNASSIGNED" and "USEABLE" state. |
Steps
-
Invoke the API by specifying the "status" as "UNASSIGNED_UNUSEABLE".
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/hosts?status=UNASSIGNED_UNUSEABLE' -i -u 'admin:VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/hosts?status=UNASSIGNED_UNUSEABLE HTTP/1.1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1232
{
"elements" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782638",
"esxiVersion" : "6.5.0-13006603",
"fqdn" : "esfo01m01esx03.sfo01.rainpole.local",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"ipAddresses" : [ {
"ipAddress" : "10.0.0.102",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3"
} ],
"status" : "UNASSIGNED_UNUSEABLE"
} ]
}
2.1.3. Get a Host
Prerequisites
-
The following data is required
-
ID of the host
-
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/hosts/c0703437-6746-470b-9e1c-f9d3bbc9b1c1' -i -u 'admin:VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/hosts/c0703437-6746-470b-9e1c-f9d3bbc9b1c1 HTTP/1.1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1250
{
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"esxiVersion" : "6.7.0-13006603",
"fqdn" : "esfo01m01esx01.sfo01.rainpole.local",
"hardwareVendor" : "VMware, Inc.",
"hardwareModel" : "VMware Virtual Platform",
"ipAddresses" : [ {
"ipAddress" : "10.0.0.100",
"type" : "MANAGEMENT"
} ],
"cpu" : {
"frequencyMHz" : 4994.0,
"cores" : 2,
"cpuCores" : [ {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
}, {
"frequencyMHz" : 2497.0,
"model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
"manufacturer" : "Intel"
} ]
},
"memory" : {
"totalCapacityMB" : 79999.0
},
"storage" : {
"totalCapacityMB" : 781250.0,
"disks" : [ {
"capacityMB" : 390625.0,
"diskType" : "HDD"
}, {
"capacityMB" : 390625.0,
"diskType" : "FLASH"
} ]
},
"physicalNics" : [ {
"deviceName" : "vmnic0",
"macAddress" : "02:00:1b:31:93:d2"
}, {
"deviceName" : "vmnic1",
"macAddress" : "02:00:1b:31:93:d3"
} ],
"domain" : {
"id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
},
"cluster" : {
"id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
},
"status" : "ASSIGNED"
}
2.1.4. Decommission the Hosts
Prerequisites
-
The following data is required
-
FQDN of each host
-
-
The host must not be assigned to a domain i.e "status" must be "UNASSIGNED_USEABLE".
|
Tip
|
Refer to: Get the Hosts to fetch the hosts with the required "status" |
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/hosts' -i -u 'admin:VMwareInfra@1' -X DELETE \
-H 'Content-Type: application/json' \
-d '[ {
"fqdn" : "esfo01m01esx01.sfo01.rainpole.local"
}, {
"fqdn" : "esfo01m01esx02.sfo01.rainpole.local"
} ]'
HTTP Request
DELETE /v1/hosts HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 110
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
[ {
"fqdn" : "esfo01m01esx01.sfo01.rainpole.local"
}, {
"fqdn" : "esfo01m01esx02.sfo01.rainpole.local"
} ]
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/f01d62dc-1783-4e9f-bd80-9a878727be74
Content-Type: application/json;charset=UTF-8
Content-Length: 79
{
"id" : "f01d62dc-1783-4e9f-bd80-9a878727be74",
"status" : "IN_PROGRESS"
}
-
Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.
|
Tip
|
Refer to: Get a Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed.
|
Tip
|
Refer to: Retry a Task. |
2.2. Domains
A workload domain is a policy based resource container with specific availability and performance attributes that combines compute (vSphere), storage (vSAN/NFS/VMFS on FC) and networking (NSX) into a single consumable entity.
2.2.1. Create a Domain
The Create a Domain workflow automatically:
-
Deploys an additional vCenter Server Appliance for the new domain within the management domain.
-
By leveraging a separate vCenter Server instance per domain, software updates can be applied without impacting other domains. It also allows for each domain to have additional isolation as needed.
-
Connects the specified ESXi servers to this vCenter Server instance and groups them into a cluster. Each host is configured with the port groups applicable for the domain.
-
Configures networking on each ESXi host.
-
If vSAN or NFS storage provided, they are configured on the ESXi hosts. If VMFS on FC storage provided, it’s consumed.
-
For each NSX for vSphere Domain, the workflow deploys an NSX Manager in the management domain and three NSX controllers on the ESXi datastore. The workflow also configures an anti-affinity rule between the controller VMs to prevent them from being on the same host for High Availability.
-
For the first NSX-T VI Domain in your environment, the workflow deploys an NSX Manager and three NSX controllers in the management domain. The workflow also configures an anti-affinity rule between the controller VMs to prevent them from being on the same host for High Availability. All subsequent NSX-T Domains share this NSX-T Manager and Controllers.
-
For an NSX-T Domain, NSX Edges are needed to enable overlay VI networks and public networks for north-south traffic. NSX Edges are not deployed automatically for an NSX-T VI Domain. You can deploy them manually after the VI domain is created. Subsequent NSX-T VI Domains share the NSX-T Edges deployed for the first domain.
-
Licenses and integrates the deployed components with the appropriate pieces in the Cloud Foundation software stack.
The result is a workload-ready SDDC environment.
Prerequisites
-
The following data is required
-
Name of the domain
-
vCenter details
-
Name of the vCenter
-
Network details
-
IP Address of the vCenter
-
FQDN of the vCenter
-
Gateway
-
Subnet mask
-
-
License key for the vCenter
-
Password for the root user (8-20 characters)
-
Name of the datacenter where vCenter needs to be deployed
-
-
List of clusters
-
For each cluster
-
Name of the cluster
-
List of hosts
-
For each host
-
ID of the host (UUID)
-
License key for the host
-
List of VDS names to associate with host
-
ID of the vmNic host to be associated with VDS, once added to cluster
-
-
-
Datastore details
NoteOnly one of "vsanDatastoreSpec" (For VSAN) , "nfsDatastoreSpec" (For NFS) or "fibreChannelDatastoreSpec" (For VMFS on FC) must be specified. -
For VSAN
-
Number of host failures to tolerate (can be 0, 1, or 2)
-
License key for the vSAN datastore
{"vsanDatastoreSpec":{"failuresToTolerate":1,"licenseKey":"XXXXX-XXXXX-XXXXX-XXXXX-XXXXX","datastoreName":"vSanDatastore"}}
-
-
For NFS
-
List of NFS server names
-
Shared directory path
-
User tag used to annotate NFS share
-
Boolean to identify if the mount directory should be read-only
{"nfsDatastoreSpecs":[{"nasVolume":{"serverName":["10.0.0.250"],"path":"/nfs_mount/my_read_write_folder","readOnly":false},"datastoreName":"NFSShare"}]} -
-
-
For VMFS on FC
-
If vSAN or NFS storage provided, they are configured on the ESXi hosts. If VMFS on FC storage provided, it’s consumed.
{"fibreChannelDatastoreSpec":[{"datastoreName":"sample-fc-datastore-name"}]}
-
-
Network Details
-
List of VDS details
-
For each VDS
-
Port group names and the corresponding transport type
-
DVS host Infrastructure traffic resource type
-
Maximum allowed usage for a traffic class
-
Amount of bandwidth to be reserved for the host infrastructure traffic class
-
-
-
NSX cluster Details
NoteOnly one of "nsxVClusterSpec" (For NSX-V) or "nsxTClusterSpec" (For NSX-T) must be specified. -
For NSX-V
-
VLAN ID of the VXLAN
-
License key for NSX
-
VDS to be used for VXLAN traffic/port group. This should belong to one of the VDS being created for the cluster
-
{"nsxVClusterSpec":{"vlanId":3,"vdsNameForVxlanConfig":"SDDC-Dswitch-Private1"}}-
For NSX-T
-
VLAN ID of Geneve
-
-
-
{"nsxTClusterSpec":{"geneveVlanId":2}} -
-
-
NSX details
NoteOnly one of "nsxVSpec" (For NSX-V) or "nsxTSpec" (For NSX-T) must be specified. -
For NSX-V
-
NSX Manager virtual machine details
-
Name of the NSX Manager virtual machine
-
Network details
-
IP address of the virtual machine
-
Fully-qualified domain name
-
Gateway
-
Subnet mask
-
-
-
NSX-V Controller Details
-
Controller IP addresses (three IPs) without duplicates
-
Controller password
-
Controller gateway
-
Controller subnet mask
-
-
License key for NSX
-
NSX Manager admin password (basic authorization and SSH)
-
NSX Manager enable password
{"nsxManagerSpec":{"name":"nsx-manager-2","networkDetailsSpec":{"ipAddress":"10.0.0.44","dnsName":"nsx-manager-2.sfo01.rainpole.local","gateway":"10.0.0.250","subnetMask":"255.255.255.0"}},"nsxVControllerSpec":{"nsxControllerIps":["10.0.0.45","10.0.0.46","10.0.0.47"],"nsxControllerPassword":"Test123456$%","nsxControllerGateway":"10.0.0.250","nsxControllerSubnetMask":"255.255.255.0"},"licenseKey":"XXXXX-XXXXX-XXXXX-XXXXX-XXXXX","nsxManagerAdminPassword":"Random0$","nsxManagerEnablePassword":"Random0$"} -
-
For NSX-T
-
NSX Manager virtual machine details
-
Name of the NSX Manager virtual machine
-
Network details
-
IP Address of the virtual machine
-
Fully-qualified domain name
-
Gateway
-
Subnet mask
-
-
-
Virtual IP address which would act as proxy/alias for NSX-T managers
-
Fully-qualified domain name for VIP so that common SSL certificates can be installed across all managers
-
License key for NSX
-
NSX manager admin Password (basic authorization and SSH)
-
-
{"nsxManagerSpecs":[{"name":"nsx-manager-2","networkDetailsSpec":{"ipAddress":"10.0.0.44","dnsName":"nsx-manager-2.sfo01.rainpole.local","gateway":"10.0.0.250","subnetMask":"255.255.255.0"}},{"name":"nsx-manager-3","networkDetailsSpec":{"ipAddress":"10.0.0.44","dnsName":"nsx-manager-2.sfo01.rainpole.local","gateway":"10.0.0.250","subnetMask":"255.255.255.0"}},{"name":"nsx-manager-4","networkDetailsSpec":{"ipAddress":"10.0.0.44","dnsName":"nsx-manager-2.sfo01.rainpole.local","gateway":"10.0.0.250","subnetMask":"255.255.255.0"}}],"vip":"10.0.0.166","vipFqdn":"vip-nsxmanager.sfo01.rainpole.local","licenseKey":"XXXXX-XXXXX-XXXXX-XXXXX-XXXXX","nsxManagerAdminPassword":"Random0$"} -
|
Warning
|
NSX details (i.e "nsxVSpec" or "nsxTSpec") must match NSX cluster details (i.e "nsxVClusterSpec" or "nsxTClusterSpec") in the input specification. |
-
Network pool should be configured.
|
Tip
|
Refer to Create a Network Pool |
-
Hosts should be commissioned.
|
Tip
|
Refer to Commission the Hosts |
-
A DHCP server must be configured on the VXLAN VLAN of the management domain. When NSX creates VXLAN VTEPs for the domain, they are assigned IP addresses from the DHCP server.
-
Ensure that host configuration has a minimum of two active vmNics. There must be a free uplink on each host to be used for the domain.
Steps
-
Validate the input specification.
|
Note
|
The below example is for creating a domain using vSAN storage (i.e "vsanDatastoreSpec") and NSX-V (i.e "nsxVSpec" and "nsxVClusterSpec") |
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/domains/validations/creations' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-d '{
"domainName" : "Domain1",
"vcenterSpec" : {
"name" : "vCenter1",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "vcenter-2.sfo01.rainpole.local",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "Random0$",
"datacenterName" : "new-vi-1"
},
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "Cluster1",
"hostSpecs" : [ {
"id" : "03ba4e05-4dfb-49b4-a866-6a2afb7902e8",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
}, {
"id" : "3303e5a9-7b4f-4294-aac1-cb23f0a5f270",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
}, {
"id" : "5a243490-59b4-4045-b2e5-625a41fb9bd5",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"failuresToTolerate" : 1,
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"datastoreName" : "vSanDatastore"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "SDDC-Dswitch-Private1",
"portGroupSpecs" : [ {
"name" : "SDDC-DPortGroup-Mgmt",
"transportType" : "MANAGEMENT"
}, {
"name" : "SDDC-DPortGroup-VSAN",
"transportType" : "VSAN"
}, {
"name" : "SDDC-DPortGroup-vMotion",
"transportType" : "VMOTION"
} ]
} ],
"nsxClusterSpec" : {
"nsxVClusterSpec" : {
"vlanId" : 3,
"vdsNameForVxlanConfig" : "SDDC-Dswitch-Private1"
}
}
}
} ]
},
"nsxVSpec" : {
"nsxManagerSpec" : {
"name" : "nsx-manager-2",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "nsx-manager-2.sfo01.rainpole.local",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
},
"nsxVControllerSpec" : {
"nsxControllerIps" : [ "10.0.0.45", "10.0.0.46", "10.0.0.47" ],
"nsxControllerPassword" : "Test123456$%",
"nsxControllerGateway" : "10.0.0.250",
"nsxControllerSubnetMask" : "255.255.255.0"
},
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "Random0$",
"nsxManagerEnablePassword" : "Random0$"
}
}'
HTTP Request
POST /v1/domains/validations/creations HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 2633
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"domainName" : "Domain1",
"vcenterSpec" : {
"name" : "vCenter1",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "vcenter-2.sfo01.rainpole.local",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "Random0$",
"datacenterName" : "new-vi-1"
},
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "Cluster1",
"hostSpecs" : [ {
"id" : "03ba4e05-4dfb-49b4-a866-6a2afb7902e8",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
}, {
"id" : "3303e5a9-7b4f-4294-aac1-cb23f0a5f270",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
}, {
"id" : "5a243490-59b4-4045-b2e5-625a41fb9bd5",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"failuresToTolerate" : 1,
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"datastoreName" : "vSanDatastore"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "SDDC-Dswitch-Private1",
"portGroupSpecs" : [ {
"name" : "SDDC-DPortGroup-Mgmt",
"transportType" : "MANAGEMENT"
}, {
"name" : "SDDC-DPortGroup-VSAN",
"transportType" : "VSAN"
}, {
"name" : "SDDC-DPortGroup-vMotion",
"transportType" : "VMOTION"
} ]
} ],
"nsxClusterSpec" : {
"nsxVClusterSpec" : {
"vlanId" : 3,
"vdsNameForVxlanConfig" : "SDDC-Dswitch-Private1"
}
}
}
} ]
},
"nsxVSpec" : {
"nsxManagerSpec" : {
"name" : "nsx-manager-2",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "nsx-manager-2.sfo01.rainpole.local",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
},
"nsxVControllerSpec" : {
"nsxControllerIps" : [ "10.0.0.45", "10.0.0.46", "10.0.0.47" ],
"nsxControllerPassword" : "Test123456$%",
"nsxControllerGateway" : "10.0.0.250",
"nsxControllerSubnetMask" : "255.255.255.0"
},
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "Random0$",
"nsxManagerEnablePassword" : "Random0$"
}
}
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 290
{
"id" : "3e1238b5-01b6-4d04-bf1d-ab55a6fe520b",
"description" : "Validating Domain Creation Spec",
"executionStatus" : "COMPLETED",
"resultStatus" : "SUCCEEDED",
"validationChecks" : [ {
"description" : "DomainCreationSpecValidation",
"resultStatus" : "SUCCEEDED"
} ]
}
-
In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "SUCCEEDED".
-
In case of errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "FAILED".
NoteMake changes to the input specification and re-validate using a new API invocation.
-
Trigger the task using the valid input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/domains' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-d '{
"domainName" : "Domain1",
"vcenterSpec" : {
"name" : "vCenter1",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "vcenter-2.sfo01.rainpole.local",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "Random0$",
"datacenterName" : "new-vi-1"
},
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "Cluster1",
"hostSpecs" : [ {
"id" : "676ff7f1-e51e-45a6-afa6-b3b90f40a00f",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
}, {
"id" : "52befa9c-3e0e-4bf0-8b13-d31115e4b6a6",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
}, {
"id" : "ac8a4f4d-4a49-4505-aae2-b6f03fe93e2e",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"failuresToTolerate" : 1,
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"datastoreName" : "vSanDatastore"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "SDDC-Dswitch-Private1",
"portGroupSpecs" : [ {
"name" : "SDDC-DPortGroup-Mgmt",
"transportType" : "MANAGEMENT"
}, {
"name" : "SDDC-DPortGroup-VSAN",
"transportType" : "VSAN"
}, {
"name" : "SDDC-DPortGroup-vMotion",
"transportType" : "VMOTION"
} ]
} ],
"nsxClusterSpec" : {
"nsxVClusterSpec" : {
"vlanId" : 3,
"vdsNameForVxlanConfig" : "SDDC-Dswitch-Private1"
}
}
}
} ]
},
"nsxVSpec" : {
"nsxManagerSpec" : {
"name" : "nsx-manager-2",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "nsx-manager-2.sfo01.rainpole.local",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
},
"nsxVControllerSpec" : {
"nsxControllerIps" : [ "10.0.0.45", "10.0.0.46", "10.0.0.47" ],
"nsxControllerPassword" : "Test123456$%",
"nsxControllerGateway" : "10.0.0.250",
"nsxControllerSubnetMask" : "255.255.255.0"
},
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "Random0$",
"nsxManagerEnablePassword" : "Random0$"
}
}'
HTTP Request
POST /v1/domains HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 2633
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"domainName" : "Domain1",
"vcenterSpec" : {
"name" : "vCenter1",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "vcenter-2.sfo01.rainpole.local",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "Random0$",
"datacenterName" : "new-vi-1"
},
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "Cluster1",
"hostSpecs" : [ {
"id" : "676ff7f1-e51e-45a6-afa6-b3b90f40a00f",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
}, {
"id" : "52befa9c-3e0e-4bf0-8b13-d31115e4b6a6",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
}, {
"id" : "ac8a4f4d-4a49-4505-aae2-b6f03fe93e2e",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmNicId1",
"vdsName" : "SDDC-Dswitch-Private1"
} ]
}
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"failuresToTolerate" : 1,
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"datastoreName" : "vSanDatastore"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "SDDC-Dswitch-Private1",
"portGroupSpecs" : [ {
"name" : "SDDC-DPortGroup-Mgmt",
"transportType" : "MANAGEMENT"
}, {
"name" : "SDDC-DPortGroup-VSAN",
"transportType" : "VSAN"
}, {
"name" : "SDDC-DPortGroup-vMotion",
"transportType" : "VMOTION"
} ]
} ],
"nsxClusterSpec" : {
"nsxVClusterSpec" : {
"vlanId" : 3,
"vdsNameForVxlanConfig" : "SDDC-Dswitch-Private1"
}
}
}
} ]
},
"nsxVSpec" : {
"nsxManagerSpec" : {
"name" : "nsx-manager-2",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "nsx-manager-2.sfo01.rainpole.local",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
},
"nsxVControllerSpec" : {
"nsxControllerIps" : [ "10.0.0.45", "10.0.0.46", "10.0.0.47" ],
"nsxControllerPassword" : "Test123456$%",
"nsxControllerGateway" : "10.0.0.250",
"nsxControllerSubnetMask" : "255.255.255.0"
},
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "Random0$",
"nsxManagerEnablePassword" : "Random0$"
}
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/6cbca6db-e6d5-4c3d-b2c2-4d5e2eaac63b
Content-Length: 142
{
"id" : "6cbca6db-e6d5-4c3d-b2c2-4d5e2eaac63b",
"name" : "",
"status" : "UNKNOWN",
"creationTimestamp" : "2019-09-03T09:41:29.600Z"
}
-
Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.
|
Tip
|
Refer to: Get a Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed.
|
Tip
|
Refer to: Retry a Task. |
2.2.2. Get the Domains
Prerequisites
None
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/domains' -i -u 'admin:VMwareInfra@1'
HTTP Request
GET /v1/domains HTTP/1.1
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 564
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5",
"name" : "VI-1",
"vcenters" : [ {
"fqdn" : "vi-1-vcenter.vrack.vsphere.local"
} ],
"clusters" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782655"
} ]
}, {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"name" : "VDI-1",
"vcenters" : [ {
"fqdn" : "vdi-1-vcenter.vrack.vsphere.local"
} ],
"clusters" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782677"
}, {
"id" : "8045e44e-974e-4f43-9861-7f0326782633"
} ]
} ]
}
2.2.3. Get a Domain
Prerequisites
-
The following data is required
-
ID of the domain
-
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/domains/c0703437-6746-470b-9e1c-f9d3bbc9b1c5' -i -u 'admin:VMwareInfra@1'
HTTP Request
GET /v1/domains/c0703437-6746-470b-9e1c-f9d3bbc9b1c5 HTTP/1.1
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 220
{
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5",
"name" : "VI-1",
"vcenters" : [ {
"fqdn" : "vi-1-vcenter.vrack.vsphere.local"
} ],
"clusters" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782655"
} ]
}
2.2.4. Delete a Domain
When you delete a domain, the clusters within the domain are deleted and the hosts are returned to the free pool.
|
Warning
|
Deleting a domain is an irreversible operation. All clusters and VMs within the domain are deleted and the underlying datastores are destroyed. |
|
Warning
|
Deleting a domain puts the host "status" to UNASSIGNED_UNUSEABLE. Cleanup the hosts to change the "status" to UNASSIGNED_USEABLE. |
|
Note
|
The network pools used by the domain are not deleted as part of task and must be deleted separately. |
Prerequisites
-
The following data is required
-
ID of the domain that has to be deleted.
-
|
Tip
|
Back up the data on the domain. |
|
Tip
|
Migrate the VMs that you want to retain, to another domain. |
Steps
-
Initialize the deletion.
|
Warning
|
It is not possible to delete a domain without having marked it for deletion. This 2-step deletion ensures that a domain is not deleted accidentally. |
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/domains/f74c2d97-621a-4984-9ab6-5d84effde82f' -i -u 'admin:VMwareInfra@1' -X PATCH \
-H 'Content-Type: application/json' \
-d '{
"markForDeletion" : true
}'
HTTP Request
PATCH /v1/domains/f74c2d97-621a-4984-9ab6-5d84effde82f HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 30
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"markForDeletion" : true
}
HTTP Response
HTTP/1.1 200 OK
-
Trigger the deletion.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/domains/f74c2d97-621a-4984-9ab6-5d84effde82f' -i -u 'admin:VMwareInfra@1' -X DELETE
HTTP Request
DELETE /v1/domains/f74c2d97-621a-4984-9ab6-5d84effde82f HTTP/1.1
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/27cf548b-4377-4042-90c9-07699088147b
Content-Length: 142
{
"id" : "27cf548b-4377-4042-90c9-07699088147b",
"name" : "",
"status" : "UNKNOWN",
"creationTimestamp" : "2019-09-03T09:41:26.860Z"
}
-
Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.
|
Tip
|
Refer to: Get a Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed.
|
Tip
|
Refer to: Retry a Task. |
2.3. Clusters
2.3.1. Create a Cluster
After you add the primary cluster, you can add more clusters to expand the domain.
Prerequisites
-
The following data is required
-
ID of the domain in which the cluster is to be created
-
Cluster details
-
Name of the cluster
-
Hosts details
-
ID of the host (UUID)
-
License key for the host
-
List of VDS names to associate with host
-
ID of the vmNic host to be associated with VDS, once added to cluster
-
-
Datastore details
NoteOnly one of "vsanDatastoreSpec" (For VSAN), "nfsDatastoreSpec" (For NFS) or "fibreChannelDatastoreSpec" (For VMFS on FC) must be specified. -
For VSAN
-
Number of host failures to tolerate (can be 0, 1, or 2)
-
License key for the vSAN datastore
{"vsanDatastoreSpec":{"failuresToTolerate":1,"licenseKey":"XXXXX-XXXXX-XXXXX-XXXXX-XXXXX","datastoreName":"vSanDatastore"}}
-
-
For NFS
-
List of NFS server names
-
Shared directory path
-
User tag used to annotate NFS share
-
Boolean to identify if the mount directory should be read-only
{"nfsDatastoreSpecs":[{"nasVolume":{"serverName":["10.0.0.250"],"path":"/nfs_mount/my_read_write_folder","readOnly":false},"datastoreName":"NFSShare"}]}
-
-
For VMFS on FC
-
Ensure that the ESXi hosts have the given VMFS on FC datastore name configured.
{"fibreChannelDatastoreSpec":[{"datastoreName":"sample-fc-datastore-name"}]} -
-
Network Details
-
List of VDS details
-
For each VDS
-
Port group names and the corresponding transport type
-
DVS host Infrastructure traffic resource type
-
Maximum allowed usage for a traffic class
-
Amount of bandwidth to be reserved for the host infrastructure traffic class
-
-
-
NSX cluster Details
NoteOnly one of "nsxVClusterSpec" (For NSX-V) or "nsxTClusterSpec" (For NSX-T) must be specified. -
For NSX-V
-
VLAN ID of the VXLAN
-
License key for NSX
-
VDS to be used for VXLAN traffic/port group. This should belong to one of the VDS being created for the cluster
-
-
-
{"nsxVClusterSpec":{"vlanId":3,"vdsNameForVxlanConfig":"SDDC-Dswitch-Private1"}}-
For NSX-T
-
VLAN ID of Geneve
-
-
-
{"nsxTClusterSpec":{"geneveVlanId":2}} -
-
Network pool must be configured.
-
Logical VMware Cloud Foundation container (Workload Domain) must be provisioned.
|
Note
|
NSX manager and controller is configured when domain is created. |
-
Prerequisites for vSAN, NFS or VMFS on FC must be met.
-
License key details may be provisioned in vCenter.
-
Host configuration must have minimum two active vmNics.
-
There must be at least three hosts available in the VMware Cloud Foundation inventory.
-
Ensure that the hosts you want to add to the cluster are in UNASSIGNED_USEABLE state.
-
You must have valid host and vSAN (if using vSAN storage) license key specified with adequate sockets available for the host to be added.
-
A DHCP server must be configured on the VXLAN VLAN of the management domain. When NSX creates VXLAN VTEPs for the domain, they are assigned IP addresses from the DHCP server.
Steps
-
Validate the input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/clusters/validations/creations' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-d '{
"domainId" : "b3c69476-7c7e-4c60-b3e7-111a36f0b92e",
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "Cluster1",
"hostSpecs" : [ {
"id" : "9cc2afcc-c4cc-4be6-a416-7bc6ba545c46"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"failuresToTolerate" : 1,
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"datastoreName" : "vSanDatastore"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "vRack-DSwitch",
"portGroupSpecs" : [ {
"name" : "SDDC-DPortGroup-Mgmt",
"transportType" : "MANAGEMENT"
}, {
"name" : "SDDC-DPortGroup-VSAN",
"transportType" : "VSAN"
}, {
"name" : "SDDC-DPortGroup-vMotion",
"transportType" : "VMOTION"
} ]
} ],
"nsxClusterSpec" : {
"nsxVClusterSpec" : {
"vlanId" : 0,
"vdsNameForVxlanConfig" : "vds_name"
}
}
}
} ]
}
}'
HTTP Request
POST /v1/clusters/validations/creations HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 1045
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"domainId" : "b3c69476-7c7e-4c60-b3e7-111a36f0b92e",
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "Cluster1",
"hostSpecs" : [ {
"id" : "9cc2afcc-c4cc-4be6-a416-7bc6ba545c46"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"failuresToTolerate" : 1,
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"datastoreName" : "vSanDatastore"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "vRack-DSwitch",
"portGroupSpecs" : [ {
"name" : "SDDC-DPortGroup-Mgmt",
"transportType" : "MANAGEMENT"
}, {
"name" : "SDDC-DPortGroup-VSAN",
"transportType" : "VSAN"
}, {
"name" : "SDDC-DPortGroup-vMotion",
"transportType" : "VMOTION"
} ]
} ],
"nsxClusterSpec" : {
"nsxVClusterSpec" : {
"vlanId" : 0,
"vdsNameForVxlanConfig" : "vds_name"
}
}
}
} ]
}
}
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 292
{
"id" : "09743cb9-a428-4271-8a10-309b87deda40",
"description" : "Validating Cluster Creation Spec",
"executionStatus" : "COMPLETED",
"resultStatus" : "SUCCEEDED",
"validationChecks" : [ {
"description" : "ClusterCreationSpecValidation",
"resultStatus" : "SUCCEEDED"
} ]
}
-
In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "SUCCEEDED".
-
In case of errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "FAILED".
NoteMake changes to the input specification and re-validate using a new API invocation.
-
Trigger the task using the valid input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/clusters' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-d '{
"domainId" : "1dfedb58-5712-48b1-bdd9-b09464c8dada",
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "Cluster1",
"hostSpecs" : [ {
"id" : "9ddb698c-2624-4845-8b29-c6e377cc0d93"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"failuresToTolerate" : 1,
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"datastoreName" : "vSanDatastore"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "vRack-DSwitch",
"portGroupSpecs" : [ {
"name" : "SDDC-DPortGroup-Mgmt",
"transportType" : "MANAGEMENT"
}, {
"name" : "SDDC-DPortGroup-VSAN",
"transportType" : "VSAN"
}, {
"name" : "SDDC-DPortGroup-vMotion",
"transportType" : "VMOTION"
} ]
} ],
"nsxClusterSpec" : {
"nsxVClusterSpec" : {
"vlanId" : 0,
"vdsNameForVxlanConfig" : "vds_name"
}
}
}
} ]
}
}'
HTTP Request
POST /v1/clusters HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 1045
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"domainId" : "1dfedb58-5712-48b1-bdd9-b09464c8dada",
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "Cluster1",
"hostSpecs" : [ {
"id" : "9ddb698c-2624-4845-8b29-c6e377cc0d93"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"failuresToTolerate" : 1,
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"datastoreName" : "vSanDatastore"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "vRack-DSwitch",
"portGroupSpecs" : [ {
"name" : "SDDC-DPortGroup-Mgmt",
"transportType" : "MANAGEMENT"
}, {
"name" : "SDDC-DPortGroup-VSAN",
"transportType" : "VSAN"
}, {
"name" : "SDDC-DPortGroup-vMotion",
"transportType" : "VMOTION"
} ]
} ],
"nsxClusterSpec" : {
"nsxVClusterSpec" : {
"vlanId" : 0,
"vdsNameForVxlanConfig" : "vds_name"
}
}
}
} ]
}
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/55643b60-3a6a-441d-ab19-a6bdd747cece
Content-Length: 142
{
"id" : "55643b60-3a6a-441d-ab19-a6bdd747cece",
"name" : "",
"status" : "UNKNOWN",
"creationTimestamp" : "2019-09-03T09:42:11.850Z"
}
-
Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.
|
Tip
|
Refer to: Get a Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed.
|
Tip
|
Refer to: Retry a Task. |
2.3.2. Get the Clusters
Prerequisites
None
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/clusters' -i -u 'admin:VMwareInfra@1'
HTTP Request
GET /v1/clusters HTTP/1.1
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1274
{
"elements" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782655",
"name" : "sfo01-m01-mgmt01",
"primaryDatastoreName" : "sfo01-m01-vsan01",
"primaryDatastoreType" : "VSAN",
"hosts" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
}, {
"id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
} ]
}, {
"id" : "8045e44e-974e-4f43-9862-7f0326782677",
"name" : "sfo01-m01-wld01",
"primaryDatastoreName" : "sfo01-m01-nfs01",
"primaryDatastoreType" : "NFS",
"hosts" : [ {
"id" : "c0703437-6746-470z-9e1c-f9d3bbc9b1c6"
}, {
"id" : "c0703431-6742-470t-9e1d-f9d3bbc9b1c1"
} ]
}, {
"id" : "8045e44e-974e-4f43-9861-7f0326782633",
"name" : "sfo01-m01-wld02",
"primaryDatastoreName" : "sfo01-m01-nfs02",
"primaryDatastoreType" : "NFS",
"hosts" : [ {
"id" : "c0703437-6746-470e-9e1c-f9d3bbc9b1c3"
}, {
"id" : "c0703431-6742-470r-9e1d-f9d3bbc9b1c4"
} ]
}, {
"id" : "8045e44e-974e-4f43-9861-7f0326782677",
"name" : "sfo01-m01-wld03",
"primaryDatastoreName" : "sfo01-m01-fc01",
"primaryDatastoreType" : "FC",
"hosts" : [ {
"id" : "c0703437-6746-470e-9e2c-f9d3bbc9b1c3"
}, {
"id" : "c0703431-6742-460r-9e1d-f9d3bbc9b1c4"
} ]
} ]
}
2.3.3. Get a Cluster
Prerequisites
-
The following data is required
-
ID of the cluster
-
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/clusters/8045e44e-974e-4f43-9862-7f0326782655' -i -u 'admin:VMwareInfra@1'
HTTP Request
GET /v1/clusters/8045e44e-974e-4f43-9862-7f0326782655 HTTP/1.1
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 294
{
"id" : "8045e44e-974e-4f43-9862-7f0326782655",
"name" : "sfo01-m01-mgmt01",
"primaryDatastoreName" : "sfo01-m01-vsan01",
"primaryDatastoreType" : "VSAN",
"hosts" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
}, {
"id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
} ]
}
2.3.4. Expand a Cluster
Adding an individual host to a cluster adds the resources of that host to the cluster. You can add multiple hosts at a time to a cluster.
Prerequisites
-
The following data is required
-
ID of the cluster
-
For each host
-
ID of the host (UUID)
-
List of VDS names to associate with host
-
ID of the vmNic, host is associated to
-
-
License key of ESXi
-
-
The cluster in a domain to which hosts are to be added must exist.
-
There must be a host available in the VMware Cloud Foundation inventory.
-
The hosts to be added must have been commissioned.
-
Ensure that the host you want to add is in an active state.
-
You must have a valid ESXi license specified with adequate sockets available for the host to be added.
-
Ensure that the host to be added to the cluster matches the configuration of the hosts already in the cluster. This ensures a balanced configuration of the cluster.
Steps
-
Validate the input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/updates' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-d '{
"clusterExpansionSpec" : {
"hostSpecs" : [ {
"id" : "e767c089-9625-44d8-82e0-6f8a927c95a0"
} ]
}
}'
HTTP Request
POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/updates HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 118
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"clusterExpansionSpec" : {
"hostSpecs" : [ {
"id" : "e767c089-9625-44d8-82e0-6f8a927c95a0"
} ]
}
}
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 294
{
"id" : "af6f8159-9578-47a7-962a-5678f96fbf81",
"description" : "Validating Cluster Expansion Spec",
"executionStatus" : "COMPLETED",
"resultStatus" : "SUCCEEDED",
"validationChecks" : [ {
"description" : "ClusterExpansionSpecValidation",
"resultStatus" : "SUCCEEDED"
} ]
}
-
In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "SUCCEEDED".
-
In case of errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "FAILED".
NoteMake changes to the input specification and re-validate using a new API invocation.
-
Trigger the task using the valid input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -u 'admin:VMwareInfra@1' -X PATCH \
-H 'Content-Type: application/json' \
-d '{
"clusterExpansionSpec" : {
"hostSpecs" : [ {
"id" : "40938037-917a-484f-a08e-f60520cbda85"
} ]
}
}'
HTTP Request
PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 118
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"clusterExpansionSpec" : {
"hostSpecs" : [ {
"id" : "40938037-917a-484f-a08e-f60520cbda85"
} ]
}
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/403bb0c8-3c16-445d-8888-d426c6e0e964
Content-Length: 142
{
"id" : "403bb0c8-3c16-445d-8888-d426c6e0e964",
"name" : "",
"status" : "UNKNOWN",
"creationTimestamp" : "2019-09-03T09:42:10.919Z"
}
-
Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.
|
Tip
|
Refer to: Get a Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed.
|
Tip
|
Refer to: Retry a Task. |
2.3.5. Compact a Cluster
When a host is removed from a cluster in a domain, the vSAN members are reduced. Ensure that you have enough hosts remaining to facilitate the configured vSAN availability. Failure to do so might result in the datastore being marked as read-only or in data loss.
Prerequisites
-
The following data is required
-
For each host to be removed
-
ID of the host
-
-
Steps
-
Validate the input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/updates' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-d '{
"clusterCompactionSpec" : {
"hosts" : [ {
"id" : "ff84ada8-3ce3-4033-a632-1ef7ab8ee833"
} ]
}
}'
HTTP Request
POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/updates HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 115
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"clusterCompactionSpec" : {
"hosts" : [ {
"id" : "ff84ada8-3ce3-4033-a632-1ef7ab8ee833"
} ]
}
}
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 296
{
"id" : "59bbaebc-6363-48ff-a258-9acabe93374c",
"description" : "Validating Cluster Compaction Spec",
"executionStatus" : "COMPLETED",
"resultStatus" : "SUCCEEDED",
"validationChecks" : [ {
"description" : "ClusterCompactionSpecValidation",
"resultStatus" : "SUCCEEDED"
} ]
}
-
In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "SUCCEEDED".
-
In case of errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "FAILED".
NoteMake changes to the input specification and re-validate using a new API invocation.
-
Trigger the task using the valid input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -u 'admin:VMwareInfra@1' -X PATCH \
-H 'Content-Type: application/json' \
-d '{
"clusterCompactionSpec" : {
"hosts" : [ {
"id" : "9a64aeb8-dc97-48a3-b852-5a963deafaf7"
} ]
}
}'
HTTP Request
PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 115
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"clusterCompactionSpec" : {
"hosts" : [ {
"id" : "9a64aeb8-dc97-48a3-b852-5a963deafaf7"
} ]
}
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/6a971756-913a-4f5e-a57f-699cc3c4f8da
Content-Length: 142
{
"id" : "6a971756-913a-4f5e-a57f-699cc3c4f8da",
"name" : "",
"status" : "UNKNOWN",
"creationTimestamp" : "2019-09-03T09:42:13.017Z"
}
-
Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.
|
Tip
|
Refer to: Get a Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed.
|
Tip
|
Refer to: Retry a Task. |
2.3.6. Delete a Cluster
|
Warning
|
Datastores on the ESXi hosts in the cluster that will be deleted are destroyed. |
|
Note
|
You cannot delete the last cluster in a domain. Instead, the domain can be deleted. |
Prerequisites
-
The following data is required
ID of the cluster to be deleted -
Ensure that a cluster with the given ID exists.
-
The cluster has been marked for deletion.
-
Migrate or backup the VMs and data on the data store associated with the cluster to another location.
Steps
-
Initialize the deletion.
|
Warning
|
It is not possible to delete a cluster without having marked it for deletion. This 2-step deletion ensures that a cluster is not deleted accidentally. |
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -u 'admin:VMwareInfra@1' -X PATCH \
-H 'Content-Type: application/json' \
-d '{
"markForDeletion" : true
}'
HTTP Request
PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 30
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"markForDeletion" : true
}
HTTP Response
HTTP/1.1 200 OK
-
Trigger the deletion.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -u 'admin:VMwareInfra@1' -X DELETE
HTTP Request
DELETE /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/1687bd82-563a-4c9a-a187-32f2708e6f27
Content-Length: 142
{
"id" : "1687bd82-563a-4c9a-a187-32f2708e6f27",
"name" : "",
"status" : "UNKNOWN",
"creationTimestamp" : "2019-09-03T09:42:11.466Z"
}
-
Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.
|
Tip
|
Refer to: Get a Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed.
|
Tip
|
Refer to: Retry a Task. |
2.4. Credentials
2.4.1. Get the Credentials
-
This API is used to fetch all credentials known to the system.
Prerequisites
-
The following data is required
-
Resource type, name, IP address or the domain name associated with the resource is required to filter the results. For allowable resource type values
-
|
Tip
|
Refer to: Get the Credentials |
Get All Credentials
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials' -i -u 'admin:VMwareInfra@1' \
-H 'privileged-username: [email protected]' \
-H 'privileged-password: VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/credentials HTTP/1.1
privileged-username: [email protected]
privileged-password: VMwareInfra@1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 5846
{
"elements" : [ {
"id" : "ca48d666-9ab0-480c-a4d4-772c35d7d4e6",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "e206b06f-45f8-40bc-b212-e7eef4ee76b6",
"resourceName" : "sfo01m01esx01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.100",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "90f7ff16-7b56-4200-985d-9f9a73361649",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "1815387f-f96f-451c-bb2b-bbd08d289f67",
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceIp" : "10.0.0.101",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "e84e178d-cfc7-49f3-bb4d-743a1cf6d503",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "133ae46f-35c1-44cb-a93d-7f49b15ec530",
"resourceName" : "sfo01m01esx03.sfo01.rainpole.local",
"resourceIp" : "10.0.0.102",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "c9166647-6edd-4b4a-a3fd-0c343482e270",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "bda0075c-9a96-45c1-944a-3dbe84252ba9",
"resourceName" : "sfo01m01esx04.sfo01.rainpole.local",
"resourceIp" : "10.0.0.103",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "30f95bb3-f485-47ac-938b-6d889959d9dd",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "e1199d72-842d-4d45-b92f-7c5195b22e84",
"resourceName" : "sfo01m01vcenter01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.6",
"resourceType" : "VCENTER",
"domainName" : "MGMT"
}
}, {
"id" : "34433cb5-d30f-4633-90cc-898b0f50305c",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "28823c05-c40b-41a6-bc2a-ef5be9ad7eda",
"resourceName" : "sfo01m01psc01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.5",
"resourceType" : "PSC",
"domainName" : "MGMT"
}
}, {
"id" : "034eb80f-f25c-4fd0-a015-856cb91da3c3",
"credentialType" : "SSO",
"username" : "[email protected]",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "5e5ecaeb-a99b-4129-82c6-bfcca8a725d7",
"resourceName" : "sfo01m01psc01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.5",
"resourceType" : "PSC",
"domainName" : "MGMT"
}
}, {
"id" : "71ade310-9440-4fb3-b88f-f9886b712b6f",
"credentialType" : "API",
"username" : "admin",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "102cba34-22d1-490a-aad5-e90e4327ed00",
"resourceName" : "sfo01m01nsx01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.9",
"resourceType" : "NSX_MANAGER",
"domainName" : "MGMT"
}
}, {
"id" : "26b6a6a2-1f17-44d4-962e-a6fc9679a60e",
"credentialType" : "API",
"username" : "admin",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "b841c247-4ce4-45d9-97fa-38776152ffb2",
"resourceName" : "sfo01m01nsxc01",
"resourceIp" : "10.0.0.42",
"resourceType" : "NSX_CONTROLLER",
"domainName" : "MGMT"
}
}, {
"id" : "9c541a08-cd69-4d18-ae1d-13e89586328b",
"credentialType" : "API",
"username" : "admin",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "865e921f-7f11-4134-a988-7ae8f7f89900",
"resourceName" : "sfo01vrli01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.15",
"resourceType" : "VRLI",
"domainName" : "MGMT"
}
}, {
"id" : "35ad459b-8add-4ba9-ae61-4574ac199866",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "2962cd3a-0942-4924-8f0c-a3cb7affa30c",
"resourceName" : "sfo01vrli01b.sfo01.rainpole.local",
"resourceIp" : "10.0.0.16",
"resourceType" : "VRLI",
"domainName" : "MGMT"
}
}, {
"id" : "8dc97f9f-3a8a-4afe-a4c8-16abdd5afb38",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "2685d975-e5e8-4151-8a7f-1f4c761a592c",
"resourceName" : "vrops01svr01a.rainpole.local",
"resourceIp" : "10.0.1.33",
"resourceType" : "VROPS",
"domainName" : "MGMT"
}
}, {
"id" : "e379b7df-249c-4e6d-aa45-cd1bf41ced6d",
"credentialType" : "API",
"username" : "admin",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "285a3186-d945-4c17-ad41-e7751d3ad324",
"resourceName" : "vrops01svr01.rainpole.local",
"resourceIp" : "10.0.0.31",
"resourceType" : "VROPS",
"domainName" : "MGMT"
}
}, {
"id" : "43373216-679d-4215-906d-340ce3120ae3",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "01dee9ad-8030-40b0-98bd-a7e598493524",
"resourceName" : "vrslcm01svr01a.rainpole.local",
"resourceIp" : "10.0.0.32",
"resourceType" : "VRSLCM",
"domainName" : "MGMT"
}
}, {
"id" : "e96b4e96-0b74-49b2-b608-b23762a334e3",
"credentialType" : "API",
"username" : "admin@localhost",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "88bd9cc7-f41c-4e89-b9e9-0204c1fb1413",
"resourceName" : "vrslcm01svr01a.rainpole.local",
"resourceIp" : "10.0.0.32",
"resourceType" : "VRSLCM",
"domainName" : "MGMT"
}
} ]
}
Get Credentials by "resourceName"
This API can be used to fetch the credentials associated with a resource with a specific name.
Steps
-
Invoke the API by specifying the "resourceName".
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials?resourceName=sfo01m01esx02.sfo01.rainpole.local' -i -u 'admin:VMwareInfra@1' \
-H 'privileged-username: [email protected]' \
-H 'privileged-password: VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/credentials?resourceName=sfo01m01esx02.sfo01.rainpole.local HTTP/1.1
privileged-username: [email protected]
privileged-password: VMwareInfra@1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 409
{
"elements" : [ {
"id" : "90f7ff16-7b56-4200-985d-9f9a73361649",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "1815387f-f96f-451c-bb2b-bbd08d289f67",
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceIp" : "10.0.0.101",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
} ]
}
Get Credentials by "resourceIP"
This API can be used to fetch the credentials associated with a resource with a specific IP address.
Steps
-
Invoke the API by specifying the "resourceIP".
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials?resourceIP=10.0.0.101' -i -u 'admin:VMwareInfra@1' \
-H 'privileged-username: [email protected]' \
-H 'privileged-password: VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/credentials?resourceIP=10.0.0.101 HTTP/1.1
privileged-username: [email protected]
privileged-password: VMwareInfra@1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 409
{
"elements" : [ {
"id" : "90f7ff16-7b56-4200-985d-9f9a73361649",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "1815387f-f96f-451c-bb2b-bbd08d289f67",
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceIp" : "10.0.0.101",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
} ]
}
Get Credentials by "resourceType"
This API can be used to fetch the credentials associated with all the resources with a specific resource type.
Steps
-
Invoke the API by specifying the "resourceType".
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials?resourceType=ESXI' -i -u 'admin:VMwareInfra@1' \
-H 'privileged-username: [email protected]' \
-H 'privileged-password: VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/credentials?resourceType=ESXI HTTP/1.1
privileged-username: [email protected]
privileged-password: VMwareInfra@1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1573
{
"elements" : [ {
"id" : "aed08ca8-52df-4ddd-a08b-7af78a05e10d",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "574cfe3e-4c9d-446c-bfd0-696578a391dd",
"resourceName" : "sfo01m01esx01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.100",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "90f7ff16-7b56-4200-985d-9f9a73361649",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "1815387f-f96f-451c-bb2b-bbd08d289f67",
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceIp" : "10.0.0.101",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "0c401842-77a8-4124-80c7-c0f9e7817f50",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "cf96222b-8e54-4bcb-9397-cc4692e2bafb",
"resourceName" : "sfo01m01esx03.sfo01.rainpole.local",
"resourceIp" : "10.0.0.102",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "1cec1a3d-97db-4d06-9bea-67f19981b640",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "8651cd7f-97cd-4756-999b-1a63342f9374",
"resourceName" : "sfo01m01esx04.sfo01.rainpole.local",
"resourceIp" : "10.0.0.103",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
} ]
}
Get Credentials by "domainName"
This API can be used to fetch the credentials associated with all the resources belonging to a specific domain.
Steps
-
Invoke the API by specifying the "domainName".
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials?domainName=MGMT' -i -u 'admin:VMwareInfra@1' \
-H 'privileged-username: [email protected]' \
-H 'privileged-password: VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/credentials?domainName=MGMT HTTP/1.1
privileged-username: [email protected]
privileged-password: VMwareInfra@1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 5846
{
"elements" : [ {
"id" : "b505057c-0e3d-4a2f-b0fc-df9c25007522",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "0d8cb6e5-8343-41d1-81df-7fe9926a9787",
"resourceName" : "sfo01m01esx01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.100",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "90f7ff16-7b56-4200-985d-9f9a73361649",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "1815387f-f96f-451c-bb2b-bbd08d289f67",
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceIp" : "10.0.0.101",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "c7feff27-6bf1-4124-939f-90a5a0f33427",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "15fb0a79-d1a8-4d49-8406-f65b57c8417e",
"resourceName" : "sfo01m01esx03.sfo01.rainpole.local",
"resourceIp" : "10.0.0.102",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "49012a6c-86ea-4108-9392-31720fe4da53",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "8b6422bd-4944-42e6-81e6-c8a9fac0b194",
"resourceName" : "sfo01m01esx04.sfo01.rainpole.local",
"resourceIp" : "10.0.0.103",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}, {
"id" : "9b877e97-5f4b-4e0e-a42b-c4b64ba0260e",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "c8475647-928d-4b4a-998d-1bcdb035ed06",
"resourceName" : "sfo01m01vcenter01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.6",
"resourceType" : "VCENTER",
"domainName" : "MGMT"
}
}, {
"id" : "4cfc0c2b-5fd8-4b32-88eb-4b2cccad0bf7",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "5df3d75f-789c-4021-9937-1ff1cace51ab",
"resourceName" : "sfo01m01psc01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.5",
"resourceType" : "PSC",
"domainName" : "MGMT"
}
}, {
"id" : "c0725210-d3f4-4df5-96dd-268259e39b4a",
"credentialType" : "SSO",
"username" : "[email protected]",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "9383c4e0-f695-4559-a16e-64e79dc2b485",
"resourceName" : "sfo01m01psc01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.5",
"resourceType" : "PSC",
"domainName" : "MGMT"
}
}, {
"id" : "163bc674-7e44-42dd-a373-e60d3580ad7c",
"credentialType" : "API",
"username" : "admin",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "599a4bf0-754e-42b5-82b7-4eaa332715bb",
"resourceName" : "sfo01m01nsx01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.9",
"resourceType" : "NSX_MANAGER",
"domainName" : "MGMT"
}
}, {
"id" : "2128d221-f6bf-4515-94ba-35b18bbb0a50",
"credentialType" : "API",
"username" : "admin",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "0bc0d4f9-bee7-4dfb-897f-21a52e0bd33f",
"resourceName" : "sfo01m01nsxc01",
"resourceIp" : "10.0.0.42",
"resourceType" : "NSX_CONTROLLER",
"domainName" : "MGMT"
}
}, {
"id" : "a869d30e-6f37-4bc8-9dd5-cbeb4774d657",
"credentialType" : "API",
"username" : "admin",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "84585680-d7a0-4021-ac11-b5374247d298",
"resourceName" : "sfo01vrli01.sfo01.rainpole.local",
"resourceIp" : "10.0.0.15",
"resourceType" : "VRLI",
"domainName" : "MGMT"
}
}, {
"id" : "c0a78fde-9e45-46c9-907d-2eadf69a6d65",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "c64f9f61-694f-4f82-a8e7-ae6825a00369",
"resourceName" : "sfo01vrli01b.sfo01.rainpole.local",
"resourceIp" : "10.0.0.16",
"resourceType" : "VRLI",
"domainName" : "MGMT"
}
}, {
"id" : "0b7ba440-ed9d-4970-a232-05565e041489",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "ba9551eb-24e3-45c6-97f2-869506e4a6c9",
"resourceName" : "vrops01svr01a.rainpole.local",
"resourceIp" : "10.0.1.33",
"resourceType" : "VROPS",
"domainName" : "MGMT"
}
}, {
"id" : "eddf8524-9502-46cb-aad3-2dfe9b2b5315",
"credentialType" : "API",
"username" : "admin",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "02bf6b9c-4d5e-4d8a-9a6c-ef1d05bf8859",
"resourceName" : "vrops01svr01.rainpole.local",
"resourceIp" : "10.0.0.31",
"resourceType" : "VROPS",
"domainName" : "MGMT"
}
}, {
"id" : "0afa2399-b067-4924-8a82-09ac8860e35a",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "d4706474-33ba-4236-abb3-e7848dcde60c",
"resourceName" : "vrslcm01svr01a.rainpole.local",
"resourceIp" : "10.0.0.32",
"resourceType" : "VRSLCM",
"domainName" : "MGMT"
}
}, {
"id" : "3eba1c17-9848-447c-a20c-c6775d225ea0",
"credentialType" : "API",
"username" : "admin@localhost",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "698e02e3-809d-412f-a297-7a2a5e77ea93",
"resourceName" : "vrslcm01svr01a.rainpole.local",
"resourceIp" : "10.0.0.32",
"resourceType" : "VRSLCM",
"domainName" : "MGMT"
}
} ]
}
2.4.2. Get a Credential
-
This API is used to fetch credential for an ID.
Prerequisites
-
The following data is required
-
ID of the credential
-
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials/90f7ff16-7b56-4200-985d-9f9a73361649' -i -u 'admin:VMwareInfra@1' \
-H 'privileged-username: [email protected]' \
-H 'privileged-password: VMwareInfra@1'
HTTP Request
GET /v1/credentials/90f7ff16-7b56-4200-985d-9f9a73361649 HTTP/1.1
privileged-username: [email protected]
privileged-password: VMwareInfra@1
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 362
{
"id" : "90f7ff16-7b56-4200-985d-9f9a73361649",
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1",
"resource" : {
"resourceId" : "1815387f-f96f-451c-bb2b-bbd08d289f67",
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceIp" : "10.0.0.101",
"resourceType" : "ESXI",
"domainName" : "MGMT"
}
}
2.4.3. Update the Passwords
-
This API is used to update passwords for list of resources by supplying new passwords.
Prerequisites
-
The following data is required
-
Name or ID of the resource
-
Type of the resource
-
Credential type of the resource
-
Username of the resource
-
|
Tip
|
Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource. |
-
New password must be in compliance with the password policies.
|
Tip
|
Refer to: Documentation of the product for product specific password policies. |
Steps
-
Trigger the task using the valid input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials' -i -u 'admin:VMwareInfra@1' -X PATCH \
-H 'Content-Type: application/json' \
-H 'privileged-username: [email protected]' \
-H 'privileged-password: VMwareInfra@1' \
-H 'Accept: application/json' \
-d '{
"operationType" : "UPDATE",
"elements" : [ {
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceType" : "ESXI",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1"
} ]
} ]
}'
HTTP Request
PATCH /v1/credentials HTTP/1.1
Content-Type: application/json
privileged-username: [email protected]
privileged-password: VMwareInfra@1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 272
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"operationType" : "UPDATE",
"elements" : [ {
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceType" : "ESXI",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1"
} ]
} ]
}
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/9a9e733a-e1e7-4314-9530-eb0b13955fb0
Content-Type: application/json;charset=UTF-8
Content-Length: 100
{
"id" : "9a9e733a-e1e7-4314-9530-eb0b13955fb0",
"name" : "UPDATE",
"status" : "IN_PROGRESS"
}
-
Poll the status of the task using the task API with the ID from the response of the previous API.
|
Tip
|
Refer to: Get a Task or Get a Credentials Task. |
-
Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.
|
Tip
|
Refer to: Get a Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed.
|
Tip
|
Refer to: Retry the Update Passwords Task. |
|
Warning
|
The password once updated cannot be rolled back. |
|
Note
|
The password is updated in the order of the input. |
|
Note
|
The passwords of the dependent resources of the requested resources will also get updated. |
2.4.4. Rotate the Passwords
-
This API is used to rotate passwords for list of resources using system generated passwords.
Prerequisites
-
The following data is required
-
Name or ID of the resource
-
Type of the resource
-
Credential type of the resource
-
Username of the resource
-
|
Tip
|
Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource. |
Steps
-
Trigger the task using the valid input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials' -i -u 'admin:VMwareInfra@1' -X PATCH \
-H 'Content-Type: application/json' \
-H 'privileged-username: [email protected]' \
-H 'privileged-password: VMwareInfra@1' \
-H 'Accept: application/json' \
-d '{
"operationType" : "ROTATE",
"elements" : [ {
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceType" : "ESXI",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root"
} ]
} ]
}'
HTTP Request
PATCH /v1/credentials HTTP/1.1
Content-Type: application/json
privileged-username: [email protected]
privileged-password: VMwareInfra@1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 236
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"operationType" : "ROTATE",
"elements" : [ {
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceType" : "ESXI",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root"
} ]
} ]
}
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/cb3e9cf3-62bc-43df-a397-59784ce479a2
Content-Type: application/json;charset=UTF-8
Content-Length: 100
{
"id" : "cb3e9cf3-62bc-43df-a397-59784ce479a2",
"name" : "ROTATE",
"status" : "IN_PROGRESS"
}
-
Poll the status of the task using the task API with the ID from the response of the previous API.
|
Tip
|
Refer to: Get a Task or Get a Credentials Task. |
-
Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.
|
Tip
|
Refer to: Get a Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed.
|
Tip
|
Refer to: Retry the Rotate passwords Task. |
|
Warning
|
The password once rotated cannot be rolled back. |
|
Note
|
The password is rotated in the order of the input. |
|
Note
|
The passwords of the dependent resources of the requested resources will also get rotated. |
2.4.5. Retry the Update Passwords Task
-
This API is used to retry a failed update passwords task.
Prerequisites
-
The following data is required
-
ID of the last triggered failed update passwords task
-
Name or ID of the resource
-
Type of the resource
-
Credential type of the resource
-
Username of the resource
-
|
Tip
|
Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource and ID of the failed task. |
-
New password must be in compliance with the password policies.
|
Tip
|
Refer to: Documentation of the product for product specific password policies. |
Steps
-
Trigger the task using the valid input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials/tasks/f221d17d-5273-468d-8096-62bc27255dcb' -i -u 'admin:VMwareInfra@1' -X PATCH \
-H 'Content-Type: application/json' \
-H 'privileged-username: [email protected]' \
-H 'privileged-password: VMwareInfra@1' \
-H 'Accept: application/json' \
-d '{
"operationType" : "UPDATE",
"elements" : [ {
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceType" : "ESXI",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1"
} ]
} ]
}'
HTTP Request
PATCH /v1/credentials/tasks/f221d17d-5273-468d-8096-62bc27255dcb HTTP/1.1
Content-Type: application/json
privileged-username: [email protected]
privileged-password: VMwareInfra@1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 272
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"operationType" : "UPDATE",
"elements" : [ {
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceType" : "ESXI",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root",
"password" : "VMwareInfra@1"
} ]
} ]
}
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/f221d17d-5273-468d-8096-62bc27255dcb
Content-Type: application/json;charset=UTF-8
Content-Length: 100
{
"id" : "f221d17d-5273-468d-8096-62bc27255dcb",
"name" : "UPDATE",
"status" : "IN_PROGRESS"
}
-
Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.
|
Tip
|
Refer to: Get a Task or Get a Credentials Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed by providing previous credentials rotate specification or by amending the credentials rotate specification for FAILED resources.
|
Tip
|
Refer to: Retry the Update Passwords Task. |
-
The failed task can be cancelled.
|
Tip
|
Refer to: Cancel the Update/Rotate Passwords Task. |
|
Warning
|
The password once updated cannot be rolled back. |
|
Note
|
The password is updated in the order of the input. |
|
Note
|
Retry should be performed if updating passwords task has failed. |
|
Note
|
Retry should be performed on the same list of resources as in the failed operation specification. |
|
Tip
|
Refer to: Get the Resource Credentials for Credentials Task for the list of resources in the failed task. |
|
Note
|
The passwords of the dependent resources of the requested resources will also get updated. |
2.4.6. Retry the Rotate passwords Task
-
This API is used to retry a failed rotate passwords task.
Prerequisites
-
The following data is required
-
ID of the last triggered failed rotate passwords task
-
Name or ID of the resource
-
Type of the resource
-
Credential type of the resource
-
Username of the resource
-
|
Tip
|
Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource and ID of the failed task. |
Steps
-
Trigger the task using the valid input specification.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials/tasks/120b814b-e476-4a49-abba-088ac09d08f0' -i -u 'admin:VMwareInfra@1' -X PATCH \
-H 'Content-Type: application/json' \
-H 'privileged-username: [email protected]' \
-H 'privileged-password: VMwareInfra@1' \
-H 'Accept: application/json' \
-d '{
"operationType" : "ROTATE",
"elements" : [ {
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceType" : "ESXI",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root"
} ]
} ]
}'
HTTP Request
PATCH /v1/credentials/tasks/120b814b-e476-4a49-abba-088ac09d08f0 HTTP/1.1
Content-Type: application/json
privileged-username: [email protected]
privileged-password: VMwareInfra@1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 236
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"operationType" : "ROTATE",
"elements" : [ {
"resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
"resourceType" : "ESXI",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root"
} ]
} ]
}
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/tasks/120b814b-e476-4a49-abba-088ac09d08f0
Content-Type: application/json;charset=UTF-8
Content-Length: 100
{
"id" : "120b814b-e476-4a49-abba-088ac09d08f0",
"name" : "ROTATE",
"status" : "IN_PROGRESS"
}
-
Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.
|
Tip
|
Refer to: Get a Task or Get a Credentials Task. |
-
If the "status" is "SUCCESSFUL", the task is completed successfully.
-
If the "status" is "FAILED", the task can be re-executed by providing previous credentials rotate specification or by amending the credentials rotate specification for FAILED resources.
|
Tip
|
Refer to: Retry the Rotate passwords Task. |
-
The failed task can be cancelled.
|
Tip
|
Refer to: Cancel the Update/Rotate Passwords Task. |
|
Warning
|
The password once rotated cannot be rolled back. |
|
Note
|
The password is rotated in the order of the input. |
|
Note
|
Retry should be performed if some password rotation task has failed. |
|
Note
|
Retry should be performed on the same list of resources as in the failed operation specification. |
|
Tip
|
Refer to: Get the Resource Credentials for Credentials Task for the list of resources in the failed task. |
|
Note
|
The passwords of the dependent resources of the requested resources will also get rotated. |
2.4.7. Cancel the Update/Rotate Passwords Task
-
This API is used to cancel a failed update or rotate passwords task.
Prerequisites
-
The following data is required
-
ID of the last triggered failed update/rotate passwords task
-
|
Tip
|
Refer to: Get the Credentials Tasks section to get the ID of the failed task. |
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials/tasks/12a12eb1-650a-4311-84b0-d2f9cebf9612' -i -u 'admin:VMwareInfra@1' -X DELETE
HTTP Request
DELETE /v1/credentials/tasks/12a12eb1-650a-4311-84b0-d2f9cebf9612 HTTP/1.1
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 204 No Content
Content-Type: application/json;charset=UTF-8
Content-Length: 103
{
"id" : "12a12eb1-650a-4311-84b0-d2f9cebf9612",
"name" : "USER CANCELLED",
"status" : "FAILED"
}
|
Warning
|
The password once updated or rotated cannot be rolled back. |
|
Note
|
The password is updated or rotated in the order of the input. |
|
Note
|
Cancel should be performed to release the internal global lock held at VCF instance level if some password updation or rotation task has failed after several retries. |
2.4.8. Get the Credentials Tasks
-
This API is used to fetch all credentials tasks in reverse chronological order.
Prerequisites
None
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials/tasks' -i -u 'admin:VMwareInfra@1' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
HTTP Request
GET /v1/credentials/tasks HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 650
{
"elements" : [ {
"id" : "186d891f-aac3-4501-ae52-afb89eb7e32f",
"name" : "Credentials rotate operation",
"creationTimestamp" : "2018-11-05T05:15:32.864Z",
"status" : "SUCCESSFUL",
"subTasks" : [ {
"name" : "vracafe3.rainpole.local:SSH",
"creationTimestamp" : "2018-11-05T05:15:32.864Z",
"status" : "SUCCESSFUL"
}, {
"name" : "vracafe2.rainpole.local:SSH",
"creationTimestamp" : "2018-11-05T05:15:32.864Z",
"status" : "SUCCESSFUL"
}, {
"name" : "vracafe1.rainpole.local:SSH",
"creationTimestamp" : "2018-11-05T05:15:32.864Z",
"status" : "SUCCESSFUL"
} ]
} ]
}
2.4.9. Get a Credentials Task
-
This API is used to fetch a credentials task for an ID.
Prerequisites
-
The following data is required
-
ID of the credentials task
-
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials/tasks/186d891f-aac3-4501-ae52-afb89eb7e32f' -i -u 'admin:VMwareInfra@1' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
HTTP Request
GET /v1/credentials/tasks/186d891f-aac3-4501-ae52-afb89eb7e32f HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 591
{
"id" : "186d891f-aac3-4501-ae52-afb89eb7e32f",
"name" : "Credentials rotate operation",
"creationTimestamp" : "2018-11-05T05:15:32.864Z",
"status" : "SUCCESSFUL",
"subTasks" : [ {
"name" : "vracafe3.rainpole.local:SSH",
"creationTimestamp" : "2018-11-05T05:15:32.864Z",
"status" : "SUCCESSFUL"
}, {
"name" : "vracafe2.rainpole.local:SSH",
"creationTimestamp" : "2018-11-05T05:15:32.864Z",
"status" : "SUCCESSFUL"
}, {
"name" : "vracafe1.rainpole.local:SSH",
"creationTimestamp" : "2018-11-05T05:15:32.864Z",
"status" : "SUCCESSFUL"
} ]
}
2.4.10. Get the Resource Credentials for Credentials Task
-
This API is used to fetch resource credentials for a credentials task ID.
Prerequisites
-
The following data is required
-
ID of the credentials task
-
|
Tip
|
Refer to: Get the Credentials Tasks to get the ID of credentials tasks. |
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/credentials/tasks/186d891f-aac3-4501-ae52-afb89eb7e32f/resource-credentials' -i -u 'admin:VMwareInfra@1' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
HTTP Request
GET /v1/credentials/tasks/186d891f-aac3-4501-ae52-afb89eb7e32f/resource-credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 479
[ {
"resourceName" : "vracafe3.rainpole.local",
"resourceType" : "VRA",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root"
} ]
}, {
"resourceName" : "vracafe2.rainpole.local",
"resourceType" : "VRA",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root"
} ]
}, {
"resourceName" : "vracafe1.rainpole.local",
"resourceType" : "VRA",
"credentials" : [ {
"credentialType" : "SSH",
"username" : "root"
} ]
} ]
2.5. License Keys
2.5.1. Add a License Key
-
This API is used to add a license key.
-
Adding a license key which is already added , will give an error.
|
Tip
|
Refer to: Get a License Key to check if a license key is already present. |
-
Adding an incorrect (key size and format) or an invalid license key (invalid or expired), will give an error.
Prerequisites
-
The following data is required
-
License key
-
Product type
-
License key description
-
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/license-keys' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"key" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"productType" : "NSXV",
"description" : "vCenter license key"
}'
HTTP Request
POST /v1/license-keys HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 112
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"key" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"productType" : "NSXV",
"description" : "vCenter license key"
}
HTTP Response
HTTP/1.1 201 Created
Location: /v1/license-keys/XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
2.5.2. Get the License Keys
-
This API is used to get all the license keys.
-
This also gives the license key metrics like usage and validity of a license key.
-
License keys can be filtered based on product type and/or license key status.
Steps
-
Invoke the API.
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/license-keys' -i -u 'admin:VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/license-keys HTTP/1.1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 912
{
"elements" : [ {
"id" : "b128c86b-e99f-47dc-b839-420dc07e3de5",
"key" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"productType" : "VCENTER",
"description" : "vCenter license key",
"isUnlimited" : false,
"licenseKeyUsage" : {
"total" : 5,
"remaining" : 4,
"used" : 1,
"licenseUnit" : "INSTANCE"
},
"licenseKeyValidity" : {
"licenseKeyStatus" : "ACTIVE",
"expiryDate" : "2029-05-23T16:12:53.001Z"
}
}, {
"id" : "9ae31627-5ab7-4839-a409-bca2750eab1c",
"key" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"productType" : "NSXV",
"description" : "NSX-V license key",
"isUnlimited" : false,
"licenseKeyUsage" : {
"total" : 15,
"remaining" : 14,
"used" : 1,
"licenseUnit" : "VM"
},
"licenseKeyValidity" : {
"licenseKeyStatus" : "ACTIVE",
"expiryDate" : "2029-05-23T16:12:53.001Z"
}
} ]
}
Get License Keys By Product Type
Steps
-
Invoke the API by specifying the _"productType".
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/license-keys?productType=VCENTER,ESXI' -i -u 'admin:VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/license-keys?productType=VCENTER,ESXI HTTP/1.1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 471
{
"elements" : [ {
"id" : "572e0ce2-cac2-4016-a4aa-664ef9d31761",
"key" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"productType" : "VCENTER",
"description" : "vCenter license key",
"isUnlimited" : false,
"licenseKeyUsage" : {
"total" : 5,
"remaining" : 4,
"used" : 1,
"licenseUnit" : "INSTANCE"
},
"licenseKeyValidity" : {
"licenseKeyStatus" : "ACTIVE",
"expiryDate" : "2029-05-23T16:12:53.001Z"
}
} ]
}
Get License Keys By Status Of The License Key
Steps
-
Invoke the API by specifying the _"licenseKeyStatus".
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/license-keys?licenseKeyStatus=ACTIVE,NEVER_EXPIRES' -i -u 'admin:VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/license-keys?licenseKeyStatus=ACTIVE,NEVER_EXPIRES HTTP/1.1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 471
{
"elements" : [ {
"id" : "67c8e1d5-d065-48d7-866d-69464547de58",
"key" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"productType" : "VCENTER",
"description" : "vCenter license key",
"isUnlimited" : false,
"licenseKeyUsage" : {
"total" : 5,
"remaining" : 4,
"used" : 1,
"licenseUnit" : "INSTANCE"
},
"licenseKeyValidity" : {
"licenseKeyStatus" : "ACTIVE",
"expiryDate" : "2029-05-23T16:12:53.001Z"
}
} ]
}
2.5.3. Get a License Key
-
This API is used to get the license key metrics like usage and validity of a license key.
-
If the license key does not exist, you will get an error.
Prerequisites
-
The following data is required
-
License key
-
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/license-keys/XXXXX-XXXXX-XXXXX-XXXXX-XXXXX' -i -u 'admin:VMwareInfra@1' \
-H 'Accept: application/json'
HTTP Request
GET /v1/license-keys/XXXXX-XXXXX-XXXXX-XXXXX-XXXXX HTTP/1.1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 416
{
"id" : "314cb393-2280-45bf-9724-a42ca4e0cc32",
"key" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"productType" : "VCENTER",
"description" : "vCenter license key",
"isUnlimited" : false,
"licenseKeyUsage" : {
"total" : 5,
"remaining" : 4,
"used" : 1,
"licenseUnit" : "INSTANCE"
},
"licenseKeyValidity" : {
"licenseKeyStatus" : "ACTIVE",
"expiryDate" : "2029-05-23T16:12:53.001Z"
}
}
2.5.4. Delete a License Key
-
This API is used to delete a license key.
|
Warning
|
Deleting a license key which is in use, will give an error. |
Prerequisites
-
The following data is required
-
License key
-
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/license-keys/XXXXX-XXXXX-XXXXX-XXXXX-XXXXX' -i -u 'admin:VMwareInfra@1' -X DELETE \
-H 'Accept: application/json'
HTTP Request
DELETE /v1/license-keys/XXXXX-XXXXX-XXXXX-XXXXX-XXXXX HTTP/1.1
Accept: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 204 No Content
2.6. Network Pools
2.6.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.
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
-
-
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/network-pools' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-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
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 304
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"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/697e7560-b7aa-4812-8875-75e9b8250160
2.6.2. Get the Network Pools
Prerequisites
None
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/network-pools' -i -u 'admin:VMwareInfra@1' \
-H 'Content-Type: application/json'
HTTP Request
GET /v1/network-pools HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 375
{
"elements" : [ {
"id" : "a2532f77-323c-49ae-b998-539de32b0b47",
"name" : "engineering-networkpool",
"networks" : [ {
"id" : "7dbc61b5-1a0e-4822-84d9-ce2d7151e76b"
} ]
}, {
"id" : "31d4ea0d-6e4d-4301-b7a0-b065d9c12add",
"name" : "finance-networkpool",
"networks" : [ {
"id" : "0b94b37b-9955-4d57-84cf-b25ec4bcb7bb"
} ]
} ]
}
2.6.3. Get a Network Pool
Prerequisites
-
The following data is required
-
ID of the network pool
-
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/network-pools/a3ae2fd7-9d69-4f66-a3c7-12f66257af8c' -i -u 'admin:VMwareInfra@1' \
-H 'Content-Type: application/json'
HTTP Request
GET /v1/network-pools/a3ae2fd7-9d69-4f66-a3c7-12f66257af8c HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 165
{
"id" : "a3ae2fd7-9d69-4f66-a3c7-12f66257af8c",
"name" : "engineering-networkpool",
"networks" : [ {
"id" : "15729047-0166-404e-9f5e-e2432498860e"
} ]
}
2.6.4. Get a Network of a Network Pool
Prerequisites
-
The following data is required
-
ID of the network
-
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/network-pools/a2d1c4bd-9e14-466d-a6f3-54bd1e00223a/networks/ac74f5bd-3a66-4fc0-9942-34916e926ede' -i -u 'admin:VMwareInfra@1' \
-H 'Content-Type: application/json'
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 270
{
"id" : "ac74f5bd-3a66-4fc0-9942-34916e926ede",
"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"
} ]
}
2.6.5. 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.
Prerequisites
-
The following data is required
-
ID of the network pool
-
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://sddc-manager.sfo01.rainpole.local/v1/network-pools/9605daaa-d6ef-43fd-b817-ba02fab3ff02' -i -u 'admin:VMwareInfra@1' -X DELETE \
-H 'Content-Type: application/json'
HTTP Request
DELETE /v1/network-pools/9605daaa-d6ef-43fd-b817-ba02fab3ff02 HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 204 No Content
2.6.6. Add an IP Pool to a Network of a Network Pool
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
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/network-pools/c59d83f5-7783-4c1d-b6ef-5f8f8055f20b/networks/2358f051-d38e-4708-b4c9-be710f7f2f12/ip-pools' -i -u 'admin:VMwareInfra@1' -X POST \
-H 'Content-Type: application/json' \
-d '{
"start" : "192.168.8.5",
"end" : "192.168.8.8"
}'
Request Body
POST /v1/network-pools/c59d83f5-7783-4c1d-b6ef-5f8f8055f20b/networks/2358f051-d38e-4708-b4c9-be710f7f2f12/ip-pools HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 54
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"start" : "192.168.8.5",
"end" : "192.168.8.8"
}
Response Body
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 270
{
"id" : "5e885396-5fac-4ade-80c4-2b54f022248c",
"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"
} ]
}
2.6.7. Delete an IP Pool from a Network of a Network Pool
Prerequisites
-
The following data is required
-
ID of the IP pool
-
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/network-pools/283823f3-2fd1-434d-8c24-de221b7e18ae/networks/f76ae118-c952-4b22-92ca-8845fe756d13/ip-pools' -i -u 'admin:VMwareInfra@1' -X DELETE \
-H 'Content-Type: application/json' \
-d '{
"start" : "192.168.8.5",
"end" : "192.168.8.8"
}'
Response Body
DELETE /v1/network-pools/283823f3-2fd1-434d-8c24-de221b7e18ae/networks/f76ae118-c952-4b22-92ca-8845fe756d13/ip-pools HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Content-Length: 54
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
{
"start" : "192.168.8.5",
"end" : "192.168.8.8"
}
Response Body
HTTP/1.1 204 No Content
2.7. Tasks
2.7.1. Get the Tasks
Prerequisites
None
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/tasks' -i -u 'admin:VMwareInfra@1' \
-H 'Content-Type: application/json'
HTTP Request
GET /v1/tasks HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1750
{
"elements" : [ {
"id" : "7849572e-7226-43cf-9c4b-a840d400da0d",
"name" : "Commissioning host(s) esxi-5.vrack.vsphere.local to VMware Cloud Foundation",
"status" : "Failed",
"creationTimestamp" : "2019-06-20T12:03:18.890Z",
"subTasks" : [ {
"name" : "HostVibValidationAction",
"description" : "Validate the hosts for any disallowed VIBS",
"status" : "SUCCESSFUL",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
}, {
"name" : "HostMaintenanceModeValidationAction",
"description" : "Verifies that none of the hosts are in maintenance mode",
"status" : "FAILED",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
}, {
"name" : "FetchDnsAndNtpAction",
"description" : "Fetches DNS \\u0026 NTP IPs",
"status" : "PENDING",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
} ],
"errors" : [ {
"errorCode" : "COMMISION_HOST_FAILED",
"message" : "Failed to Commissioning host(s) esxi-5.vrack.vsphere.local to VMware Cloud Foundation"
} ],
"resources" : [ {
"resourceId" : "1e2514a2-ca63-4ffb-a66c-e8fce15637bf",
"type" : "HOST"
} ]
}, {
"id" : "7d17a480-79f6-4dcd-ac12-949ed33148f6",
"name" : "Credentials rotate operation",
"status" : "Successful",
"creationTimestamp" : "2019-06-20T12:03:18.890Z",
"subTasks" : [ {
"name" : "sddc-manager.vrack.vsphere.local:FTP",
"description" : "Password rotate for sddc-manager.vrack.vsphere.local and credential type FTP",
"status" : "SUCCESSFUL",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
} ],
"resources" : [ {
"resourceId" : "20d804fd-795d-434f-9c4a-de5e00389392",
"type" : "HOST"
} ]
} ]
}
2.7.2. Get a Task
Prerequisites
-
The following data is required
-
ID of the task
-
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/tasks/26c5b70c-9a6f-4d66-bca0-bff848cb38a5' -i -u 'admin:VMwareInfra@1' \
-H 'Content-Type: application/json'
HTTP Request
GET /v1/tasks/26c5b70c-9a6f-4d66-bca0-bff848cb38a5 HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 878
{
"id" : "26c5b70c-9a6f-4d66-bca0-bff848cb38a5",
"name" : "Vi workload Domain Creation",
"status" : "FAILED",
"creationTimestamp" : "1970-01-19T03:25:03.457Z",
"subTasks" : [ {
"name" : "HostVibValidationAction",
"description" : "Validate the hosts for any disallowed VIBS",
"status" : "SUCCESSFUL",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
}, {
"name" : "HostMaintenanceModeValidationAction",
"description" : "Verifies that none of the hosts are in maintenance mode",
"status" : "FAILED",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
}, {
"name" : "FetchDnsAndNtpAction",
"description" : "Fetches DNS \\u0026 NTP IPs",
"status" : "PENDING",
"creationTimestamp" : "2019-06-20T12:03:18.890Z"
} ],
"resources" : [ {
"resourceId" : "63fafcee-6552-4959-b697-1727f597d8d5",
"type" : "HOST"
} ]
}
2.7.3. Retry a Task
Used to retry a failed task/workflow.
Prerequisites
-
The following data is required
-
ID of the failed task
-
Steps
-
Invoke the API
cURL Request
$ curl 'https://sddc-manager.sfo01.rainpole.local/v1/tasks/f42ae33f-e640-4c45-9539-1e3c50c5028c' -i -u 'admin:VMwareInfra@1' -X PATCH \
-H 'Content-Type: application/json'
HTTP Request
PATCH /v1/tasks/f42ae33f-e640-4c45-9539-1e3c50c5028c HTTP/1.1
Content-Type: application/json
Host: sddc-manager.sfo01.rainpole.local
Authorization: Basic YWRtaW46Vk13YXJlSW5mcmFAMQ==
HTTP Response
HTTP/1.1 200 OK
|
Note
|
The credentials' update/rotate password tasks cannot be retried using this API. Refer to Retry a failed credentials task for a given ID section. |