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

参数

参数名字 描述
search
选填

过滤结果

Validations:

  • Must be a String

order
选填

结果排序

Validations:

  • Must be a String

page
选填

编页结果

Validations:

  • Must be a String

per_page
选填

每个请求中的条目数

Validations:

  • Must be a String


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

参数

参数名字 描述
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.


POST /api/v2/discovered_hosts
创建发现的主机以进行测试(使用 /facts 创建新主机)

参数

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

Validations:

  • Must be a Hash

discovered_host[name]
必填

Validations:

  • Must be a String

discovered_host[ip]
必填

Validations:

  • Must be a String

discovered_host[mac]
必填

Validations:

  • Must be a String

discovered_host[pxe_loader]
选填 , 允许空值

DHCP filename option (Grub2 or PXELinux by default)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub UEFI SecureBoot, Grub2 UEFI, Grub2 UEFI SecureBoot.


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

参数

参数名字 描述
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.

discovered_host
选填 , 允许空值

Validations:

  • Must be a Hash

discovered_host[name]
选填 , 允许空值

Validations:

  • Must be a String

discovered_host[environment_id]
选填 , 允许空值

Validations:

  • Must be a String

discovered_host[ip]
选填 , 允许空值

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

Validations:

  • Must be a String

discovered_host[mac]
选填 , 允许空值

虚拟机不需要

Validations:

  • Must be a String

discovered_host[architecture_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[domain_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[puppet_proxy_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[puppet_class_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

discovered_host[operatingsystem_id]
选填 , 允许空值

Validations:

  • Must be a String

discovered_host[medium_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[ptable_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[subnet_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[sp_subnet_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[model_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[hostgroup_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[owner_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[puppet_ca_proxy_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[image_id]
选填 , 允许空值

Validations:

  • Must be a number.

discovered_host[host_parameters_attributes]
选填 , 允许空值

Validations:

  • Must be an array of any type

discovered_host[build]
选填 , 允许空值

Validations:

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

discovered_host[enabled]
选填 , 允许空值

Validations:

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

discovered_host[provision_method]
选填 , 允许空值

Validations:

  • Must be a String

discovered_host[managed]
选填 , 允许空值

Validations:

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

discovered_host[progress_report_id]
选填 , 允许空值

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

Validations:

  • Must be a String

discovered_host[capabilities]
选填 , 允许空值

Validations:

  • Must be a String

discovered_host[root_pass]
选填 , 允许空值

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

Validations:

  • Must be a String

discovered_host[pxe_loader]
选填 , 允许空值

DHCP filename option (Grub2 or PXELinux by default)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub UEFI SecureBoot, Grub2 UEFI, Grub2 UEFI SecureBoot.


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

参数

参数名字 描述
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/v2/discovered_hosts/facts
上传主机的系统详情,如需要,请创建主机。

参数

参数名字 描述
facts
必填

包含使用最小信息系统集主机的信息系统哈希:discovery_bootif、macaddress_eth0、ipaddress, ipaddress_eth0、interfaces: eth0(例如:主接口名称为 eth0)

Validations:

  • Must be a Hash


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

参数

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


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

参数

参数名字 描述
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.


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

参数

参数名字 描述
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.


PUT /api/v2/discovered_hosts/reboot_all
重启已发现主机