GET /api/hosts
列出所有主机

GET /api/hostgroups/:hostgroup_id/hosts
列出主机组中的所有主机

GET /api/locations/:location_id/hosts
列出每个位置的主机

GET /api/organizations/:organization_id/hosts
列出每个机构的主机

GET /api/environments/:environment_id/hosts
列出每个位置的主机

参数

参数名字 描述
thin
选填

只列出主机的 ID 和名称

Validations:

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

hostgroup_id
选填

主机组 ID

Validations:

  • Must be a String

location_id
选填

位置 ID

Validations:

  • Must be a String

organization_id
选填

机构 ID

Validations:

  • Must be a String

environment_id
选填

环境 ID

Validations:

  • Must be a String

include
选填

要包含的额外信息类型阵列

Validations:

  • Must be one of: parameters, all_parameters.

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

排序项和顺序,例如 ‘id DESC’

Validations:

  • Must be a String

page
选填

页号,从 1 开始

Validations:

  • Must be a number.

per_page
选填

每页中显示的返回结果数

Validations:

  • Must be a number.

搜索字段

字段名 类型 可能的值
architecture
boot_time
build true, false
class string
comment
compute_resource
compute_resource_id
config_group string
created_at
domain
domain_id
environment
facts string
global_status ok, warning, error
has_ip
has_mac
hostgroup
hostgroup_fullname
hostgroup_id
hostgroup_name
hostgroup_title
image
installed_at
ip
last_report
location
location_id
mac
managed true, false
model
name
organization
organization_id
origin
os
os_description
os_id
os_major string
os_minor string
os_title
owner string
owner_id
owner_type
params string
params_name
parent_hostgroup string
puppet_ca
puppet_proxy_id
puppetmaster
realm
realm_id
smart_proxy string
status.applied
status.enabled true, false
status.failed
status.failed_restarts
status.interesting true, false
status.pending
status.restarted
status.skipped
subnet
subnet.name
subnet6
subnet6.name
user.firstname string
user.lastname string
user.login string
user.mail string
usergroup
usergroup.name
uuid

GET /api/hosts/:id
显示主机

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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

show_hidden_parameters
选填

显示隐藏的参数值

Validations:

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


POST /api/hosts
创建主机

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

host
必填

Validations:

  • Must be a Hash

host[name]
必填

Validations:

  • Must be a String

host[location_id]
必填

Validations:

  • Must be a number.

host[organization_id]
必填

Validations:

  • Must be a number.

host[environment_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a String

host[ip]
选填 , 允许空值

如果使用附带 DHCP 代理服务器的子网则不需要

Validations:

  • Must be a String

host[mac]
选填 , 允许空值

如果管理的主机为裸机则需要填写,如果为虚拟机,则不需要。

Validations:

  • Must be a String

host[architecture_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[domain_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[realm_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[puppet_proxy_id]
选填 , 允许空值

Puppet 代理服务器 ID

Validations:

  • Must be a number.

host[puppet_ca_proxy_id]
选填 , 允许空值

Puppet CA 代理服务器 ID

Validations:

  • Must be a number.

host[puppetclass_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

host[config_group_ids]
选填 , 允许空值

关联配置组的 ID

Validations:

  • Must be an array of any type

host[operatingsystem_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a String

host[medium_id]
选填 , 允许空值

如果不是基于置备的映像,且用于管理主机,同时数值不是来自主机组,则需要填写。

Validations:

  • Must be a String

host[pxe_loader]
选填 , 允许空值

DHCP 文件名选项(默认为 Grub2/PXELinux)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub2 BIOS, Grub2 ELF, Grub2 UEFI, Grub2 UEFI SecureBoot, Grub2 UEFI HTTP, Grub2 UEFI HTTPS, Grub2 UEFI HTTPS SecureBoot, iPXE Embedded, iPXE UEFI HTTP, iPXE Chain BIOS, iPXE Chain UEFI.

host[ptable_id]
选填 , 允许空值

如果已管理主机,且未定义自定义分区,则需填写。

Validations:

  • Must be a number.

host[subnet_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[compute_resource_id]
选填 , 允许空值

nil 说明主机是裸机

Validations:

  • Must be a number.

host[root_pass]
选填 , 允许空值

如果已管理主机,且数值不是从主机组或设置中的默认密码继承,则需填写。

Validations:

  • Must be a String

host[model_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[hostgroup_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[owner_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[owner_type]
选填 , 允许空值

主机拥有者类型

Validations:

  • Must be one of: User, Usergroup.

host[image_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[host_parameters_attributes]
选填 , 允许空值

主机参数(阵列或索引哈希)

Validations:

  • Must be an Array of nested elements

host[host_parameters_attributes][name]
必填

参数名称

Validations:

  • Must be a String

host[host_parameters_attributes][value]
必填

参数值

Validations:

  • Must be a String

host[host_parameters_attributes][parameter_type]
选填 , 允许空值

Type of value

Validations:

  • Must be one of: string, boolean, integer, real, array, hash, yaml, json.

host[host_parameters_attributes][hidden_value]
选填 , 允许空值

Validations:

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

host[build]
选填 , 允许空值

Validations:

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

host[enabled]
选填 , 允许空值

将这个主机包含在 Foreman 报告中

Validations:

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

host[provision_method]
选填 , 允许空值

此方法用于置备主机。

Validations:

  • Must be one of: build, image.

host[managed]
选填 , 允许空值

用来表示主机被管理或没有被管理的 True/False 标签。注:这个值还决定是否需要一些参数。

Validations:

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

host[progress_report_id]
选填 , 允许空值

用来跟踪业务流程任务状态的 UUID,GET /api/orchestration/:UUID/tasks

Validations:

  • Must be a String

host[comment]
选填 , 允许空值

有关主机的附加信息

Validations:

  • Must be a String

host[capabilities]
选填 , 允许空值

Validations:

  • Must be a String

host[compute_profile_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[interfaces_attributes]
选填 , 允许空值

主机的网络接口。

Validations:

  • Must be an Array of nested elements

host[interfaces_attributes][mac]
选填 , 允许空值

接口的 MAC 地址。在裸机中管理的接口需要这个地址。

Validations:

  • Must be a String

host[interfaces_attributes][ip]
选填 , 允许空值

接口的 IPv4 地址

Validations:

  • Must be a String

host[interfaces_attributes][ip6]
选填 , 允许空值

接口的 IPv6 地址

Validations:

  • Must be a String

host[interfaces_attributes][type]
选填 , 允许空值

接口类型,例如:bmc。默认为 interface

Validations:

  • Must be one of: interface, bmc, bond, bridge.

host[interfaces_attributes][name]
选填 , 允许空值

接口 DNS 名称

Validations:

  • Must be a String

host[interfaces_attributes][subnet_id]
选填 , 允许空值

IPv4 接口的 Foreman 子网 ID

Validations:

  • Must be a number.

host[interfaces_attributes][subnet6_id]
选填 , 允许空值

IPv6 接口的 Foreman 子网 ID

Validations:

  • Must be a number.

host[interfaces_attributes][domain_id]
选填 , 允许空值

接口的 Foreman 域 ID。所管理主机中的主接口需要这个选项。

Validations:

  • Must be a number.

host[interfaces_attributes][identifier]
选填 , 允许空值

设备标识符,例如:eth0 或者 eth1.1。

Validations:

  • Must be a String

host[interfaces_attributes][managed]
选填 , 允许空值

这个接口应由 DHCP 管理还是由 DNS 智能代理服务器管理?是否应在预配过程中对其进行配置?

Validations:

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

host[interfaces_attributes][primary]
选填 , 允许空值

是否应该使用这个接口构建该主机的 FQDN?每台管理的主机都需要有一个主接口。

Validations:

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

host[interfaces_attributes][provision]
选填 , 允许空值

这个接口是否应该用于 PXELinux 的 TFTP(或基于映象主机的 SSH)?每台管理的主机需要有一个预配接口。

Validations:

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

host[interfaces_attributes][username]
选填 , 允许空值

仅用于 BMC 接口

Validations:

  • Must be a String

host[interfaces_attributes][password]
选填 , 允许空值

仅用于 BMC 接口

Validations:

  • Must be a String

host[interfaces_attributes][provider]
选填 , 允许空值

接口提供者,例如 IPMI。仅用于 BMC 接口。

Validations:

  • Must be one of: IPMI, SSH.

host[interfaces_attributes][virtual]
选填 , 允许空值

别名或 VLAN 失败

Validations:

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

host[interfaces_attributes][tag]
选填 , 允许空值

VLAN 标签,这个属性优先于子网 VLAN ID。仅用于虚拟接口。

Validations:

  • Must be a String

host[interfaces_attributes][mtu]
选填 , 允许空值

MTU,这个属性优先于子网 MTU。

Validations:

  • Must be a Integer

host[interfaces_attributes][attached_to]
选填 , 允许空值

这个接口所属接口识别符,例如:eth1。仅用于虚拟接口。

Validations:

  • Must be a String

host[interfaces_attributes][mode]
选填 , 允许空值

接口的捆绑模式,例如:balance-rr。仅用于捆绑接口。

Validations:

  • Must be one of: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb.

host[interfaces_attributes][attached_devices]
选填 , 允许空值

附加接口的识别符,例如:`['eth1', 'eth2']`。对于捆绑的接口,那些是从属接口。仅用于捆绑和桥接接口。

Validations:

  • Must be an array of any type

host[interfaces_attributes][bond_options]
选填 , 允许空值

使用空格分隔的选项,例如:miimon=100。仅用于捆绑接口。

Validations:

  • Must be a String

host[interfaces_attributes][compute_attributes]
选填 , 允许空值

该接口的附加计算资源具体属性。

Validations:

  • Must be a Hash

host[compute_attributes]
选填 , 允许空值

附加计算资源的具体属性。

Validations:

  • Must be a Hash


PUT /api/hosts/:id
更新主机

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

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.

host
必填

Validations:

  • Must be a Hash

host[name]
选填

Validations:

  • Must be a String

host[location_id]
选填

Validations:

  • Must be a number.

host[organization_id]
选填

Validations:

  • Must be a number.

host[environment_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a String

host[ip]
选填 , 允许空值

如果使用附带 DHCP 代理服务器的子网则不需要

Validations:

  • Must be a String

host[mac]
选填 , 允许空值

如果管理的主机为裸机则需要填写,如果为虚拟机,则不需要。

Validations:

  • Must be a String

host[architecture_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[domain_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[realm_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[puppet_proxy_id]
选填 , 允许空值

Puppet 代理服务器 ID

Validations:

  • Must be a number.

host[puppet_ca_proxy_id]
选填 , 允许空值

Puppet CA 代理服务器 ID

Validations:

  • Must be a number.

host[puppetclass_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

host[config_group_ids]
选填 , 允许空值

关联配置组的 ID

Validations:

  • Must be an array of any type

host[operatingsystem_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a String

host[medium_id]
选填 , 允许空值

如果不是基于置备的映像,且用于管理主机,同时数值不是来自主机组,则需要填写。

Validations:

  • Must be a String

host[pxe_loader]
选填 , 允许空值

DHCP 文件名选项(默认为 Grub2/PXELinux)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub2 BIOS, Grub2 ELF, Grub2 UEFI, Grub2 UEFI SecureBoot, Grub2 UEFI HTTP, Grub2 UEFI HTTPS, Grub2 UEFI HTTPS SecureBoot, iPXE Embedded, iPXE UEFI HTTP, iPXE Chain BIOS, iPXE Chain UEFI.

host[ptable_id]
选填 , 允许空值

如果已管理主机,且未定义自定义分区,则需填写。

Validations:

  • Must be a number.

host[subnet_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[compute_resource_id]
选填 , 允许空值

nil 说明主机是裸机

Validations:

  • Must be a number.

host[root_pass]
选填 , 允许空值

如果已管理主机,且数值不是从主机组或设置中的默认密码继承,则需填写。

Validations:

  • Must be a String

host[model_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[hostgroup_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[owner_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[owner_type]
选填 , 允许空值

主机拥有者类型

Validations:

  • Must be one of: User, Usergroup.

host[image_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[host_parameters_attributes]
选填 , 允许空值

主机参数(阵列或索引哈希)

Validations:

  • Must be an Array of nested elements

host[host_parameters_attributes][name]
选填

参数名称

Validations:

  • Must be a String

host[host_parameters_attributes][value]
选填

参数值

Validations:

  • Must be a String

host[host_parameters_attributes][parameter_type]
选填 , 允许空值

Type of value

Validations:

  • Must be one of: string, boolean, integer, real, array, hash, yaml, json.

host[host_parameters_attributes][hidden_value]
选填 , 允许空值

Validations:

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

host[build]
选填 , 允许空值

Validations:

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

host[enabled]
选填 , 允许空值

将这个主机包含在 Foreman 报告中

Validations:

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

host[provision_method]
选填 , 允许空值

此方法用于置备主机。

Validations:

  • Must be one of: build, image.

host[managed]
选填 , 允许空值

用来表示主机被管理或没有被管理的 True/False 标签。注:这个值还决定是否需要一些参数。

Validations:

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

host[progress_report_id]
选填 , 允许空值

用来跟踪业务流程任务状态的 UUID,GET /api/orchestration/:UUID/tasks

Validations:

  • Must be a String

host[comment]
选填 , 允许空值

有关主机的附加信息

Validations:

  • Must be a String

host[capabilities]
选填 , 允许空值

Validations:

  • Must be a String

host[compute_profile_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[interfaces_attributes]
选填 , 允许空值

主机的网络接口。

Validations:

  • Must be an Array of nested elements

host[interfaces_attributes][mac]
选填 , 允许空值

接口的 MAC 地址。在裸机中管理的接口需要这个地址。

Validations:

  • Must be a String

host[interfaces_attributes][ip]
选填 , 允许空值

接口的 IPv4 地址

Validations:

  • Must be a String

host[interfaces_attributes][ip6]
选填 , 允许空值

接口的 IPv6 地址

Validations:

  • Must be a String

host[interfaces_attributes][type]
选填 , 允许空值

接口类型,例如:bmc。默认为 interface

Validations:

  • Must be one of: interface, bmc, bond, bridge.

host[interfaces_attributes][name]
选填 , 允许空值

接口 DNS 名称

Validations:

  • Must be a String

host[interfaces_attributes][subnet_id]
选填 , 允许空值

IPv4 接口的 Foreman 子网 ID

Validations:

  • Must be a number.

host[interfaces_attributes][subnet6_id]
选填 , 允许空值

IPv6 接口的 Foreman 子网 ID

Validations:

  • Must be a number.

host[interfaces_attributes][domain_id]
选填 , 允许空值

接口的 Foreman 域 ID。所管理主机中的主接口需要这个选项。

Validations:

  • Must be a number.

host[interfaces_attributes][identifier]
选填 , 允许空值

设备标识符,例如:eth0 或者 eth1.1。

Validations:

  • Must be a String

host[interfaces_attributes][managed]
选填 , 允许空值

这个接口应由 DHCP 管理还是由 DNS 智能代理服务器管理?是否应在预配过程中对其进行配置?

Validations:

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

host[interfaces_attributes][primary]
选填 , 允许空值

是否应该使用这个接口构建该主机的 FQDN?每台管理的主机都需要有一个主接口。

Validations:

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

host[interfaces_attributes][provision]
选填 , 允许空值

这个接口是否应该用于 PXELinux 的 TFTP(或基于映象主机的 SSH)?每台管理的主机需要有一个预配接口。

Validations:

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

host[interfaces_attributes][username]
选填 , 允许空值

仅用于 BMC 接口

Validations:

  • Must be a String

host[interfaces_attributes][password]
选填 , 允许空值

仅用于 BMC 接口

Validations:

  • Must be a String

host[interfaces_attributes][provider]
选填 , 允许空值

接口提供者,例如 IPMI。仅用于 BMC 接口。

Validations:

  • Must be one of: IPMI, SSH.

host[interfaces_attributes][virtual]
选填 , 允许空值

别名或 VLAN 失败

Validations:

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

host[interfaces_attributes][tag]
选填 , 允许空值

VLAN 标签,这个属性优先于子网 VLAN ID。仅用于虚拟接口。

Validations:

  • Must be a String

host[interfaces_attributes][mtu]
选填 , 允许空值

MTU,这个属性优先于子网 MTU。

Validations:

  • Must be a Integer

host[interfaces_attributes][attached_to]
选填 , 允许空值

这个接口所属接口识别符,例如:eth1。仅用于虚拟接口。

Validations:

  • Must be a String

host[interfaces_attributes][mode]
选填 , 允许空值

接口的捆绑模式,例如:balance-rr。仅用于捆绑接口。

Validations:

  • Must be one of: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb.

host[interfaces_attributes][attached_devices]
选填 , 允许空值

附加接口的识别符,例如:`['eth1', 'eth2']`。对于捆绑的接口,那些是从属接口。仅用于捆绑和桥接接口。

Validations:

  • Must be an array of any type

host[interfaces_attributes][bond_options]
选填 , 允许空值

使用空格分隔的选项,例如:miimon=100。仅用于捆绑接口。

Validations:

  • Must be a String

host[interfaces_attributes][compute_attributes]
选填 , 允许空值

该接口的附加计算资源具体属性。

Validations:

  • Must be a Hash

host[compute_attributes]
选填 , 允许空值

附加计算资源的具体属性。

Validations:

  • Must be a Hash


DELETE /api/hosts/:id
删除主机

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

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.


GET /api/hosts/:id/enc
获取主机的 ENC 值

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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


GET /api/hosts/:id/status/:type
获取主机状态

Returns string representing a host status of a given type

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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

type
必填

状态类型,可为以下之一

  • global

  • configuration

  • build

Validations:

  • Must be one of: HostStatus::Global, configuration, build.


DELETE /api/hosts/:id/status/:type
Clear sub-status of host

Clears a host sub-status of a given type

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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

type
必填

status type

Validations:

  • Must be one of: configuration, build.


GET /api/hosts/:id/vm_compute_attributes
获取主机 vm 属性

Return the host's compute attributes that can be used to create a clone of this VM

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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


PUT /api/hosts/:id/disassociate
取消该主机与 VM 的关联

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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


PUT /api/hosts/:id/power
在主机中运行电源操作

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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

power_action
必填

电源操作,有效操作为 (on/start), (off/stop), (soft/reboot), (cycle/reset), (state/status)。

Validations:

  • Must be a String


GET /api/hosts/:id/power
Fetch the status of whether the host is powered on or not. Supported hosts are VMs and physical hosts with BMCs.

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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


PUT /api/hosts/:id/boot
使用指定设备引导主机

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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

device
必填

引导设备,有效设备为磁盘、光盘、pxe、bios。

Validations:

  • Must be a String


POST /api/hosts/facts
上传主机的系统详情,如需要,请创建主机。

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

name
必填

主机的主机名

Validations:

  • Must be a String

facts
必填

包含主机详情的哈希

Validations:

  • Must be a Hash

certname
选填

自选:主机的证书名

Validations:

  • Must be a String

type
选填

自选:要创建主机的 STI 类型

Validations:

  • Must be a String


PUT /api/hosts/:id/rebuild_config
重建业务流程配置

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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

only
选填

限制重建步骤,有效步骤是 DHCP, DNS, TFTP

Validations:

  • Must be an array of any type


GET /api/hosts/:id/template/:kind
预览呈现的预配模板内容

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

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

kind
必填

模板类型,可用值:

Validations:

  • Must be a String