ITS Private Cloud API v2.4.3 🎉

We are pleased to announce we released the ITS Cloud API v2.4.3 with the following improvements and bug fixes:

Improvements

Virtual Machine Network Interface Controllers creation and updates (#997, #999, #1000)

Endpoints

Description

Based on user feedback and user behaviour, we have improved the way of creating virtual machine network interface controller (NICs). From this version on, Virtual Machine NICs can include network adapter type vmxnet3, vmxnet2, e1000, e1000e in the payload.

Originally, network adapters were created by mapping a list/array of strings ["dvportgroup-1", "dvportgroup-2"] now, NICs are specified by a list of adapter objects [{"network": "dvportgroup-1", "type": "vmxnet2"}, {"network": "dvportgroup-1"}], for example:


Create a Virtual Machine with two NICs: vmxnet3 and e1000e:

curl -H "Authentication: Bearer $TK" -X POST https://cloud-api.eis.utoronto.ca/v2/vm -d '{"description": "Testing new adapter payload", "bill_dept": "EIS", "usage": "Dev", "built_from": "os_install", "os": "78", "folder": "group-v123", "disks": [8], "networks": [{"network": "dvportgroup-1"}, {"network": "dvportgroup-1", "type": "e1000e"}]}'

Note that one of the NICs does not specify the adapter type. In that case the API would set the default adapter to vmxnet3.


Create a couple of network adapters of a given vm:

curl -H "Authentication: Bearer $TK" -X POST https://cloud-api.eis.utoronto.ca/v2/vm/<uuid>/nic -d '[{"network": "dvportgroup-1", "type": "vmxnet2"}, {"network": "dvportgroup-1"}]'


Also, the Virtual Machine Specification resource has been updated to provide the desired format:

curl -H "Authentication: Bearer $TK" -X GET https://cloud-api.eis.utoronto.ca/v2/vm/5030d943-bec7-d76b-a808-99d5366c3409/spec

{
  "_links": {
    "self": "https://cloud-api.eis.utoronto.ca/v2/vm/5030d943-bec7-d76b-a808-99d5366c3409/spec",
    "vm": "https://cloud-api.eis.utoronto.ca/v2/vm/5030d943-bec7-d76b-a808-99d5366c3409"
  },
  "data": {
    "admin_email": "jm.lopez(at)utoronto.ca",
    "admin_name": "Jose Manuel Lopez Lujan",
    "admin_phone": "000-000-0000",
    "bill_dept": "EIS",
    "built_from": "os_install",
    "cpu": 1,
    "description": "Testing vm deployment",
    "disks": [
      8
    ],
    "domain": "domain-c63",
    "folder": "group-v154",
    "inform": [
      "jm.lopez(at)utoronto.ca"
    ],
    "memory": 1,
    "name": "pensive_stonebraker",
    "networks": [
      {
        "network": "dvportgroup-1082",
        "type": "vmxnet3"
      },
      {
        "network": "dvportgroup-1083",
        "type": "e1000"
      }
    ],
    "os": "other26xLinux64Guest",
    "usage": "QA",
    "vss_options": [],
    "vss_service": ""
  },
  "meta": {
    "count": 18,
    "time": "0.16410s",
    "user": "josem"
  }
}

Object attribute update from Camel case to snake case naming convention (#998)

Endpoints

  • /v2/* (all)

Description

The API had a mix of camelCase and snake_case attribute format, and in order to standardize it, we have taken the pythonic approach to use snake_case only. From this version forward, all object attributes will look like the following example:

{
      "cpu_count": 1,
      "created_on": "2019-09-16 Mon 13:32:39 EDT",
      "folder": {
        "moref": "group-v154",
        "name": "Development",
        "parent_moref": "group-v144",
        "path": "VSS > Development",
        "vim_type": "vim.Folder"
      },
      "folder_moref": "group-v154",
      "guest_full_name": "Other 2.6.x Linux (64-bit)",
      "guest_id": "other26xLinux64Guest",
      "hostname": null,
      "ip_address": null,
      "is_template": false,
      "memory_gb": 1.0,
      "memory_mb": 1024,
      "moref": "vm-1114",
      "name": "1909Q-pensive_stonebraker",
      "overall_status": "green",
      "power_state": "poweredOff",
      "provisioned_gb": 10.18,
      "tools_running_status": "guestToolsNotRunning",
      "tools_version": "2147483647",
      "tools_version_status": "guestToolsUnmanaged",
      "uncommitted_bytes": 10452728320,
      "unshared_bytes": 476686370,
      "updated_on": "2019-09-16 Mon 13:32:39 EDT",
      "uuid": "5030d943-bec7-d76b-a808-99d5366c3409",
      "version": "vmx-07"
    }


Guest Operating System object refactor (#996)

Endpoints

  • /v2/os

Description

Guest operating system resource provided objects with the following attributes:

  • guestFullName
  • guestId
  • id

Two out of three attributes were renamed and simplified to:

  • full_name
  • guest_id

And added:

  • family

Then, the new operating system object would look as follows:

   {
      "family": "linuxGuest",
      "full_name": "CentOS 6",
      "guest_id": "centos6Guest",
      "id": 80
    },
    {
      "family": "windowsGuest",
      "full_name": "Microsoft Windows Server 2003 Standard Edition (64 bit)",
      "guest_id": "winNetStandard64Guest",
      "id": 3
    }

Inventory allows user to specify whether to transfer report to vskey-stor (#1001)

Endpoints

  • /v2/inventory

Description

The inventory request resource has a new payload attribute to either transfer the resulting inventory report file to vskey-stor or not. To disable transferring, set the attribute transfer=false. For example:

curl -H "Authentication: Bearer $TK" -X POST https://cloud-api.eis.utoronto.ca/v2/inventory -d '{"properties": ["folder", "disks"], "format": "csv", "transfer": false}'

An inventory file will be generated and can be dowloaded from the API itself:

curl -H "Authentication: Bearer $TK" -X GET https://cloud-api.eis.utoronto.ca/v2/inventory/<request-id>


Bug Fixes

Cross-Origin Read Blocking (CORB)

Endpoints

  • / (all)

Description

Cross-Origin Read Blocking (CORB) is a new web platform security feature that helps mitigate the threat of side-channel attacks (including Spectre). It is designed to prevent the browser from delivering certain cross-origin network responses to a web page, when they might contain sensitive information and are not needed for existing web features. For example, it will block a cross-origin text/html response requested from a <script> or <img> tag, replacing it with an empty response instead. This is an important part of the protections included with Site Isolation. (From Chromium.org)

The API now provides a X-Content-Type-Options: nosniff response header to allow browsers block requests where contents do not match the Content-Type header.

HTTP/1.1 200 OK
Allow: HEAD, OPTIONS, GET
Content-Length: 0
Content-Type: text/html; charset=utf-8
Date: Fri, 20 Sep 2019 17:14:33 GMT
Server: gunicorn/19.7.1
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Ratelimit-Limit: 5000
X-Ratelimit-Remaining: 4999
X-Ratelimit-Reset: 1569002400
X-Vssapi-Appserver: 7853de480362
X-Vssapi-Version: v2.4.3


Virtual Machine event resource not working properly (#1004)

Endpoints

  • /v2/vm/<uuid>/event

Description

The resource to obtain related events on vCenter was not working properly returning 500 errors instead. A fix has been released and works as expected

Virtual Machine HA Group errors (#1003)

Endpoints

  • /v2/vm/<uuid>/vss/ha-group

Description

Exception was thrown due to a typo in the code. Fix has been released and it's working as expected.



University of Toronto - Since 1827