Domains APIs
APIs for managing Domains
Table of Contents
Note : The ipAddress field in request payload or response body are deprecated and will be removed. Please use fqdn field instead.
A workload domain is a policy based resource container with specific availability and performance attributes that combines compute (vSphere), storage (vSAN) and networking (NSX) into a single consumable entity.
1. Create a Domain
This method has been deprecated from the VCF 4.5 release. Please refer to section Create a Domain with Workflow Optimization 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.
1.1. Prerequisites API
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
Password for the root user (8-20 characters)
1.2. Steps API
- Validate the input specification
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/validations' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"domainName" : "sfo-w01",
"vcenterSpec" : {
"name" : "sfo-w01-vc01",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "sfo-w01-vc01.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "S@mpleP@ss123!",
"datacenterName" : "sfo-w01-dc01",
"vmSize" : "tiny",
"storageSize" : "lstorage"
},
"ssoDomainSpec" : {
"createManagementDomain" : false
}
}'
HTTP Request
POST /v1/domains/validations HTTP/1.1
Content-Type: application/json
Content-Length: 468
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"domainName" : "sfo-w01",
"vcenterSpec" : {
"name" : "sfo-w01-vc01",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "sfo-w01-vc01.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "S@mpleP@ss123!",
"datacenterName" : "sfo-w01-dc01",
"vmSize" : "tiny",
"storageSize" : "lstorage"
},
"ssoDomainSpec" : {
"createManagementDomain" : false
}
}
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/domains/validations/f6b8982c-d4af-44eb-be45-222b7a443aa4
Content-Type: application/json
Content-Length: 110
{
"id" : "f6b8982c-d4af-44eb-be45-222b7a443aa4",
"description" : "",
"executionStatus" : "IN_PROGRESS"
}
- Get Validation response of the domain specification using id obtained from previous spec validation call
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/validations/77b880f5-2aa3-42dc-a410-bc1b11141d86' -i -X GET \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/domains/validations/77b880f5-2aa3-42dc-a410-bc1b11141d86 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 185
{
"id" : "b15740e3-3788-4d39-95f2-a097660d27b1",
"description" : "Validation result",
"executionStatus" : "COMPLETED",
"resultStatus" : "SUCCEEDED",
"validationChecks" : [ ]
}
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".
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://sfo-vcf01.rainpole.io/v1/domains' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"domainName" : "sfo-w01",
"vcenterSpec" : {
"name" : "sfo-w01-vc01",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "sfo-w01-vc01.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "S@mpleP@ss123!",
"datacenterName" : "sfo-w01-dc01",
"vmSize" : "tiny",
"storageSize" : "lstorage"
},
"ssoDomainSpec" : {
"createManagementDomain" : false
}
}'
HTTP Request
POST /v1/domains HTTP/1.1
Content-Type: application/json
Content-Length: 468
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"domainName" : "sfo-w01",
"vcenterSpec" : {
"name" : "sfo-w01-vc01",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "sfo-w01-vc01.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "S@mpleP@ss123!",
"datacenterName" : "sfo-w01-dc01",
"vmSize" : "tiny",
"storageSize" : "lstorage"
},
"ssoDomainSpec" : {
"createManagementDomain" : false
}
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/null
Content-Length: 54
{
"isCancellable" : false,
"isRetryable" : false
}
- 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.
1.3. Related APIs API
[_validatedomaincreationspec] API [_createdomain] API [_gettasks] API [_gettask] API [_retrytask] API
2. Update a Domain
This method has been deprecated from the VCF 4.5 release. Please refer to section Create a Domain with Workflow Optimization Update a Domain workflow:
Import the primary cluster
For the first NSX VI Domain in your environment, the workflow deploys a cluster of three NSX Managers in the management domain. The workflow also configures an anti-affinity rule between the managers to prevent them from being on the same host for High Availability. Each subsequent NSX Domains will either share this NSX Manager Cluster or create its own.
If required, the new domain can also share the NSX cluster with an existing workload domain. In this scenario, new NSX Managers will not be deployed, but will be shared with an existing NSX Cluster.
For this, fetch the information of the NSX Managers that can be shared.
TIP: Get the NSX Clusters
From the list of NSX Clusters fetched, only the existing NSX clusters for which "isShared" is true, can be shared with the new domains being deployed.
The precise information of the existing NSX Cluster fetched from above should be used in the "nsxTSpec" section of the input payload.
Licenses integrate the deployed components with the appropriate pieces in the Cloud Foundation software stack.
2.1. Prerequisites API
VxRail Domain should have already been created.
In case of DHCP option, a DHCP server must be configured on the VLAN of the domain. When NSX creates VTEPs for the domain, they are assigned IP addresses from the DHCP server. In case of static IP for VTEPs, the network information listed below needs to be specified.
The following data is required
ID of the created domain
Host details, For each host
IP address of the host
FQDN of the host
user name of the host
password of the host
Datastore details
- License for the vSAN datastore
VxRail Manager Details
- admin and root credentials
Network Details
List of VDS (which should have a single element for VxRail), For each VDS
VDS name
- This can either refer to the name of an existing System DVS that should be used for overlay traffic, or the name of the new to-be-deployed overlay DVS.
isUsedByNsxt set to true
list of Port groups with its names and the corresponding transport type
- In the scenario where an existing system VDS should be used for overlay traffic, 'portGroupSpecs' should contain one element, i.e. a port group under the provided system DVS. VMNICS mapped to this provided port group will be used for overlay traffic. On the other hand, if a new overlay DVS is to be deployed, then 'portGroupSpecs' can be left empty.
NSX cluster Details
- VLAN ID of Geneve
{ "nsxTClusterSpec" : { "uplinkProfiles" : [ { "name" : "Uplink-Profile-1", "teamings" : [ { "policy" : "FAILOVER_ORDER", "activeUplinks" : [ "uplink-1" ], "standByUplinks" : [ "uplink-2" ] } ], "transportVlan" : 2 } ] } }
For NSX
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 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)
IP Address Pool spec if the TEP IP assignment is done from IP pool (only required in case of non-DHCP option)
Name of the IP address pool
Description of the IP address pool
IP address pool subnet details
Subnet cidr
Gateway
IP Address Pool Ranges
First IP address in the IP address range
Last IP address in the IP address range
For DHCP
{ "nsxTClusterSpec" : { "uplinkProfiles" : [ { "name" : "Uplink-Profile-1", "teamings" : [ { "policy" : "FAILOVER_ORDER", "activeUplinks" : [ "uplink-1" ], "standByUplinks" : [ "uplink-2" ] } ], "transportVlan" : 2 } ] } }
For creating new IP pool during domain creation, add the following IP address pool spec to the nsxTSpec object
{ "ipAddressPoolSpec" : { "name" : "static-ip-pool-01", "subnets" : [ { "ipAddressPoolRanges" : [ { "start" : "10.0.11.50", "end" : "10.0.11.70" }, { "start" : "10.0.11.80", "end" : "10.0.11.150" } ], "cidr" : "10.0.11.0/24", "gateway" : "10.0.11.250" } ] } }
For using an existing IP pool during domain creation, add the following IP address pool spec to the nsxTSpec object. For more information on fetching the NSX Cluster details, refer to NSX Clusters
{ "ipAddressPoolSpec" : { "name" : "static-ip-pool-01" } }
Note : To create a new IP address pool during domain creation, "subnets" , the list of IpAddressPoolSubnetSpec in the input spec must not be empty. Only the IP address pool name has to be sent in the input spec while using an existing IP address pool
2.2. Steps API
Through VxRail UI, create a cluster in the VC, which was created as part of the previous invocation of the create domain
Get the ID of the created domain
TIP: Get the Domains
Filter the response by VxRail Domain name and get the respective ID
Get the list of unmanaged clusters with names in thus created vi domain, Invoke a call to get clusters to get the details.
Tip : Refer to: Get the unmanaged clusters by criterion
- Choose the name of one cluster that needs to be imported. Invoke a call to get unmanaged cluster by selected cluster name to get the network and host details.
Tip : Refer to: Get an unmanaged cluster by criterion
Create a domain update spec
With the cluster information from previous call:
For each host populate
IP address of the host
FQDN of the host
user name of the host
password of the host
Network Details
For each VDS (Single element for VxRail)
VDS name
- This can either refer to an existing System DVS that should be used for overlay traffic, or the name of a new DVS that should be created for overlay traffic.
isUsedByNsxt set to true
list of Port groups with its names and the corresponding transport type
- In the scenario where an existing system VDS should be used for overlay traffic, 'portGroupSpecs' should contain one element, i.e. a port group under the provided system DVS. VMNICS mapped to this provided port group will be used for overlay traffic. On the other hand, if a new overlay DVS is to be deployed, then 'portGroupSpecs' can be left empty.
Choose to create a new NSX domain or select from the existing ones
- TIP: For NSX clusters refer to Get the NSX Clusters
Adding license key for NSX and vSAN datastore
- TIP: For license refer to Get a License Key
Validation of the domain specification though async call
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/1234/validations' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"clusterSpec" : {
"name" : "sfo-w01-cl01",
"vxRailDetails" : {
"rootCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"adminCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk"
},
"hostSpecs" : [ {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.30",
"hostName" : "sfo-w01-esx01",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:6Rf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czc"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.31",
"hostName" : "sfo-w01-esx02",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:6Ff1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czcd"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.32",
"hostName" : "sfo-w01-esx03",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:5Pf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Cdcf"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"licenseKey" : "123"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "sfo-w01-cl01-vds01",
"nsxtSwitchConfig" : {
"transportZones" : [ {
"name" : "sfo-w01-nsx-overlay",
"transportType" : "OVERLAY"
}, {
"name" : "sfo-w01-nsx-vlan01",
"transportType" : "VLAN"
} ],
"hostSwitchOperationalMode" : "STANDARD"
},
"portGroupSpecs" : [ {
"name" : "sfo-w01-cl01-vds01-pg-mgmt",
"transportType" : "MANAGEMENT"
} ]
} ],
"nsxClusterSpec" : {
"nsxTClusterSpec" : {
"uplinkProfiles" : [ {
"name" : "Uplink-Profile-1",
"teamings" : [ {
"policy" : "FAILOVER_ORDER",
"activeUplinks" : [ "uplink-1" ],
"standByUplinks" : [ "uplink-2" ]
} ],
"transportVlan" : 2
} ]
}
},
"networkProfiles" : [ {
"name" : "Cluster-1-network-profile01",
"isDefault" : true,
"nsxtHostSwitchConfigs" : [ {
"vdsName" : "sfo-w01-cl01-vds01",
"uplinkProfileName" : "Uplink-Profile-1",
"vdsUplinkToNsxUplink" : [ {
"vdsUplinkName" : "uplink1",
"nsxUplinkName" : "uplink-1"
}, {
"vdsUplinkName" : "uplink2",
"nsxUplinkName" : "uplink-2"
} ]
} ]
} ]
},
"skipThumbprintValidation" : false
},
"nsxTSpec" : {
"nsxManagerSpecs" : [ {
"name" : "sfo-w01-nsx01a",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01b",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.45",
"dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01c",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.46",
"dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
} ],
"vip" : "10.0.0.166",
"vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "xxxxxxxx",
"nsxManagerAuditPassword" : "xxxxxxxx",
"formFactor" : "large",
"ipAddressPoolSpec" : {
"name" : "static-ip-pool-01",
"subnets" : [ {
"ipAddressPoolRanges" : [ {
"start" : "10.0.11.50",
"end" : "10.0.11.70"
}, {
"start" : "10.0.11.80",
"end" : "10.0.11.150"
} ],
"cidr" : "10.0.11.0/24",
"gateway" : "10.0.11.250"
} ]
}
}
}'
HTTP Request
POST /v1/domains/1234/validations HTTP/1.1
Content-Type: application/json
Content-Length: 4216
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"clusterSpec" : {
"name" : "sfo-w01-cl01",
"vxRailDetails" : {
"rootCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"adminCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk"
},
"hostSpecs" : [ {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.30",
"hostName" : "sfo-w01-esx01",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:6Rf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czc"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.31",
"hostName" : "sfo-w01-esx02",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:6Ff1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czcd"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.32",
"hostName" : "sfo-w01-esx03",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:5Pf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Cdcf"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"licenseKey" : "123"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "sfo-w01-cl01-vds01",
"nsxtSwitchConfig" : {
"transportZones" : [ {
"name" : "sfo-w01-nsx-overlay",
"transportType" : "OVERLAY"
}, {
"name" : "sfo-w01-nsx-vlan01",
"transportType" : "VLAN"
} ],
"hostSwitchOperationalMode" : "STANDARD"
},
"portGroupSpecs" : [ {
"name" : "sfo-w01-cl01-vds01-pg-mgmt",
"transportType" : "MANAGEMENT"
} ]
} ],
"nsxClusterSpec" : {
"nsxTClusterSpec" : {
"uplinkProfiles" : [ {
"name" : "Uplink-Profile-1",
"teamings" : [ {
"policy" : "FAILOVER_ORDER",
"activeUplinks" : [ "uplink-1" ],
"standByUplinks" : [ "uplink-2" ]
} ],
"transportVlan" : 2
} ]
}
},
"networkProfiles" : [ {
"name" : "Cluster-1-network-profile01",
"isDefault" : true,
"nsxtHostSwitchConfigs" : [ {
"vdsName" : "sfo-w01-cl01-vds01",
"uplinkProfileName" : "Uplink-Profile-1",
"vdsUplinkToNsxUplink" : [ {
"vdsUplinkName" : "uplink1",
"nsxUplinkName" : "uplink-1"
}, {
"vdsUplinkName" : "uplink2",
"nsxUplinkName" : "uplink-2"
} ]
} ]
} ]
},
"skipThumbprintValidation" : false
},
"nsxTSpec" : {
"nsxManagerSpecs" : [ {
"name" : "sfo-w01-nsx01a",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01b",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.45",
"dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01c",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.46",
"dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
} ],
"vip" : "10.0.0.166",
"vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "xxxxxxxx",
"nsxManagerAuditPassword" : "xxxxxxxx",
"formFactor" : "large",
"ipAddressPoolSpec" : {
"name" : "static-ip-pool-01",
"subnets" : [ {
"ipAddressPoolRanges" : [ {
"start" : "10.0.11.50",
"end" : "10.0.11.70"
}, {
"start" : "10.0.11.80",
"end" : "10.0.11.150"
} ],
"cidr" : "10.0.11.0/24",
"gateway" : "10.0.11.250"
} ]
}
}
}
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/domains/1234/validations/9ca7b921-80ec-4274-8c17-a0dd3969caff
Content-Type: application/json
Content-Length: 110
{
"id" : "9ca7b921-80ec-4274-8c17-a0dd3969caff",
"description" : "",
"executionStatus" : "IN_PROGRESS"
}
- Get Validation response of the import primary cluster specification
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/6fcf77c1-53d6-4d8c-b6e1-08fece530118' -i -X GET \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/6fcf77c1-53d6-4d8c-b6e1-08fece530118 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 185
{
"id" : "17030a8c-e197-4d26-84c8-6b4fe9e27b2a",
"description" : "Validation result",
"executionStatus" : "COMPLETED",
"resultStatus" : "SUCCEEDED",
"validationChecks" : [ ]
}
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".
Note : Make changes to the input specification and re-validate using a new API invocation.
- Trigger the domain update task using the validated input spec.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/1234' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"clusterSpec" : {
"name" : "sfo-w01-cl01",
"vxRailDetails" : {
"rootCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"adminCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk"
},
"hostSpecs" : [ {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.30",
"hostName" : "sfo-w01-esx01",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:6Rf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czc"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.31",
"hostName" : "sfo-w01-esx02",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:6Ff1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czcd"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.32",
"hostName" : "sfo-w01-esx03",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:5Pf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Cdcf"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"licenseKey" : "123"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "sfo-w01-cl01-vds01",
"nsxtSwitchConfig" : {
"transportZones" : [ {
"name" : "sfo-w01-nsx-overlay",
"transportType" : "OVERLAY"
}, {
"name" : "sfo-w01-nsx-vlan01",
"transportType" : "VLAN"
} ],
"hostSwitchOperationalMode" : "STANDARD"
},
"portGroupSpecs" : [ {
"name" : "sfo-w01-cl01-vds01-pg-mgmt",
"transportType" : "MANAGEMENT"
} ]
} ],
"nsxClusterSpec" : {
"nsxTClusterSpec" : {
"uplinkProfiles" : [ {
"name" : "Uplink-Profile-1",
"teamings" : [ {
"policy" : "FAILOVER_ORDER",
"activeUplinks" : [ "uplink-1" ],
"standByUplinks" : [ "uplink-2" ]
} ],
"transportVlan" : 2
} ]
}
},
"networkProfiles" : [ {
"name" : "Cluster-1-network-profile01",
"isDefault" : true,
"nsxtHostSwitchConfigs" : [ {
"vdsName" : "sfo-w01-cl01-vds01",
"uplinkProfileName" : "Uplink-Profile-1",
"vdsUplinkToNsxUplink" : [ {
"vdsUplinkName" : "uplink1",
"nsxUplinkName" : "uplink-1"
}, {
"vdsUplinkName" : "uplink2",
"nsxUplinkName" : "uplink-2"
} ]
} ]
} ]
},
"skipThumbprintValidation" : false
},
"nsxTSpec" : {
"nsxManagerSpecs" : [ {
"name" : "sfo-w01-nsx01a",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01b",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.45",
"dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01c",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.46",
"dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
} ],
"vip" : "10.0.0.166",
"vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "xxxxxxxx",
"nsxManagerAuditPassword" : "xxxxxxxx",
"formFactor" : "large",
"ipAddressPoolSpec" : {
"name" : "static-ip-pool-01",
"subnets" : [ {
"ipAddressPoolRanges" : [ {
"start" : "10.0.11.50",
"end" : "10.0.11.70"
}, {
"start" : "10.0.11.80",
"end" : "10.0.11.150"
} ],
"cidr" : "10.0.11.0/24",
"gateway" : "10.0.11.250"
} ]
}
}
}'
HTTP Request
PATCH /v1/domains/1234 HTTP/1.1
Content-Type: application/json
Content-Length: 4216
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"clusterSpec" : {
"name" : "sfo-w01-cl01",
"vxRailDetails" : {
"rootCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"adminCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk"
},
"hostSpecs" : [ {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.30",
"hostName" : "sfo-w01-esx01",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:6Rf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czc"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.31",
"hostName" : "sfo-w01-esx02",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:6Ff1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czcd"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.32",
"hostName" : "sfo-w01-esx03",
"username" : "root",
"password" : "xxxxxxxx",
"sshThumbprint" : "SHA256:5Pf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Cdcf"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"licenseKey" : "123"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "sfo-w01-cl01-vds01",
"nsxtSwitchConfig" : {
"transportZones" : [ {
"name" : "sfo-w01-nsx-overlay",
"transportType" : "OVERLAY"
}, {
"name" : "sfo-w01-nsx-vlan01",
"transportType" : "VLAN"
} ],
"hostSwitchOperationalMode" : "STANDARD"
},
"portGroupSpecs" : [ {
"name" : "sfo-w01-cl01-vds01-pg-mgmt",
"transportType" : "MANAGEMENT"
} ]
} ],
"nsxClusterSpec" : {
"nsxTClusterSpec" : {
"uplinkProfiles" : [ {
"name" : "Uplink-Profile-1",
"teamings" : [ {
"policy" : "FAILOVER_ORDER",
"activeUplinks" : [ "uplink-1" ],
"standByUplinks" : [ "uplink-2" ]
} ],
"transportVlan" : 2
} ]
}
},
"networkProfiles" : [ {
"name" : "Cluster-1-network-profile01",
"isDefault" : true,
"nsxtHostSwitchConfigs" : [ {
"vdsName" : "sfo-w01-cl01-vds01",
"uplinkProfileName" : "Uplink-Profile-1",
"vdsUplinkToNsxUplink" : [ {
"vdsUplinkName" : "uplink1",
"nsxUplinkName" : "uplink-1"
}, {
"vdsUplinkName" : "uplink2",
"nsxUplinkName" : "uplink-2"
} ]
} ]
} ]
},
"skipThumbprintValidation" : false
},
"nsxTSpec" : {
"nsxManagerSpecs" : [ {
"name" : "sfo-w01-nsx01a",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01b",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.45",
"dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01c",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.46",
"dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
} ],
"vip" : "10.0.0.166",
"vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "xxxxxxxx",
"nsxManagerAuditPassword" : "xxxxxxxx",
"formFactor" : "large",
"ipAddressPoolSpec" : {
"name" : "static-ip-pool-01",
"subnets" : [ {
"ipAddressPoolRanges" : [ {
"start" : "10.0.11.50",
"end" : "10.0.11.70"
}, {
"start" : "10.0.11.80",
"end" : "10.0.11.150"
} ],
"cidr" : "10.0.11.0/24",
"gateway" : "10.0.11.250"
} ]
}
}
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/null
Content-Length: 54
{
"isCancellable" : false,
"isRetryable" : false
}
- 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. Related APIs API
[_createdomain] API [_gettasks] API [_gettask] API [_retrytask] API
3. Create a Domain with Workflow Optimization
The following set of APIs can be used to optimize the domain creation workflow by clubbing both VxRail workflow and VCF workflow which were being done independent of each other. User will need to use only the following SDDC Manager API to perform workload domain operation.
Create a Domain with Workflow Optimization will automatically:
Deploy 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
Create the primary cluster once the domain is created
For the first domain in your environment, the workflow deploys a cluster of three NSX Managers in the management domain. The workflow also configures an anti-affinity rule between the managers to prevent them from being on the same host for High Availability. Each subsequent NSX domains will share this NSX Manager Cluster or create its own.
From NSX version 3.0 onwards NSX manager uses vSphere Distributed Switch(VDS) created by vCenter to configure transport nodes and handle overlay traffic.
In case of single vSphere Distributed Switch domain, the same vSphere Distributed Switch will be used for configuring overlay traffic.
For a domain which creates multiple vSphere Distributed Switches, the transportZones in the nsxtSwitchConfig in the VdsSpec should be provided with transportZone with transportType OVERLAY to identify the vSphere Distributed Switch which should be used by NSX for configuring overlay traffic. Refer to: VdsSpec.
In case of multiple vSphere Distributed Switches, one vSphere Distributed Switch has to be marked for NSX overlay transport zone. Multiple vSphere Distributed Switches can be configured with VLAN transport zone.
Clusters part of the domain can be configured to use IP address pools to assign IP addresses for the TEP interfaces of the hosts by specifying ipAddressPoolsSpec which is a list of IpAddressPoolSpec,inside the NsxTClusterSpec. The same IP Address Pool name needs to be referred in NetworkProfile inside the NsxTClusterSpec. If the IpAddressPoolSpec is not specified in the input spec, IP addresses for the TEP interfaces of the host are assigned from DHCP.
NSX uplink profiles of type UplinkProfile, can be configured inside the NsxTClusterSpec. For each vSphere Distributed Switch configured by NSX, a new uplink profile needs to be defined.
NetworkProfile can be defined inside the NsxTClusterSpec. It contains the host switch configurations for the NSX transport node. There should be one default profile. This will be considered as a global Transport Node Profile configuration that will be applied across all the hosts in the cluster.
Note : From NSX 4.1.2 onwards multiple profile is supported where one profile will be default and other profiles will be non-default. All the profiles should provide host switch configuration for all the vSphere Distributed Switch configured by NSX. In case of multiple profiles, non-default profile names need to be referred in networkProfileName inside hostNetworkSpec.
Note : Update domain operation is not needed for Create domain with Work Flow Optimization
3.1. Prerequisites API
The following data is required
Name of the domain
DNS entries for WLD hosts, new vCenter, VxRail Manager, and NSX already configured in the DNS server.
vCenter details
Name of the vCenter
Network details
IP Address of the vCenter
FQDN of the vCenter
Gateway
Subnet mask
Password for the root user (8-20 characters)
Cluster details
Name of the new cluster that will be added to the specified workload domain
VxRail Manager Details
admin and root credentials
DNS Name of VxRail Manager
SSH Thumbprint of VxRail Manager
SSL Thumbprint of VxRail Manager
NIC profile of hosts
Networks (details of portgroups such as VSAN, VMOTION, MANAGEMENT.)
VSAN license key
Host details (the hosts details can be obtained using Get the hosts discovered by HCI manager)
Hostname of ESXi host
IpAddress of the same ESXi host
Credentials of the ESXi host
SSH Thumbprint of the ESXi host
Serial Number of the ESXi host
Host Network Details
ESXi License key
Network Details
List of VDS details, For each VDS
DVS name
Flag to indicate whether this DVS is used by NSX
Port group names and the corresponding transport type. Note that EDGE_INFRA_OVERLAY_UPLINK, VREALIZE should not be specified in the input spec.
Geneve vLAN ID
NSX cluster Details
For each vSphere Distributed Switch that is managed by NSX UplinkProfile needs to be defined inside nsxTClusterSpec . For DHCP transportVlan needs to be provided inside UplinkProfile
{ "nsxTClusterSpec" : { "uplinkProfiles" : [ { "name" : "Uplink-Profile-1", "teamings" : [ { "policy" : "FAILOVER_ORDER", "activeUplinks" : [ "uplink-1" ], "standByUplinks" : [ "uplink-2" ] } ], "transportVlan" : 2 } ] } }
TEP IP assignment can be done from the Static IP pool. For creating a new IP pool during the domain creation
{ "nsxTClusterSpec" : { "ipAddressPoolsSpec" : [ { "name" : "static-ip-pool-01", "subnets" : [ { "ipAddressPoolRanges" : [ { "start" : "10.0.11.50", "end" : "10.0.11.70" }, { "start" : "10.0.11.80", "end" : "10.0.11.150" } ], "cidr" : "10.0.11.0/24", "gateway" : "10.0.11.250" } ] } ], "uplinkProfiles" : [ { "name" : "Uplink-Profile-1", "teamings" : [ { "policy" : "FAILOVER_ORDER", "activeUplinks" : [ "uplink-1" ], "standByUplinks" : [ "uplink-2" ] } ], "transportVlan" : 2 } ] } }
For using an existing IP pool during the domain creation
{ "nsxTClusterSpec" : { "ipAddressPoolsSpec" : [ { "name" : "static-ip-pool-01" } ], "uplinkProfiles" : [ { "name" : "Uplink-Profile-1", "teamings" : [ { "policy" : "FAILOVER_ORDER", "activeUplinks" : [ "uplink-1" ], "standByUplinks" : [ "uplink-2" ] } ], "transportVlan" : 2 } ] } }
Note : To create a new IP address pool during domain creation, "subnets" , the list of IpAddressPoolSubnetSpec in the input spec must not be empty. Only the IP address pool name has to be sent in the input spec while using an existing IP address pool.
Once vSphere Distributed Switch, Uplink Profiles and IP Address Pools Spec are defined, they need to be associated in networkProfiles in networkSpec
[ { "name" : "Cluster-1-network-profile01", "isDefault" : true, "nsxtHostSwitchConfigs" : [ { "vdsName" : "sfo-w01-cl01-vds02", "uplinkProfileName" : "Uplink-Profile-1", "ipAddressPoolName" : "static-ip-pool-01", "vdsUplinkToNsxUplink" : [ { "vdsUplinkName" : "uplink1", "nsxUplinkName" : "uplink-1" }, { "vdsUplinkName" : "uplink2", "nsxUplinkName" : "uplink-2" } ] } ] } ]
Note : In case of multiple profiles, the profile name needs to be referred in networkProfileName in HostNetworkSpec.
Note : To create a new IP address pool during domain creation, "subnets" , the list of IpAddressPoolSubnetSpec in the input spec must not be empty. Only the IP address pool name has to be sent in the input spec while using an existing IP address pool
- Host configuration must have minimum two active vmNics.
3.2. Steps to perform Optimized Domain Creation API
- Get the list of the hosts discovered by HCI Manager
Tip : Refer to: Get the hosts discovered by HCI manager
- Get the existing NSX cluster details. This is optional. Use only if existing NSX cluster is to be used
Tip : Refer to: Get an NSX Cluster
- Get license details
Tip : Refer to: Get the License Keys
Prepare WLD create API input using the information obtained in the steps 1 to 3
Validate the input specification
For a vSphere Lifecycle Manager Image (vLCM) based domain add parameter "clusterImageId" : "VCF-VxRail-Cluster-Image" to the cluster spec(s). All the other parameters and steps remain the same.
- --- "clusterSpecs" : [ { "name" : "sfo-w01-cl01", "clusterImageId" : "VCF-VxRail-Cluster-Image", "vxRailDetails" : { "rootCredentials" : { "credentialType" : "SSH", "username" : "admin", "password" : "xxxxxxxx" }......,--
Note : 'VCF-VxRail-Cluster-Image' is the default VxRail vLCM Image. Currently, VCF VxRail supports only default vLCM image for the domain or cluster deployment.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/validations' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"domainName" : "VI-WLD",
"vcenterSpec" : {
"name" : "sfo-w01-vc01",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "sfo-w01-vc01.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "S@mpleP@ss123!",
"datacenterName" : "sfo-w01-dc01",
"vmSize" : "tiny",
"storageSize" : "lstorage"
},
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "sfo-w01-cl01",
"vxRailDetails" : {
"rootCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"adminCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
"sslThumbprint" : "aabbccddee",
"networks" : [ {
"type" : "VSAN",
"vlanId" : 1407,
"subnet" : "10.0.60.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.60.1",
"ipPools" : [ {
"start" : "10.0.60.55",
"end" : "10.0.60.57"
} ]
}, {
"type" : "VMOTION",
"vlanId" : 1406,
"subnet" : "10.0.59.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.59.1",
"ipPools" : [ {
"start" : "10.0.59.55",
"end" : "10.0.59.57"
} ]
}, {
"type" : "MANAGEMENT",
"vlanId" : 1408,
"subnet" : "10.0.0.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.0.1"
} ],
"ipAddress" : "10.0.0.78",
"dnsName" : "sfo-w01-cl01-vxrm-2.sfo.rainpole.io",
"nicProfile" : "TWO_HIGH_SPEED"
},
"hostSpecs" : [ {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.30",
"hostName" : "sfo-w01-esx01",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:6Rf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czc",
"serialNumber" : "7FVRHK20000000"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.31",
"hostName" : "sfo-w01-esx02",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:6Ff1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czcd",
"serialNumber" : "7PGXWK20000000"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.32",
"hostName" : "sfo-w01-esx03",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:5Pf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Cdcf",
"serialNumber" : "7PGXWK20000000"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"licenseKey" : "123"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "sfo-w01-cl01-vds01",
"portGroupSpecs" : [ {
"name" : "sfo-w01-cl01-vds01-pg-mgmt",
"transportType" : "MANAGEMENT"
} ]
}, {
"name" : "sfo-w01-cl01-vds02",
"nsxtSwitchConfig" : {
"transportZones" : [ {
"name" : "sfo-w01-nsx-overlay",
"transportType" : "OVERLAY"
}, {
"name" : "sfo-w01-nsx-vlan01",
"transportType" : "VLAN"
} ],
"hostSwitchOperationalMode" : "STANDARD"
},
"mtu" : 9000
} ],
"nsxClusterSpec" : {
"nsxTClusterSpec" : {
"uplinkProfiles" : [ {
"name" : "Uplink-Profile-1",
"teamings" : [ {
"policy" : "FAILOVER_ORDER",
"activeUplinks" : [ "uplink-1" ],
"standByUplinks" : [ "uplink-2" ]
} ],
"transportVlan" : 2
} ]
}
},
"networkProfiles" : [ {
"name" : "Cluster-1-network-profile01",
"isDefault" : true,
"nsxtHostSwitchConfigs" : [ {
"vdsName" : "sfo-w01-cl01-vds02",
"uplinkProfileName" : "Uplink-Profile-1",
"vdsUplinkToNsxUplink" : [ {
"vdsUplinkName" : "uplink1",
"nsxUplinkName" : "uplink-1"
}, {
"vdsUplinkName" : "uplink2",
"nsxUplinkName" : "uplink-2"
} ]
} ]
} ]
},
"skipThumbprintValidation" : false
} ]
},
"nsxTSpec" : {
"nsxManagerSpecs" : [ {
"name" : "sfo-w01-nsx01a",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01b",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.45",
"dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01c",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.46",
"dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
} ],
"vip" : "10.0.0.166",
"vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "xxxxxxxx",
"nsxManagerAuditPassword" : "xxxxxxxx",
"formFactor" : "large"
},
"ssoDomainSpec" : {
"createManagementDomain" : false
}
}'
HTTP Request
POST /v1/domains/validations HTTP/1.1
Content-Type: application/json
Content-Length: 6617
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"domainName" : "VI-WLD",
"vcenterSpec" : {
"name" : "sfo-w01-vc01",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "sfo-w01-vc01.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "S@mpleP@ss123!",
"datacenterName" : "sfo-w01-dc01",
"vmSize" : "tiny",
"storageSize" : "lstorage"
},
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "sfo-w01-cl01",
"vxRailDetails" : {
"rootCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"adminCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
"sslThumbprint" : "aabbccddee",
"networks" : [ {
"type" : "VSAN",
"vlanId" : 1407,
"subnet" : "10.0.60.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.60.1",
"ipPools" : [ {
"start" : "10.0.60.55",
"end" : "10.0.60.57"
} ]
}, {
"type" : "VMOTION",
"vlanId" : 1406,
"subnet" : "10.0.59.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.59.1",
"ipPools" : [ {
"start" : "10.0.59.55",
"end" : "10.0.59.57"
} ]
}, {
"type" : "MANAGEMENT",
"vlanId" : 1408,
"subnet" : "10.0.0.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.0.1"
} ],
"ipAddress" : "10.0.0.78",
"dnsName" : "sfo-w01-cl01-vxrm-2.sfo.rainpole.io",
"nicProfile" : "TWO_HIGH_SPEED"
},
"hostSpecs" : [ {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.30",
"hostName" : "sfo-w01-esx01",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:6Rf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czc",
"serialNumber" : "7FVRHK20000000"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.31",
"hostName" : "sfo-w01-esx02",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:6Ff1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czcd",
"serialNumber" : "7PGXWK20000000"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.32",
"hostName" : "sfo-w01-esx03",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:5Pf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Cdcf",
"serialNumber" : "7PGXWK20000000"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"licenseKey" : "123"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "sfo-w01-cl01-vds01",
"portGroupSpecs" : [ {
"name" : "sfo-w01-cl01-vds01-pg-mgmt",
"transportType" : "MANAGEMENT"
} ]
}, {
"name" : "sfo-w01-cl01-vds02",
"nsxtSwitchConfig" : {
"transportZones" : [ {
"name" : "sfo-w01-nsx-overlay",
"transportType" : "OVERLAY"
}, {
"name" : "sfo-w01-nsx-vlan01",
"transportType" : "VLAN"
} ],
"hostSwitchOperationalMode" : "STANDARD"
},
"mtu" : 9000
} ],
"nsxClusterSpec" : {
"nsxTClusterSpec" : {
"uplinkProfiles" : [ {
"name" : "Uplink-Profile-1",
"teamings" : [ {
"policy" : "FAILOVER_ORDER",
"activeUplinks" : [ "uplink-1" ],
"standByUplinks" : [ "uplink-2" ]
} ],
"transportVlan" : 2
} ]
}
},
"networkProfiles" : [ {
"name" : "Cluster-1-network-profile01",
"isDefault" : true,
"nsxtHostSwitchConfigs" : [ {
"vdsName" : "sfo-w01-cl01-vds02",
"uplinkProfileName" : "Uplink-Profile-1",
"vdsUplinkToNsxUplink" : [ {
"vdsUplinkName" : "uplink1",
"nsxUplinkName" : "uplink-1"
}, {
"vdsUplinkName" : "uplink2",
"nsxUplinkName" : "uplink-2"
} ]
} ]
} ]
},
"skipThumbprintValidation" : false
} ]
},
"nsxTSpec" : {
"nsxManagerSpecs" : [ {
"name" : "sfo-w01-nsx01a",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01b",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.45",
"dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01c",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.46",
"dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
} ],
"vip" : "10.0.0.166",
"vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "xxxxxxxx",
"nsxManagerAuditPassword" : "xxxxxxxx",
"formFactor" : "large"
},
"ssoDomainSpec" : {
"createManagementDomain" : false
}
}
HTTP Response
HTTP/1.1 202 Accepted
Location: /v1/domains/validations/7c97545a-c9dc-4da5-aa06-b4b82db482d3
Content-Type: application/json
Content-Length: 110
{
"id" : "7c97545a-c9dc-4da5-aa06-b4b82db482d3",
"description" : "",
"executionStatus" : "IN_PROGRESS"
}
- Get Validation response of the domain specification using id obtained from previous spec validation call
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/validations/77b880f5-2aa3-42dc-a410-bc1b11141d86' -i -X GET \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/domains/validations/77b880f5-2aa3-42dc-a410-bc1b11141d86 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 185
{
"id" : "b15740e3-3788-4d39-95f2-a097660d27b1",
"description" : "Validation result",
"executionStatus" : "COMPLETED",
"resultStatus" : "SUCCEEDED",
"validationChecks" : [ ]
}
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".
Note : Make changes to the input specification and re-validate using a new API invocation.
- Trigger the task using the validated input specification.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"domainName" : "VI-WLD",
"vcenterSpec" : {
"name" : "sfo-w01-vc01",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "sfo-w01-vc01.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "S@mpleP@ss123!",
"datacenterName" : "sfo-w01-dc01",
"vmSize" : "tiny",
"storageSize" : "lstorage"
},
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "sfo-w01-cl01",
"vxRailDetails" : {
"rootCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"adminCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
"sslThumbprint" : "aabbccddee",
"networks" : [ {
"type" : "VSAN",
"vlanId" : 1407,
"subnet" : "10.0.60.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.60.1",
"ipPools" : [ {
"start" : "10.0.60.55",
"end" : "10.0.60.57"
} ]
}, {
"type" : "VMOTION",
"vlanId" : 1406,
"subnet" : "10.0.59.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.59.1",
"ipPools" : [ {
"start" : "10.0.59.55",
"end" : "10.0.59.57"
} ]
}, {
"type" : "MANAGEMENT",
"vlanId" : 1408,
"subnet" : "10.0.0.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.0.1"
} ],
"ipAddress" : "10.0.0.78",
"dnsName" : "sfo-w01-cl01-vxrm-2.sfo.rainpole.io",
"nicProfile" : "TWO_HIGH_SPEED"
},
"hostSpecs" : [ {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.30",
"hostName" : "sfo-w01-esx01",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:6Rf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czc",
"serialNumber" : "7FVRHK20000000"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.31",
"hostName" : "sfo-w01-esx02",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:6Ff1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czcd",
"serialNumber" : "7PGXWK20000000"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.32",
"hostName" : "sfo-w01-esx03",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:5Pf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Cdcf",
"serialNumber" : "7PGXWK20000000"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"licenseKey" : "123"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "sfo-w01-cl01-vds01",
"portGroupSpecs" : [ {
"name" : "sfo-w01-cl01-vds01-pg-mgmt",
"transportType" : "MANAGEMENT"
} ]
}, {
"name" : "sfo-w01-cl01-vds02",
"nsxtSwitchConfig" : {
"transportZones" : [ {
"name" : "sfo-w01-nsx-overlay",
"transportType" : "OVERLAY"
}, {
"name" : "sfo-w01-nsx-vlan01",
"transportType" : "VLAN"
} ],
"hostSwitchOperationalMode" : "STANDARD"
},
"mtu" : 9000
} ],
"nsxClusterSpec" : {
"nsxTClusterSpec" : {
"uplinkProfiles" : [ {
"name" : "Uplink-Profile-1",
"teamings" : [ {
"policy" : "FAILOVER_ORDER",
"activeUplinks" : [ "uplink-1" ],
"standByUplinks" : [ "uplink-2" ]
} ],
"transportVlan" : 2
} ]
}
},
"networkProfiles" : [ {
"name" : "Cluster-1-network-profile01",
"isDefault" : true,
"nsxtHostSwitchConfigs" : [ {
"vdsName" : "sfo-w01-cl01-vds02",
"uplinkProfileName" : "Uplink-Profile-1",
"vdsUplinkToNsxUplink" : [ {
"vdsUplinkName" : "uplink1",
"nsxUplinkName" : "uplink-1"
}, {
"vdsUplinkName" : "uplink2",
"nsxUplinkName" : "uplink-2"
} ]
} ]
} ]
},
"skipThumbprintValidation" : false
} ]
},
"nsxTSpec" : {
"nsxManagerSpecs" : [ {
"name" : "sfo-w01-nsx01a",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01b",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.45",
"dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01c",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.46",
"dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
} ],
"vip" : "10.0.0.166",
"vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "xxxxxxxx",
"nsxManagerAuditPassword" : "xxxxxxxx",
"formFactor" : "large"
},
"ssoDomainSpec" : {
"createManagementDomain" : false
}
}'
HTTP Request
POST /v1/domains HTTP/1.1
Content-Type: application/json
Content-Length: 6617
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"domainName" : "VI-WLD",
"vcenterSpec" : {
"name" : "sfo-w01-vc01",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.43",
"dnsName" : "sfo-w01-vc01.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
},
"rootPassword" : "S@mpleP@ss123!",
"datacenterName" : "sfo-w01-dc01",
"vmSize" : "tiny",
"storageSize" : "lstorage"
},
"computeSpec" : {
"clusterSpecs" : [ {
"name" : "sfo-w01-cl01",
"vxRailDetails" : {
"rootCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"adminCredentials" : {
"credentialType" : "SSH",
"username" : "admin",
"password" : "xxxxxxxx"
},
"sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
"sslThumbprint" : "aabbccddee",
"networks" : [ {
"type" : "VSAN",
"vlanId" : 1407,
"subnet" : "10.0.60.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.60.1",
"ipPools" : [ {
"start" : "10.0.60.55",
"end" : "10.0.60.57"
} ]
}, {
"type" : "VMOTION",
"vlanId" : 1406,
"subnet" : "10.0.59.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.59.1",
"ipPools" : [ {
"start" : "10.0.59.55",
"end" : "10.0.59.57"
} ]
}, {
"type" : "MANAGEMENT",
"vlanId" : 1408,
"subnet" : "10.0.0.0/24",
"mask" : "255.255.255.0",
"gateway" : "10.0.0.1"
} ],
"ipAddress" : "10.0.0.78",
"dnsName" : "sfo-w01-cl01-vxrm-2.sfo.rainpole.io",
"nicProfile" : "TWO_HIGH_SPEED"
},
"hostSpecs" : [ {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.30",
"hostName" : "sfo-w01-esx01",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:6Rf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czc",
"serialNumber" : "7FVRHK20000000"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.31",
"hostName" : "sfo-w01-esx02",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:6Ff1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Czcd",
"serialNumber" : "7PGXWK20000000"
}, {
"licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
"ipAddress" : "192.10.20.32",
"hostName" : "sfo-w01-esx03",
"username" : "root",
"password" : "xxxxxxxx",
"hostNetworkSpec" : {
"vmNics" : [ {
"id" : "vmnic0",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
}, {
"id" : "vmnic1",
"vdsName" : "sfo-w01-cl01-vds02",
"uplink" : "uplink1"
} ]
},
"sshThumbprint" : "SHA256:5Pf1wRAQpxh3NTkHHCzPAQGJKTNpYUEYhRjnXZK8Cdcf",
"serialNumber" : "7PGXWK20000000"
} ],
"datastoreSpec" : {
"vsanDatastoreSpec" : {
"licenseKey" : "123"
}
},
"networkSpec" : {
"vdsSpecs" : [ {
"name" : "sfo-w01-cl01-vds01",
"portGroupSpecs" : [ {
"name" : "sfo-w01-cl01-vds01-pg-mgmt",
"transportType" : "MANAGEMENT"
} ]
}, {
"name" : "sfo-w01-cl01-vds02",
"nsxtSwitchConfig" : {
"transportZones" : [ {
"name" : "sfo-w01-nsx-overlay",
"transportType" : "OVERLAY"
}, {
"name" : "sfo-w01-nsx-vlan01",
"transportType" : "VLAN"
} ],
"hostSwitchOperationalMode" : "STANDARD"
},
"mtu" : 9000
} ],
"nsxClusterSpec" : {
"nsxTClusterSpec" : {
"uplinkProfiles" : [ {
"name" : "Uplink-Profile-1",
"teamings" : [ {
"policy" : "FAILOVER_ORDER",
"activeUplinks" : [ "uplink-1" ],
"standByUplinks" : [ "uplink-2" ]
} ],
"transportVlan" : 2
} ]
}
},
"networkProfiles" : [ {
"name" : "Cluster-1-network-profile01",
"isDefault" : true,
"nsxtHostSwitchConfigs" : [ {
"vdsName" : "sfo-w01-cl01-vds02",
"uplinkProfileName" : "Uplink-Profile-1",
"vdsUplinkToNsxUplink" : [ {
"vdsUplinkName" : "uplink1",
"nsxUplinkName" : "uplink-1"
}, {
"vdsUplinkName" : "uplink2",
"nsxUplinkName" : "uplink-2"
} ]
} ]
} ]
},
"skipThumbprintValidation" : false
} ]
},
"nsxTSpec" : {
"nsxManagerSpecs" : [ {
"name" : "sfo-w01-nsx01a",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.44",
"dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01b",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.45",
"dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
}, {
"name" : "sfo-w01-nsx01c",
"networkDetailsSpec" : {
"ipAddress" : "10.0.0.46",
"dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
"gateway" : "10.0.0.250",
"subnetMask" : "255.255.255.0"
}
} ],
"vip" : "10.0.0.166",
"vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
"licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
"nsxManagerAdminPassword" : "xxxxxxxx",
"nsxManagerAuditPassword" : "xxxxxxxx",
"formFactor" : "large"
},
"ssoDomainSpec" : {
"createManagementDomain" : false
}
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/null
Content-Length: 54
{
"isCancellable" : false,
"isRetryable" : false
}
- 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.
3.3. Related APIs API
[_gettasks] API [_gettask] API [_retrytask] API [_usecase_getHostsDiscoveredByHCIMgr]
4. Get the Domains
4.1. Prerequisites API
None
4.2. Steps API
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains' -i -X GET \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/domains HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3766
{
"elements" : [ {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5",
"name" : "sfo-w01",
"orgName" : "VMware",
"status" : "ACTIVE",
"upgradeState" : "AVAILABLE",
"upgradeStatus" : {
"status" : "IN_PROGRESS",
"completedResources" : 5,
"totalResources" : 10
},
"vraIntegrationStatus" : "ENABLED",
"vropsIntegrationStatus" : "DISABLED",
"vrliIntegrationStatus" : "DISABLED",
"owners" : [ "[email protected]" ],
"vcenters" : [ {
"id" : "c0703437-6756-470b-9e1c-f9d3bbc9b1c6",
"fqdn" : "sfo-w01-vc01.sfo.rainpole.io",
"vcInstanceId" : "a1234567-6756-470b-9e1c-f9d3bbc9b1c6"
} ],
"ssoId" : "c0703437-6846-470b-9e1c-f9d3bbc9b1c7",
"ssoName" : "rainpole.local",
"isManagementSsoDomain" : false,
"clusters" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782655"
} ],
"nsxtCluster" : {
"id" : "e9a878ef-00b3-4ed3-9f35-de79eb874e9a"
},
"licensingInfo" : {
"licensingMode" : "PERPETUAL",
"subscriptionStatus" : "UNSUBSCRIBED",
"isRegistered" : false,
"isSubscribed" : false
},
"capacity" : {
"cpu" : {
"used" : {
"value" : 21.445999393465698,
"unit" : "GHz"
},
"total" : {
"value" : 67.03999810397931,
"unit" : "MHz"
},
"numberOfCores" : 32
},
"memory" : {
"used" : {
"value" : 156.0361328125,
"unit" : "GB"
},
"total" : {
"value" : 312.484375,
"unit" : "GB"
}
},
"storage" : {
"used" : {
"value" : 562.3904687464237,
"unit" : "MB"
},
"total" : {
"value" : 858.1875,
"unit" : "GB"
}
}
},
"lifecycleManagementMode" : "BASELINES"
}, {
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
"name" : "sfo-w02",
"orgName" : "VMware",
"status" : "ACTIVE",
"upgradeState" : "AVAILABLE",
"upgradeStatus" : {
"status" : "AVAILABLE",
"completedResources" : 5,
"totalResources" : 10
},
"vraIntegrationStatus" : "DISABLED",
"vropsIntegrationStatus" : "ENABLED",
"vrliIntegrationStatus" : "DISABLED",
"owners" : [ "[email protected]" ],
"vcenters" : [ {
"id" : "c0703437-6846-470b-9e1c-f9d3bbc9b1c9",
"fqdn" : "sfo-w02-vc01.sfo.rainpole.io",
"vcInstanceId" : "b1234567-6756-470b-9e1c-f9d3bbc9b1c6"
} ],
"ssoId" : "c0703437-6846-470b-9e1c-f9d3bbc9b1c8",
"ssoName" : "vsphere.local",
"isManagementSsoDomain" : true,
"clusters" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782677"
}, {
"id" : "8045e44e-974e-4f43-9861-7f0326782633"
} ],
"nsxtCluster" : {
"id" : "e9a878ef-00b3-4ed3-9f35-de79eb874e9a"
},
"licensingInfo" : {
"licensingMode" : "SUBSCRIPTION",
"subscriptionStatus" : "ACTIVE",
"isRegistered" : false,
"isSubscribed" : false
},
"capacity" : {
"cpu" : {
"used" : {
"value" : 21.445999393465698,
"unit" : "GHz"
},
"total" : {
"value" : 67.03999810397931,
"unit" : "GHz"
},
"numberOfCores" : 24
},
"memory" : {
"used" : {
"value" : 156.0361328125,
"unit" : "GB"
},
"total" : {
"value" : 312.484375,
"unit" : "GB"
}
},
"storage" : {
"used" : {
"value" : 562.3904687464237,
"unit" : "GB"
},
"total" : {
"value" : 858.1875,
"unit" : "GB"
}
}
},
"lifecycleManagementMode" : "BASELINES_AND_IMAGES"
} ]
}
4.3. Related APIs API
[_getdomains] API [_getdomain] API
5. Get a Domain
5.1. Prerequisites API
The following data is required
- ID of the domain
5.2. Steps API
- Invoke the API using the ID of the domain
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/c0703437-6746-470b-9e1c-f9d3bbc9b1c5' -i -X GET \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/domains/c0703437-6746-470b-9e1c-f9d3bbc9b1c5 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1700
{
"id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5",
"name" : "sfo-w01",
"orgName" : "VMware",
"status" : "ACTIVE",
"upgradeState" : "AVAILABLE",
"upgradeStatus" : {
"status" : "IN_PROGRESS",
"completedResources" : 5,
"totalResources" : 10
},
"vraIntegrationStatus" : "ENABLED",
"vropsIntegrationStatus" : "DISABLED",
"vrliIntegrationStatus" : "DISABLED",
"owners" : [ "[email protected]" ],
"vcenters" : [ {
"id" : "c0703437-6756-470b-9e1c-f9d3bbc9b1c6",
"fqdn" : "sfo-w01-vc01.sfo.rainpole.io",
"vcInstanceId" : "a1234567-6756-470b-9e1c-f9d3bbc9b1c6"
} ],
"ssoId" : "c0703437-6846-470b-9e1c-f9d3bbc9b1c7",
"ssoName" : "rainpole.local",
"isManagementSsoDomain" : false,
"clusters" : [ {
"id" : "8045e44e-974e-4f43-9862-7f0326782655"
} ],
"nsxtCluster" : {
"id" : "e9a878ef-00b3-4ed3-9f35-de79eb874e9a"
},
"licensingInfo" : {
"licensingMode" : "PERPETUAL",
"subscriptionStatus" : "UNSUBSCRIBED",
"isRegistered" : false,
"isSubscribed" : false
},
"capacity" : {
"cpu" : {
"used" : {
"value" : 21.445999393465698,
"unit" : "GHz"
},
"total" : {
"value" : 67.03999810397931,
"unit" : "MHz"
},
"numberOfCores" : 32
},
"memory" : {
"used" : {
"value" : 156.0361328125,
"unit" : "GB"
},
"total" : {
"value" : 312.484375,
"unit" : "GB"
}
},
"storage" : {
"used" : {
"value" : 562.3904687464237,
"unit" : "MB"
},
"total" : {
"value" : 858.1875,
"unit" : "GB"
}
}
},
"lifecycleManagementMode" : "BASELINES"
}
5.3. Related APIs API
[_getdomains] API [_getdomain] API
6. Get Domain Endpoints
6.1. Prerequisites API
The following data is required
- ID of the domain
6.2. Steps API
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/b0b9359c-c179-47a1-a536-69e8f8dcbcf1/endpoints' -i -X GET \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/domains/b0b9359c-c179-47a1-a536-69e8f8dcbcf1/endpoints HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 190
{
"elements" : [ {
"type" : "VCENTER",
"url" : "https://sfo-w01-vc01.sfo.rainpole.io"
}, {
"type" : "NSX_MANAGER",
"url" : "https://sfo-w01-nsx01.sfo.rainpole.io"
} ]
}
6.3. Related APIs API
[_getdomainendpoints] API [_getdomains] API [_getdomain] API
7. Rename a Domain
7.1. Prerequisites API
- Domain must exist.
7.2. Steps API
- Get the ID of the domain. Filter the response by the domain's current name to get the corresponding ID.
Tip : Get the Domains
- Create a domain update spec. Create a JSON with the "name" field containing the desired new name.
Note : When renaming a domain, the "name" field must be the only value in the update spec.
Tip : DomainUpdateSpec.
- Invoke the validate update domain spec API to ensure the requested new name is valid.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"name" : "new-name"
}'
HTTP Request
POST /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations HTTP/1.1
Content-Type: application/json
Content-Length: 25
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"name" : "new-name"
}
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 286
{
"id" : "2b4da964-3fa5-43f4-a650-3fa11dd1309b",
"description" : "Validating Domain Update Spec",
"executionStatus" : "COMPLETED",
"resultStatus" : "SUCCEEDED",
"validationChecks" : [ {
"description" : "DomainUpdateSpecValidation",
"resultStatus" : "SUCCEEDED"
} ]
}
Tip : If "resultStatus" is "FAILED", make changes to the input specification and re-validate using a new API invocation.
- Invoke the domain rename (update) task using the validated input spec and domain ID.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"name" : "new-name"
}'
HTTP Request
PATCH /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 25
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"name" : "new-name"
}
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 81
{
"status" : "SUCCESSFUL",
"isCancellable" : false,
"isRetryable" : false
}
7.3. Related APIs API
[_updatedomain] API [_getdomain] API [_getdomains] API
8. Delete a Domain
When you delete a domain, the clusters within the domain are deleted.
Note : A domain cannot be deleted if the clusters of the domain have remote vSAN datastores configured. If so, unmount the remote vSAN datastores from vCenter and then retry domain deletion. Please refer to the 'VMware Cloud Foundation Administration Guide' for more details.
Warning : Deleting a domain is an irreversible operation. All clusters and VMs within the domain are deleted and the underlying datastores are destroyed.
8.1. Prerequisites API
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.
8.2. Steps API
- 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://sfo-vcf01.rainpole.io/v1/domains/f74c2d97-621a-4984-9ab6-5d84effde82f' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"markForDeletion" : true
}'
HTTP Request
PATCH /v1/domains/f74c2d97-621a-4984-9ab6-5d84effde82f HTTP/1.1
Content-Type: application/json
Content-Length: 30
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"markForDeletion" : true
}
HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 470
{
"name" : "Mark domain with ID f74c2d97-621a-4984-9ab6-5d84effde82f for deletion",
"localizableDescriptionPack" : {
"component" : "VCF",
"messageKey" : "MARK_DOMAIN_FOR_DELETION",
"arguments" : [ "f74c2d97-621a-4984-9ab6-5d84effde82f" ],
"message" : "Mark Domain with ID %s for deletion",
"bundle" : "com.vmware.vcf.domainmanager.workflow.workflowdescriptions"
},
"status" : "SUCCESSFUL",
"isCancellable" : false,
"isRetryable" : false
}
- Trigger the deletion.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/f74c2d97-621a-4984-9ab6-5d84effde82f' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Accept-Language: fr' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
DELETE /v1/domains/f74c2d97-621a-4984-9ab6-5d84effde82f HTTP/1.1
Content-Type: application/json
Accept-Language: fr
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/3e113e61-3e00-4aa5-9725-c54b52386706
Content-Length: 213
{
"id" : "3e113e61-3e00-4aa5-9725-c54b52386706",
"name" : "Removing domain",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-06-21T02:36:16.211Z",
"isCancellable" : false,
"isRetryable" : false
}
- 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.
8.3. Related APIs API
[_getdomains] API [_getdomain] API [_gettask] API [_retrytask] API
Last updated 2024-06-21 01:22:12 -0700