Esempi

PUT /api/compute_resources/367690737
{
  "compute_resource": {
    "organization_ids": [
      114267492,
      447626438,
      61304186
    ]
  }
}
200
{
  "description": "mycompute",
  "url": "test:///default",
  "created_at": "2019-09-11 14:37:23 UTC",
  "updated_at": "2019-09-11 14:37:23 UTC",
  "id": 367690737,
  "name": "mycompute",
  "provider": "Libvirt",
  "provider_friendly_name": "Libvirt",
  "display_type": "vnc",
  "set_console_password": true,
  "images": [],
  "compute_attributes": [],
  "locations": [
    {
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    },
    {
      "id": 114267492,
      "name": "Empty Organization",
      "title": "Empty Organization",
      "description": null
    },
    {
      "id": 61304186,
      "name": "Organization 2",
      "title": "Organization 2",
      "description": null
    }
  ]
}

Parametri

Nome parametro Descrizione
location_id
opzionale

Scopo per posizioni

Validations:

  • Must be a Integer

organization_id
opzionale

Scopo per organizzazioni

Validations:

  • Must be a Integer

id
richiesto

Validations:

  • Must be a String

compute_resource
richiesto

Validations:

  • Must be a Hash

compute_resource[name]
opzionale

Validations:

  • Must be a String

compute_resource[provider]
opzionale , consentito nil

I provider includono Libvirt, Ovirt, EC2, Vmware, Openstack, Rackspace, GCE

Validations:

  • Must be a String

compute_resource[url]
opzionale , consentito nil

URL for Libvirt, oVirt, OpenStack and Rackspace

Validations:

  • Must be a String

compute_resource[description]
opzionale , consentito nil

Validations:

  • Must be a String

compute_resource[user]
opzionale , consentito nil

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

Validations:

  • Must be a String

compute_resource[password]
opzionale , consentito nil

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

Validations:

  • Must be a String

compute_resource[uuid]
opzionale , consentito nil

Deprecated, please use datacenter

Validations:

  • Must be a String

compute_resource[datacenter]
opzionale , consentito nil

for oVirt, VMware Datacenter

Validations:

  • Must be a String

compute_resource[use_v4]
opzionale , consentito nil

for oVirt only

Validations:

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

compute_resource[ovirt_quota]
opzionale , consentito nil

for oVirt only, ID of quota to use

Validations:

  • Must be a String

compute_resource[public_key]
opzionale , consentito nil

for oVirt only

Validations:

  • Must be a String

compute_resource[region]
opzionale , consentito nil

for EC2 only, use ‘us-gov-west-1’ for GovCloud region

Validations:

  • Must be a String

compute_resource[tenant]
opzionale , consentito nil

for OpenStack only

Validations:

  • Must be a String

compute_resource[domain]
opzionale , consentito nil

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[project_domain_name]
opzionale , consentito nil

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[project_domain_id]
opzionale , consentito nil

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[server]
opzionale , consentito nil

for VMware

Validations:

  • Must be a String

compute_resource[set_console_password]
opzionale , consentito nil

for Libvirt and VMware only

Validations:

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

compute_resource[display_type]
opzionale , consentito nil

for Libvirt and oVirt only

Validations:

  • Must be one of: VNC, SPICE.

compute_resource[keyboard]
opzionale , consentito nil

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]
opzionale , consentito nil

enable caching, for VMware only

Validations:

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

compute_resource[project]
opzionale , consentito nil

Project id for GCE only

Validations:

  • Must be a String

compute_resource[email]
opzionale , consentito nil

Email for GCE only

Validations:

  • Must be a String

compute_resource[key_path]
opzionale , consentito nil

Certificate path for GCE only

Validations:

  • Must be a String

compute_resource[zone]
opzionale , consentito nil

for GCE only

Validations:

  • Must be a String

compute_resource[location_ids]
opzionale , consentito nil

SOSTITUIRE le posizioni con gli id dati

Validations:

  • Must be an array of any type

compute_resource[organization_ids]
opzionale , consentito nil

SOSTITUIRE le organizzazioni con gli id dati

Validations:

  • Must be an array of any type