Domains
Introduction
A fault domain consists of one or more ESXI hosts and Datastore Clusters grouped together according to their physical location in the datacenter.Â
The following table shows a brief description and HTTP methods allowed to interact with Fault Domains.
Resource | URI | Description | GET | POST | PUT | PATCH |
---|---|---|---|---|---|---|
Domain | /domain | Fault Domain resource. List fault domains and their attributes | Â |
TK stores the Cloud API Token generated as a result of the following POST request to the /auth/request-token resource:
curl -X POST https://vss-api.eis.utoronto.ca/auth/request-token -u <username>
For example, extracting the token with the jq command:
TK=$(curl -X POST https://vss-api.eis.utoronto.ca/auth/request-token -u <username> | jq -r '.token')
List
In order to list allowed Fault Domains you should make a GET request to the endpoint /v2/domain passing your access token. As a result, you will get a reference URI /v2/domain/<moref> to get detailed information about that domain, human readable name and Managed Object Reference (moref).
Name | Type | Description |
---|---|---|
Name | string | Fault Domain Human readable name |
moref | string | vCenter Managed Object Reference (moref) |
_links | array | List of URIs related to the resource. |
The following examples implements HTTPie and CURL to list available fault domains:
http GET "https://vss-api.eis.utoronto.ca/v2/domain" "Authorization: Bearer $TK"
curl -H "Authorization: Bearer $TK" -u $TK -X GET "https://vss-api.eis.utoronto.ca/v2/dmoain"
Response Body
Filters
This resource has two main filters to narrow down the number of Fault Domains shown in the result.
Name | Description |
---|---|
Name | Fault Domain human readable name |
moref | vCenter Managed Object Reference (moref) |
The following examples show how to structure a GET request, with filters:
Response Body - Filtered by name=FD2
Response Body - Filtered by moref=4402
List specific Fault Domain Info
Some of the attributes will have an object value. Such is the case of items in attribute vms.
Name | Type | Description |
---|---|---|
name | string | Fault Domain name. |
moref | string | vCenter Managed object reference. |
status | string | Fault Domain general "health" value:
|
vms | array | Array of Virtual Machines hosted in given fault domain. |
The following example, requests information about a particular Fault domain using the base resource /v2/domain and appending the moref to get the URI /v2/domain/domain-c5877:
HTTP response body would look something like:
Response Body
Attribute VMs contain Hypermedia Control to each VM you have access to in that particular Fault Domain.