GET /api/v2/discovered_hosts
List all 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
Show a discovered host

參數

參數名字 描述
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
Create a discovered host for testing (use /facts to create new 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 filename option (Grub2 or PXELinux by default)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, 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
Provision a discovered host

參數

參數名字 描述
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]
選填 , 允許空值

not required if it's a virtual machine

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]
選填 , 允許空值

required if value is not inherited from host group or default password in settings

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, 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
Delete a discovered host

參數

參數名字 描述
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 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)

Validations:

  • Must be a Hash


POST /api/v2/discovered_hosts/:id/auto_provision
Execute rules against a discovered host

參數

參數名字 描述
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
Execute rules against all currently discovered hosts

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer


PUT /api/v2/discovered_hosts/:id/refresh_facts
Refreshing the facts of a discovered host

參數

參數名字 描述
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
Rebooting a discovered host

參數

參數名字 描述
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
Rebooting all discovered hosts

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer