Domains APIs

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/NFS/VMFS on FC/VVOL) and networking (NSX) into a single consumable entity.

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 is provided, they are configured on the ESXi hosts. If VMFS on FC storage provided, it's consumed.

  • 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.

  • NSX Edges are needed to enable overlay VI networks and public networks for north-south traffic. Note that edges need to be deployed separately.

  • 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.

The result is a workload-ready SDDC environment.

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)

      • 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

Note : Only one of "vsanDatastoreSpec" (For VSAN), "nfsDatastoreSpec" (For NFS), "vmfsDatastoreSpec" (For VMFS on FC) or "vvolDatastoreSpec" (For VVOL) must be specified.

  * For VSAN

    * Number of host failures to tolerate (can be 0, 1, or 2)

    * License key for the vSAN datastore

    * Esa Config to enable vSAN ESA

      ```json
      {
        "vsanDatastoreSpec" : {
          "failuresToTolerate" : 1,
          "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
          "esaConfig" : {
            "enabled" : false
          },
          "datastoreName" : "sfo-w01-cl01-ds-vsan01"
        }
      }
      ```

  * 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

      ```json
      {
        "nfsDatastoreSpecs" : [ {
          "nasVolume" : {
            "serverName" : [ "10.0.0.250" ],
            "path" : "/nfs_mount/my_read_write_folder",
            "readOnly" : false
          },
          "datastoreName" : "sfo-w01-cl01-ds-nfs01"
        } ]
      }
      ```

  * For VMFS on FC

    * Ensure that the ESXi hosts have the given VMFS on FC datastore name configured.

    ```json
    {
      "vmfsDatastoreSpec" : {
        "fcSpec" : [ {
          "datastoreName" : "sfo-w01-cl01-ds-fc01"
        } ]
      }
    }
    ```

  * For VVOL

    * Ensure that Vasa provider is pre-configured

    * Vasa provider guid

    * Vasa container guid

    * Protocol type for vVol container

    * Vasa user guid

```json
{
  "vvolDatastoreSpecs" : [ {
    "name" : "sfo-w01-cl01-ds-vvol01",
    "vasaProviderSpec" : {
      "vasaProviderId" : "42de6c36-e85e-483b-89c1-4aee5e8deebe",
      "storageContainerId" : "908ce3e4-4e8d-414b-84e7-847ba9883521",
      "storageProtocolType" : "ISCSI",
      "userId" : "d0ed4dd6-1375-4b12-af8c-96c18c46d319"
    }
  } ]
}
```

* Network Details

  * List of VDS details, For each VDS

    * Port group names and the corresponding transport type. Note that EDGE_INFRA_OVERLAY_UPLINK, VREALIZE should not be specified in the input spec. Multiple port groups with transport type PUBLIC can be created.

    * 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

    * The list of transport zone(s) to be associated with the vSphere Distributed Switch managed by NSX. The supported transport types are OVERLAY and VLAN.

      ```json
      [ {
        "name" : "sfo-w01-cl01-vds01",
        "portGroupSpecs" : [ {
          "name" : "sfo-w01-cl01-vds01-pg-mgmt",
          "transportType" : "MANAGEMENT",
          "activeUplinks" : [ "uplink1", "uplink2" ],
          "teamingPolicy" : "loadbalance_ip"
        }, {
          "name" : "sfo-w01-cl01-vds01-pg-vsan",
          "transportType" : "VSAN",
          "activeUplinks" : [ "uplink1" ],
          "standByUplinks" : [ "uplink2" ],
          "teamingPolicy" : "loadbalance_loadbased"
        }, {
          "name" : "sfo-w01-cl01-vds01-pg-vmotion",
          "transportType" : "VMOTION",
          "activeUplinks" : [ "uplink2" ],
          "standByUplinks" : [ "uplink1" ],
          "teamingPolicy" : "loadbalance_srcmac"
        } ],
        "mtu" : 9000
      }, {
        "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
      } ]
      ```

  * NSX cluster Details

    * For each vSphere Distributed Switch that is managed by NSX [UplinkProfile](index.html#UplinkProfile) needs to be defined inside *nsxTClusterSpec* . For DHCP *transportVlan* needs to be provided inside *UplinkProfile*

      ```json
      {
        "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

      ```json
      {
        "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

      ```json
      {
        "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*

    ```json
    [ {
      "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.

  • NSX Details

    • 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

    • FormFactor of the NSX manager. Supported values are "small" , "medium" and "large"

Note : NSX manager of "large" form factor will be deployed if nothing is explicitly specified in the payload.

  • 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)

{
  "nsxManagerSpecs" : [ {
    "name" : "sfo-w01-nsx01a",
    "networkDetailsSpec" : {
      "dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
      "gateway" : "10.0.0.250",
      "subnetMask" : "255.255.255.0"
    }
  }, {
    "name" : "sfo-w01-nsx01b",
    "networkDetailsSpec" : {
      "dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
      "gateway" : "10.0.0.250",
      "subnetMask" : "255.255.255.0"
    }
  }, {
    "name" : "sfo-w01-nsx01c",
    "networkDetailsSpec" : {
      "dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
      "gateway" : "10.0.0.250",
      "subnetMask" : "255.255.255.0"
    }
  } ],
  "vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
  "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
  "nsxManagerAdminPassword" : "xxxxxxxx",
  "nsxManagerAuditPassword" : "xxxxxxxx",
  "formFactor" : "large"
}

Note : SDDC manager will generate AUDIT password if not provided in the input spec.

  • Network pool should be configured.

Tip : Refer to Create a Network Pool API

  • Hosts should be commissioned.

Tip : Refer to Commission the Hosts API

  • If Static IP pool is not used for VTEPs, A DHCP server must be configured on the Geneve VLAN of the respective domains. When NSX creates VTEPs for the hosts in 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.

  • Evaluate if you need to have pNICs on multiple vSphere Distributed Switches if it is NSX domain. At least two pNICs are needed on a single switch. Below is a spec sample:

    {
      "vmNics" : [ {
        "id" : "vmnic0",
        "vdsName" : "sfo-w01-cl01-vds01",
        "uplink" : "uplink1"
      }, {
        "id" : "vmnic1",
        "vdsName" : "sfo-w01-cl01-vds01",
        "uplink" : "uplink2"
      }, {
        "id" : "vmnic2",
        "vdsName" : "sfo-w01-cl01-vds02",
        "uplink" : "uplink1"
      }, {
        "id" : "vmnic3",
        "vdsName" : "sfo-w01-cl01-vds02",
        "uplink" : "uplink2"
      } ]
    }
    

1.2. Steps API

  • Validate the input specification.

Note : The below example is for creating a domain using vSAN storage (i.e "vsanDatastoreSpec" ) and NSX (i.e "nsxTSpec" and "nsxTClusterSpec")

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" : {
      "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",
      "hostSpecs" : [ {
        "id" : "f0ecda13-fe4a-4524-8769-ea24213b968a",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      }, {
        "id" : "58ee031f-7a0d-4976-a583-aeb061b2755c",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      }, {
        "id" : "456fdf55-250d-4e41-8326-42cb6c1c8960",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "failuresToTolerate" : 1,
          "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
          "datastoreName" : "sfo-w01-cl01-ds-vsan01"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl01-vds01",
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl01-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT",
            "activeUplinks" : [ "uplink1", "uplink2" ],
            "teamingPolicy" : "loadbalance_ip"
          }, {
            "name" : "sfo-w01-cl01-vds01-pg-vsan",
            "transportType" : "VSAN",
            "activeUplinks" : [ "uplink1" ],
            "standByUplinks" : [ "uplink2" ],
            "teamingPolicy" : "loadbalance_loadbased"
          }, {
            "name" : "sfo-w01-cl01-vds01-pg-vmotion",
            "transportType" : "VMOTION",
            "activeUplinks" : [ "uplink2" ],
            "standByUplinks" : [ "uplink1" ],
            "teamingPolicy" : "loadbalance_srcmac"
          } ],
          "mtu" : 9000
        }, {
          "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"
            } ]
          } ]
        } ]
      }
    } ]
  },
  "nsxTSpec" : {
    "nsxManagerSpecs" : [ {
      "name" : "sfo-w01-nsx01a",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    }, {
      "name" : "sfo-w01-nsx01b",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    }, {
      "name" : "sfo-w01-nsx01c",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    } ],
    "vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
    "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
    "nsxManagerAdminPassword" : "xxxxxxxx",
    "nsxManagerAuditPassword" : "xxxxxxxx",
    "formFactor" : "large"
  },
  "deployWithoutLicenseKeys" : true
}'

HTTP Request

POST /v1/domains/validations HTTP/1.1
Content-Type: application/json
Content-Length: 5817
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "domainName" : "sfo-w01",
  "vcenterSpec" : {
    "name" : "sfo-w01-vc01",
    "networkDetailsSpec" : {
      "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",
      "hostSpecs" : [ {
        "id" : "f0ecda13-fe4a-4524-8769-ea24213b968a",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      }, {
        "id" : "58ee031f-7a0d-4976-a583-aeb061b2755c",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      }, {
        "id" : "456fdf55-250d-4e41-8326-42cb6c1c8960",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "failuresToTolerate" : 1,
          "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
          "datastoreName" : "sfo-w01-cl01-ds-vsan01"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl01-vds01",
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl01-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT",
            "activeUplinks" : [ "uplink1", "uplink2" ],
            "teamingPolicy" : "loadbalance_ip"
          }, {
            "name" : "sfo-w01-cl01-vds01-pg-vsan",
            "transportType" : "VSAN",
            "activeUplinks" : [ "uplink1" ],
            "standByUplinks" : [ "uplink2" ],
            "teamingPolicy" : "loadbalance_loadbased"
          }, {
            "name" : "sfo-w01-cl01-vds01-pg-vmotion",
            "transportType" : "VMOTION",
            "activeUplinks" : [ "uplink2" ],
            "standByUplinks" : [ "uplink1" ],
            "teamingPolicy" : "loadbalance_srcmac"
          } ],
          "mtu" : 9000
        }, {
          "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"
            } ]
          } ]
        } ]
      }
    } ]
  },
  "nsxTSpec" : {
    "nsxManagerSpecs" : [ {
      "name" : "sfo-w01-nsx01a",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    }, {
      "name" : "sfo-w01-nsx01b",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    }, {
      "name" : "sfo-w01-nsx01c",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    } ],
    "vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
    "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
    "nsxManagerAdminPassword" : "xxxxxxxx",
    "nsxManagerAuditPassword" : "xxxxxxxx",
    "formFactor" : "large"
  },
  "deployWithoutLicenseKeys" : true
}

HTTP Response

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

{
  "id" : "70088d87-d30d-4442-ad27-204561e35bc2",
  "description" : "Validating Domain Creation Spec",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "FAILED",
  "validationChecks" : [ {
    "severity" : "ERROR",
    "resultStatus" : "FAILED",
    "errorResponse" : {
      "errorCode" : "VSAN_LICENSE_KEY_PROVIDED_WHEN_DEPLOYMENT_IS_WITHOUT_LICENSE_KEYS",
      "arguments" : [ ],
      "message" : "vSAN license key is provided when deployment is triggered without license keys.",
      "remediationMessage" : "Verify that vSAN license key is not provided when deployment is triggered without license keys."
    }
  }, {
    "severity" : "ERROR",
    "resultStatus" : "FAILED",
    "errorResponse" : {
      "errorCode" : "NSX_LICENSE_KEY_PROVIDED_WHEN_DEPLOYMENT_IS_WITHOUT_LICENSE_KEYS",
      "arguments" : [ ],
      "message" : "NSX license key is provided when deployment is triggered without license keys.",
      "remediationMessage" : "Verify that NSX license key is not provided when deployment is triggered without license keys."
    }
  } ]
}
  • 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" : {
      "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",
      "hostSpecs" : [ {
        "id" : "311dd641-b6c8-409e-b7ed-a0b689fde75e",
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      }, {
        "id" : "010b5566-3b4e-4b75-958a-fa8a6edf6ceb",
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      }, {
        "id" : "c78dcb63-8fa7-443d-8a29-6f86f3c01384",
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "failuresToTolerate" : 1,
          "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
          "datastoreName" : "sfo-w01-cl01-ds-vsan01"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl01-vds01",
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl01-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT",
            "activeUplinks" : [ "uplink1", "uplink2" ],
            "teamingPolicy" : "loadbalance_ip"
          }, {
            "name" : "sfo-w01-cl01-vds01-pg-vsan",
            "transportType" : "VSAN",
            "activeUplinks" : [ "uplink1" ],
            "standByUplinks" : [ "uplink2" ],
            "teamingPolicy" : "loadbalance_loadbased"
          }, {
            "name" : "sfo-w01-cl01-vds01-pg-vmotion",
            "transportType" : "VMOTION",
            "activeUplinks" : [ "uplink2" ],
            "standByUplinks" : [ "uplink1" ],
            "teamingPolicy" : "loadbalance_srcmac"
          } ],
          "mtu" : 9000
        }, {
          "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"
            } ]
          } ]
        } ]
      }
    } ]
  },
  "nsxTSpec" : {
    "nsxManagerSpecs" : [ {
      "name" : "sfo-w01-nsx01a",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    }, {
      "name" : "sfo-w01-nsx01b",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    }, {
      "name" : "sfo-w01-nsx01c",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    } ],
    "vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
    "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
    "nsxManagerAdminPassword" : "xxxxxxxx",
    "nsxManagerAuditPassword" : "xxxxxxxx",
    "formFactor" : "large"
  },
  "ssoDomainSpec" : {
    "ssoDomainPassword" : "Ca$hc0w1",
    "ssoDomainName" : "vrack.rainpole.local"
  }
}'

HTTP Request

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

{
  "domainName" : "sfo-w01",
  "vcenterSpec" : {
    "name" : "sfo-w01-vc01",
    "networkDetailsSpec" : {
      "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",
      "hostSpecs" : [ {
        "id" : "311dd641-b6c8-409e-b7ed-a0b689fde75e",
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      }, {
        "id" : "010b5566-3b4e-4b75-958a-fa8a6edf6ceb",
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      }, {
        "id" : "c78dcb63-8fa7-443d-8a29-6f86f3c01384",
        "licenseKey" : "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX",
        "username" : "root",
        "hostNetworkSpec" : {
          "vmNics" : [ {
            "id" : "vmnic0",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic1",
            "vdsName" : "sfo-w01-cl01-vds01",
            "uplink" : "uplink2"
          }, {
            "id" : "vmnic2",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink1"
          }, {
            "id" : "vmnic3",
            "vdsName" : "sfo-w01-cl01-vds02",
            "uplink" : "uplink2"
          } ]
        }
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "failuresToTolerate" : 1,
          "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
          "datastoreName" : "sfo-w01-cl01-ds-vsan01"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl01-vds01",
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl01-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT",
            "activeUplinks" : [ "uplink1", "uplink2" ],
            "teamingPolicy" : "loadbalance_ip"
          }, {
            "name" : "sfo-w01-cl01-vds01-pg-vsan",
            "transportType" : "VSAN",
            "activeUplinks" : [ "uplink1" ],
            "standByUplinks" : [ "uplink2" ],
            "teamingPolicy" : "loadbalance_loadbased"
          }, {
            "name" : "sfo-w01-cl01-vds01-pg-vmotion",
            "transportType" : "VMOTION",
            "activeUplinks" : [ "uplink2" ],
            "standByUplinks" : [ "uplink1" ],
            "teamingPolicy" : "loadbalance_srcmac"
          } ],
          "mtu" : 9000
        }, {
          "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"
            } ]
          } ]
        } ]
      }
    } ]
  },
  "nsxTSpec" : {
    "nsxManagerSpecs" : [ {
      "name" : "sfo-w01-nsx01a",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01a.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    }, {
      "name" : "sfo-w01-nsx01b",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01b.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    }, {
      "name" : "sfo-w01-nsx01c",
      "networkDetailsSpec" : {
        "dnsName" : "sfo-w01-nsx01c.sfo.rainpole.io",
        "gateway" : "10.0.0.250",
        "subnetMask" : "255.255.255.0"
      }
    } ],
    "vipFqdn" : "sfo-w01-nsx01.sfo.rainpole.io",
    "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
    "nsxManagerAdminPassword" : "xxxxxxxx",
    "nsxManagerAuditPassword" : "xxxxxxxx",
    "formFactor" : "large"
  },
  "ssoDomainSpec" : {
    "ssoDomainPassword" : "Ca$hc0w1",
    "ssoDomainName" : "vrack.rainpole.local"
  }
}

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.

[_validatedomaincreationspec] API [_createdomain] API [_gethosts] API [_gethost] API [_gettasks] API [_gettask] API [_retrytask] API

2. Get the Domains

2.1. Prerequisites API

None

2.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" : [ "administrator@vsphere.local" ],
    "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" : [ "administrator@vsphere.local" ],
    "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"
  } ]
}

[_getdomains] API [_getdomain] API

3. Get a Domain

3.1. Prerequisites API

The following data is required

  • ID of the domain

3.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" : [ "administrator@vsphere.local" ],
  "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"
}

[_getdomains] API [_getdomain] API

4. Get Domain Endpoints

4.1. Prerequisites API

The following data is required

  • ID of the domain

4.2. Steps API

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/22b3ca62-aebf-45b5-a13d-0e2e6a80f66c/endpoints' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/22b3ca62-aebf-45b5-a13d-0e2e6a80f66c/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: 103

{
  "elements" : [ {
    "type" : "VCENTER",
    "url" : "https://sfo-w01-vc01.sfo.rainpole.io"
  } ]
}

[_getdomainendpoints] API [_getdomains] API [_getdomain] API

5. Rename a Domain

5.1. Prerequisites API

  • Domain must exist.

5.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: 311

{
  "id" : "19b152c3-2185-4d5e-b65e-9e25f0803249",
  "description" : "Validating Domain Update Spec",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "SUCCEEDED",
  "validationChecks" : [ {
    "description" : "DomainUpdateSpecValidation",
    "severity" : "INFO",
    "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
}

[_updatedomain] API [_getdomain] API [_getdomains] API

6. Delete a Domain

When you delete a domain, the clusters within the domain are deleted and the hosts are returned to the free pool.

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.

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.

6.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.

6.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: 625

{
  "id" : "2b90673e-f68a-43aa-ab44-c4e0a46fae86",
  "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",
  "creationTimestamp" : "2024-08-27T19:56:57.342Z",
  "completionTimestamp" : "2024-08-27T19:56:57.342Z",
  "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/637b4a84-bad1-49d2-b779-571a3b527f52
Content-Length: 213

{
  "id" : "637b4a84-bad1-49d2-b779-571a3b527f52",
  "name" : "Removing domain",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2024-08-27T19:56:50.185Z",
  "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.

[_getdomains] API [_getdomain] API [_gettask] API [_retrytask] API
Last updated 2024-08-27 16:13:54 -0700

Operations
GET
Get Tags Assigned To Domain
Get tags assigned to a domain
PUT
Assign Tags To Domain
Assign tags to a domain
DELETE
Remove Tags From Domain
remove Tags From Domain
GET
Get Domains
Retrieve a list of domains
POST
Create Domain
Create a domain
POST
Validate Domain Update Spec
Perform validation of the DomainUpdateSpec specification
POST
Perform Domain Isolation Precheck
Perform Domain Isolation Prechecks
POST
Post Datastore Query
Post a datastore query
POST
Post Cluster Query
Post a cluster query
POST
Post Clusters Query
Post clusters query
POST
Validate Domain Creation Spec
Perform validation of the DomainCreationSpec specification
GET
Get Domain
Get a domain by its ID
DELETE
Delete Domain
Remove a domain if it has been previously initialized for deletion
PATCH
Update Domain
Update a Domain
GET
Get Domain Update Validation
Get the status of the validations for domain related operations
GET
Get Domain Tag Manager Url
Get Domain Tag Manager Url
GET
Get Assignable Tags For Domain
Get tags assignable to a domain
GET
Get Domain Endpoints
Retrieve a list of endpoints or URLs for a domain by its ID
GET
Get Domain Isolation Precheck Status
Get the status of the Domain Isolation Precheck
GET
Get Datastore Query Response
Get Datastore query response
GET
Get Datastores Criteria
Get all datastore criteria
GET
Get Datastore Criterion
Get a criterion to query for datastore
GET
Get Cluster Query Response
Get cluster query response
GET
Get Clusters Query Response
Get clusters query response
GET
Get Cluster Criteria
Get all cluster criteria
GET
Get Cluster Criterion
Get a criterion to query for cluster
GET
Domain Create Validation
Get the status of the validations for domain related operations
GET
Get Tags Assigned To Domains
Get tags assigned to all domains