Examples

PUT /api/compute_resources/367690737
{
  "compute_resource": {
    "location_ids": [
      447626439,
      447626440,
      447626441
    ]
  }
}
200
{
  "description": "mycompute",
  "url": "test:///default",
  "created_at": "2020-05-20 13:19:53 UTC",
  "updated_at": "2020-05-20 13:19:53 UTC",
  "id": 367690737,
  "name": "mycompute",
  "provider": "Libvirt",
  "provider_friendly_name": "Libvirt",
  "display_type": "vnc",
  "set_console_password": true,
  "images": [],
  "compute_attributes": [],
  "locations": [
    {
      "id": 447626439,
      "name": "loc43",
      "title": "loc43",
      "description": null
    },
    {
      "id": 447626440,
      "name": "loc44",
      "title": "loc44",
      "description": null
    },
    {
      "id": 447626441,
      "name": "loc45",
      "title": "loc45",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    }
  ]
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a String

compute_resource
required

Validations:

  • Must be a Hash

compute_resource[name]
optional

Validations:

  • Must be a String

compute_resource[provider]
optional , nil allowed

Providers include Libvirt, Ovirt, EC2, Vmware, Openstack, GCE

Validations:

  • Must be a String

compute_resource[url]
optional , nil allowed

URL for Libvirt, oVirt and OpenStack

Validations:

  • Must be a String

compute_resource[description]
optional , nil allowed

Validations:

  • Must be a String

compute_resource[user]
optional , nil allowed

Username for oVirt, EC2, VMware, OpenStack. Access Key for EC2.

Validations:

  • Must be a String

compute_resource[password]
optional , nil allowed

Password for oVirt, EC2, VMware, OpenStack. Secret key for EC2

Validations:

  • Must be a String

compute_resource[datacenter]
optional , nil allowed

for oVirt, VMware Datacenter

Validations:

  • Must be a String

compute_resource[use_v4]
optional , nil allowed

for oVirt only

Validations:

  • Must be one of: true, false, 1, 0.

compute_resource[ovirt_quota]
optional , nil allowed

for oVirt only, ID or Name of quota to use

Validations:

  • Must be a String

compute_resource[public_key]
optional , nil allowed

for oVirt only

Validations:

  • Must be a String

compute_resource[region]
optional , nil allowed

for AzureRm eg. ‘eastus’ and for EC2 only. Use ‘us-gov-west-1’ for EC2 GovCloud region

Validations:

  • Must be a String

compute_resource[tenant]
optional , nil allowed

for OpenStack and AzureRm only

Validations:

  • Must be a String

compute_resource[domain]
optional , nil allowed

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[project_domain_name]
optional , nil allowed

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[project_domain_id]
optional , nil allowed

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[server]
optional , nil allowed

for VMware

Validations:

  • Must be a String

compute_resource[set_console_password]
optional , nil allowed

for Libvirt and VMware only

Validations:

  • Must be one of: true, false, 1, 0.

compute_resource[display_type]
optional , nil allowed

for Libvirt and oVirt only

Validations:

  • Must be one of: VNC, SPICE.

compute_resource[keyboard]
optional , nil allowed

for oVirt only

Validations:

  • Must be one of: ar, de-ch, es, fo, fr-ca, hu, ja, mk, no, pt-br, sv, da, en-gb, et, fr, fr-ch, is, lt, nl, pl, ru, th, de, en-us, fi, fr-be, hr, it, lv, nl-be, pt, sl, tr.

compute_resource[caching_enabled]
optional , nil allowed

enable caching, for VMware only

Validations:

  • Must be one of: true, false, 1, 0.

compute_resource[project]
optional , nil allowed

Project id for GCE only

Validations:

  • Must be a String

compute_resource[email]
optional , nil allowed

Email for GCE only

Validations:

  • Must be a String

compute_resource[key_path]
optional , nil allowed

Certificate path for GCE only

Validations:

  • Must be a String

compute_resource[zone]
optional , nil allowed

for GCE only

Validations:

  • Must be a String

compute_resource[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

compute_resource[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type