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

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

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
显示一个发现主机

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

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.


POST /api/v2/discovered_hosts
创建一个用于测试的发现主机(使用 /详情创建新主机)

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

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 文件名选项(默认为 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.


PUT /api/v2/discovered_hosts/:id
置备发现主机

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

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.

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 文件名选项(默认为 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.


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

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

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.


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

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

facts
必填

hash 包含具备最小详情集合的主机的详情:discovery_bootif、macaddress_eth0、ipaddress、ipaddress_eth0、interfaces: eth0(主接口名为 eth0 的示例)

Validations:

  • Must be a Hash


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

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

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.


POST /api/v2/discovered_hosts/auto_provision_all
对当前所有发现主机执行规则

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer


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

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

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.


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

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

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.


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

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer