GET /api/compute_resources
List all compute resources.

参数

参数名字 描述
search
选填

过滤结果

Validations:

  • Must be String

order
选填

结果排序

Validations:

  • Must be String

page
选填

编页结果

Validations:

  • Must be String

per_page
选填

每个请求中的条目数

Validations:

  • Must be String


GET /api/compute_resources/:id
Show an compute resource.

参数

参数名字 描述
id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/compute_resources
Create a compute resource.

参数

参数名字 描述
compute_resource
必填

Validations:

  • Must be a Hash

compute_resource[name]
必填

Validations:

  • Must be String

compute_resource[provider]
选填

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

Validations:

  • Must be String

compute_resource[url]
选填

用于 Libvirt、oVirt 和 Openstack 的 URL

Validations:

  • Must be String

compute_resource[description]
选填

Validations:

  • Must be String

compute_resource[user]
选填

oVirt、EC2、VMware、OpenStack 的用户名。EC2 的访问密钥。

Validations:

  • Must be String

compute_resource[password]
选填

oVirt、EC2、VMware、OpenStack 的密码。EC2 的访问密钥。

Validations:

  • Must be String

compute_resource[uuid]
选填

用于 oVirt、VMware 数据库

Validations:

  • Must be String

compute_resource[region]
选填

仅用于 EC2

Validations:

  • Must be String

compute_resource[tenant]
选填

仅用于 OpenStack

Validations:

  • Must be String

compute_resource[server]
选填

用于 VMware

Validations:

  • Must be String

compute_resource[set_console_password]
选填

仅用于 Libvirt 和 VMware

Validations:

  • Must be 'true' or 'false' or '1' or '0'


PUT /api/compute_resources/:id
Update a compute resource.

参数

参数名字 描述
id
必填

Validations:

  • Must be String

compute_resource
必填

Validations:

  • Must be a Hash

compute_resource[name]
选填

Validations:

  • Must be String

compute_resource[provider]
选填

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

Validations:

  • Must be String

compute_resource[url]
选填

用于 Libvirt、oVirt 和 Openstack 的 URL

Validations:

  • Must be String

compute_resource[description]
选填

Validations:

  • Must be String

compute_resource[user]
选填

oVirt、EC2、VMware、OpenStack 的用户名。EC2 的访问密钥。

Validations:

  • Must be String

compute_resource[password]
选填

oVirt、EC2、VMware、OpenStack 的密码。EC2 的访问密钥。

Validations:

  • Must be String

compute_resource[uuid]
选填

用于 oVirt、VMware 数据库

Validations:

  • Must be String

compute_resource[region]
选填

仅用于 EC2

Validations:

  • Must be String

compute_resource[tenant]
选填

仅用于 OpenStack

Validations:

  • Must be String

compute_resource[server]
选填

用于 VMware

Validations:

  • Must be String


DELETE /api/compute_resources/:id
Delete a compute resource.

参数

参数名字 描述
id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.