GET /api/v2/discovered_hosts
列出所有发现的主机

参数

参数名字 描述
search
选填

过滤结果


Value:

Must be String

order
选填

结果排序


Value:

Must be String

page
选填

页数


Value:

Must be String

per_page
选填

每个请求中的条目数


Value:

Must be String


GET /api/v2/discovered_hosts/:id
显示已发现主机

参数

参数名字 描述
id
必填

Value:

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


POST /api/v2/discovered_hosts
Create a discovered host for testing (use /facts to create new hosts)

参数

参数名字 描述
discovered_host
选填 , 允许空值

Value:

Must be a Hash

discovered_host[name]
必填

Value:

Must be String

discovered_host[ip]
必填

Value:

Must be String

discovered_host[mac]
必填

Value:

Must be String


PUT /api/v2/discovered_hosts/:id
供应已发现主机

参数

参数名字 描述
id
必填

Value:

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

discovered_host
选填 , 允许空值

Value:

Must be a Hash

discovered_host[name]
选填 , 允许空值

Value:

Must be String

discovered_host[environment_id]
选填 , 允许空值

Value:

Must be String

discovered_host[ip]
选填 , 允许空值

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


Value:

Must be String

discovered_host[mac]
选填 , 允许空值

虚拟机不需要


Value:

Must be String

discovered_host[architecture_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[domain_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[puppet_proxy_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[puppet_class_ids]
选填 , 允许空值

Value:

Must be an array of any type

discovered_host[operatingsystem_id]
选填 , 允许空值

Value:

Must be String

discovered_host[medium_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[ptable_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[subnet_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[sp_subnet_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[model_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[hostgroup_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[owner_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[puppet_ca_proxy_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[image_id]
选填 , 允许空值

Value:

Must be a number.

discovered_host[host_parameters_attributes]
选填 , 允许空值

Value:

Must be an array of any type

discovered_host[build]
选填 , 允许空值

Value:

Must be 'true' or 'false'

discovered_host[enabled]
选填 , 允许空值

Value:

Must be 'true' or 'false'

discovered_host[provision_method]
选填 , 允许空值

Value:

Must be String

discovered_host[managed]
选填 , 允许空值

Value:

Must be 'true' or 'false'

discovered_host[progress_report_id]
选填 , 允许空值

用来跟踪复杂任务状态的 UUID,GET /api/orchestration/:UUID/tasks


Value:

Must be String

discovered_host[capabilities]
选填 , 允许空值

Value:

Must be String

discovered_host[root_pass]
选填 , 允许空值

如果不是从主机组中集成或使用设置中的默认密码则需要


Value:

Must be String


DELETE /api/v2/discovered_hosts/:id
删除已发现主机

参数

参数名字 描述
id
必填

Value:

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/v2/discovered_hosts/facts
上传主机详情,如需要,请创建主机。

参数

参数名字 描述
facts
必填

hash containing facts for the host with minimum set of facts: discovery_bootif, macaddress_eth0, ipaddress, ipaddress_eth0, interfaces: eth0 (example in case primary interface is named eth0)


Value:

Must be Hash


POST /api/v2/discovered_hosts/:id/auto_provision
根据发现的主机执行规则

参数

参数名字 描述
id
必填

Value:

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/v2/discovered_hosts/auto_provision_all
根据所有目前已发现主机执行规则


PUT /api/v2/discovered_hosts/:id/refresh_facts
刷新已发现主机的详情

参数

参数名字 描述
id
必填

Value:

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


PUT /api/v2/discovered_hosts/:id/reboot
重启已发现主机

参数

参数名字 描述
id
必填

Value:

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


PUT /api/v2/discovered_hosts/reboot_all
Rebooting all discovered hosts