Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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.

On this page:

ResourceURIDescriptionGETPOSTPUTPATCH
Fault Domain/domainFault Domain resource. List fault domains and their attributes(tick)    

OPTIONS HTTP method

Remember, you can also show what methods are allowed and method description, parameters, etc. by making an OPTIONS HTTP request to /v2/domain.

http OPTIONS "https://vss-api.eis.utoronto.ca:8001/v2/domain"
curl -X OPTIONS "https://vss-api.eis.utoronto.ca:8001/v2/domain" 

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

NameTypeDescription
NamestringFault Domain Human readable name
morefstringvCenter Managed Object Reference (moref)
_linksarrayList of URIs related to the resource.

The following examples implements HTTPie and CURL to list available fault domains:

http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/domain"
curl -u $TK -X GET "https://vss-api.eis.utoronto.ca:8001/v2/dmoain"
Response Body
{
    "_links": {
        "api": "https://vss-api.eis.utoronto.ca:8001/v2/", 
        "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain"
    }, 
    "data": [
        {
            "_links": {
                "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c4252"
            }, 
            "moref": "domain-c4252", 
            "name": "FD2"
        }, 
        {
            "_links": {
                "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c4402"
            }, 
            "moref": "domain-c4402", 
            "name": "FD1"
        }, 
        {
            "_links": {
                "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c5877"
            }, 
            "moref": "domain-c5877", 
            "name": "FD3"
        }
    ], 
    "meta": {
        "count": 3, 
        "time": "0.19787s", 
        "user": "jm"
    }
}

Filters

This resource has two main filters to narrow down the number of Fault Domains shown in the result.

NameDescription
NameFault Domain human readable name
morefvCenter Managed Object Reference (moref)

The following examples show how to structure a GET request, with filters:

http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/domain?name=FD2"
http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/domain?moref=4402"
Response Body - Filtered by name=FD2
{
    "_links": {
        "api": "https://vss-api.eis.utoronto.ca:8001/v2/", 
        "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain"
    }, 
    "data": [
        {
            "_links": {
                "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c4252"
            }, 
            "moref": "domain-c4252", 
            "name": "FD2"
        }
    ], 
    "meta": {
        "count": 1, 
        "time": "0.20156s", 
        "user": "jm"
    }
}
Response Body - Filtered by moref=4402
{
    "_links": {
        "api": "https://vss-api.eis.utoronto.ca:8001/v2/", 
        "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain"
    }, 
    "data": [
        {
            "_links": {
                "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c4402"
            }, 
            "moref": "domain-c4402", 
            "name": "FD1"
        }
    ], 
    "meta": {
        "count": 1, 
        "time": "0.20156s", 
        "user": "jm"
    }
}

List specific Fault Domain Info

Some of the attributes will have an object value. Such is the case of items in attribute vms.

NameTypeDescription
namestringFault Domain name.
morefstringvCenter Managed object reference.
statusstring

Fault Domain general "health" value:

  • gray: The status is unknown.
  • green: The entity is OK.
  • red: The entity definitely has a problem.
  • yellow: The entity might have a problem.
totalCPUMHznumberFault domain cpu capacity in MHz
totalMemoryGBnumberFault domain memory capacity in GB
vmsarrayArray 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 -a $TK GET https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c5877
curl -u $TK -X GET https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c5877

HTTP response body would look something like:

Response Body
{
    "_links": {
        "domain": "https://vss-api.eis.utoronto.ca:8001/v2/domain", 
        "self": "https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c5877"
    }, 
    "data": {
        "datastoreCount": 15, 
        "hostsCount": 4, 
        "moref": "domain-c5877", 
        "name": "FD3", 
        "status": "green", 
        "totalCPUMHz": 230304, 
        "totalMemoryGB": 2198.724608, 
        "vms": [
            {
                "_links": {
                    "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/5012f4f0-443b-9cc4-1256-3d78093e7d30"
                }, 
                "name": "Ubuntu_64b-14.04"
            }, 
            {
                "_links": {
                    "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/50122e44-9ddd-2497-7b6c-a3bc52749c52"
                }, 
                "name": "CentOS_64b-7"
            }, 
            {
                "_links": {
                    "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/5012dae7-925b-b97a-97b8-4a40e5663147"
                }, 
                "name": "Ubuntu_64b-14.10"
            }, 
            {
                "_links": {
                    "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/5012826a-6a1a-815a-249d-7d6eb640f020"
                }, 
                "name": "1604T-Ubuntu1"
            }, 
            {
                "_links": {
                    "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/50125d11-a8d6-2af7-c01e-dc6f6be0e607"
                }, 
                "name": "1604T-Ubuntu34"
            }, 
            {
                "_links": {
                    "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/501210c6-7d40-b31f-b326-f66325ca27a0"
                }, 
                "name": "1604T-Ubuntu2"
            }, 
            {
                "_links": {
                    "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/50123c4c-c810-5c0f-6203-eac67f0cb7e8"
                }, 
                "name": "Ubuntu_64b-16.04_LTS"
            }
        ]
    }, 
    "meta": {
        "count": 8, 
        "time": "1.62886s", 
        "user": "jm"
    }
}

Attribute VMs contain Hypermedia Control to each VM you have access to in that particular Fault Domain.

  • No labels