Ejemplos

POST /api/compute_resources
{
  "compute_resource": {
    "name": "Ovirt-create-test",
    "url": "https://myovirt/api",
    "provider": "ovirt",
    "datacenter": "af69fae6-5f77-441a-969d-15a42144e0f5",
    "user": "user@example.com",
    "password": "secret"
  }
}
201
{
  "description": null,
  "url": "https://myovirt/api",
  "created_at": "2019-11-07 08:49:09 UTC",
  "updated_at": "2019-11-07 08:49:09 UTC",
  "id": 980190964,
  "name": "Ovirt-create-test",
  "provider": "Ovirt",
  "provider_friendly_name": "oVirt",
  "user": "user@example.com",
  "datacenter": "af69fae6-5f77-441a-969d-15a42144e0f5",
  "use_v4": false,
  "ovirt_quota": null,
  "display_type": "vnc",
  "keyboard_layout": "en-us",
  "images": [],
  "compute_attributes": [],
  "locations": [],
  "organizations": []
}

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

compute_resource
requerido

Validations:

  • Must be a Hash

compute_resource[name]
requerido

Validations:

  • Must be a String

compute_resource[provider]
opcional , nil permitido

Los proveedores incluyen Libvirt, Ovirt, EC2, Vmware, Openstack, Rackspace, GCE

Validations:

  • Must be a String

compute_resource[url]
opcional , nil permitido

URL para Libvirt, oVirt, OpenStack y Rackspace

Validations:

  • Must be a String

compute_resource[description]
opcional , nil permitido

Validations:

  • Must be a String

compute_resource[user]
opcional , nil permitido

Nombre de usuario para oVirt, EC2, VMware, OpenStack. Llave de acceso para EC2.

Validations:

  • Must be a String

compute_resource[password]
opcional , nil permitido

Contraseña para oVirt, EC2, VMware, OpenStack. Llave secreta para EC2

Validations:

  • Must be a String

compute_resource[uuid]
opcional , nil permitido

Obsoleto. Use el centro de datos

Validations:

  • Must be a String

compute_resource[datacenter]
opcional , nil permitido

para oVirt, VMware Datacenter

Validations:

  • Must be a String

compute_resource[use_v4]
opcional , nil permitido

solo para oVirt

Validations:

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

compute_resource[ovirt_quota]
opcional , nil permitido

for oVirt only, ID of quota to use

Validations:

  • Must be a String

compute_resource[public_key]
opcional , nil permitido

solo para oVirt

Validations:

  • Must be a String

compute_resource[region]
opcional , nil permitido

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

Validations:

  • Must be a String

compute_resource[tenant]
opcional , nil permitido

for OpenStack and AzureRM only

Validations:

  • Must be a String

compute_resource[domain]
opcional , nil permitido

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[project_domain_name]
opcional , nil permitido

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[project_domain_id]
opcional , nil permitido

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[server]
opcional , nil permitido

para VMware

Validations:

  • Must be a String

compute_resource[set_console_password]
opcional , nil permitido

solo para Libvirt y VMware

Validations:

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

compute_resource[display_type]
opcional , nil permitido

for Libvirt and oVirt only

Validations:

  • Must be one of: VNC, SPICE.

compute_resource[keyboard]
opcional , nil permitido

solo para oVirt

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]
opcional , nil permitido

habilitar caché solo para VMware

Validations:

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

compute_resource[project]
opcional , nil permitido

Project id for GCE only

Validations:

  • Must be a String

compute_resource[email]
opcional , nil permitido

Email for GCE only

Validations:

  • Must be a String

compute_resource[key_path]
opcional , nil permitido

Certificate path for GCE only

Validations:

  • Must be a String

compute_resource[zone]
opcional , nil permitido

for GCE only

Validations:

  • Must be a String

compute_resource[location_ids]
opcional , nil permitido

REMPLAZAR ubicaciones con ID dadas

Validations:

  • Must be an array of any type

compute_resource[organization_ids]
opcional , nil permitido

REMPLAZAR organizaciones con ID dadas.

Validations:

  • Must be an array of any type