GET /api/hostgroups
列出所有主机组

GET /api/puppetclasses/:puppetclass_id/hostgroups
列出 Puppet 类别的所有主机组

GET /api/locations/:location_id/hostgroups
列出每个位置的所有主机组

GET /api/organizations/:organization_id/hostgroups
列出每个机构的所有主机组

参数

参数名字 描述
puppetclass_id
选填

Puppet 类别 ID

Validations:

  • Must be a String

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

include
选填

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

Validations:

  • Must be an array of [“parameters”]


GET /api/hostgroups/: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.

show_hidden_parameters
选填

Display hidden parameter values

Validations:

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


POST /api/hostgroups
创建主机组

参数

参数名字 描述
hostgroup
必填

Validations:

  • Must be a Hash

hostgroup[name]
必填

主机组名称

Validations:

  • Must be a String

hostgroup[description]
选填 , 允许空值

Host group description

Validations:

  • Must be a String

hostgroup[parent_id]
选填 , 允许空值

主机组父 ID

Validations:

  • Must be a number.

hostgroup[environment_id]
选填 , 允许空值

环境 ID

Validations:

  • Must be a number.

hostgroup[compute_profile_id]
选填 , 允许空值

计算配置文件 ID

Validations:

  • Must be a number.

hostgroup[operatingsystem_id]
选填 , 允许空值

操作系统 ID

Validations:

  • Must be a number.

hostgroup[architecture_id]
选填 , 允许空值

架构 ID

Validations:

  • Must be a number.

hostgroup[pxe_loader]
选填 , 允许空值

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

Validations:

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

hostgroup[medium_id]
选填 , 允许空值

介质 ID

Validations:

  • Must be a number.

hostgroup[ptable_id]
选填 , 允许空值

分区表 ID

Validations:

  • Must be a number.

hostgroup[subnet_id]
选填 , 允许空值

子网 ID

Validations:

  • Must be a number.

hostgroup[domain_id]
选填 , 允许空值

域 ID

Validations:

  • Must be a number.

hostgroup[realm_id]
选填 , 允许空值

范围 ID

Validations:

  • Must be a number.

hostgroup[config_group_ids]
选填 , 允许空值

IDs of associated config groups

Validations:

  • Must be an array of any type

hostgroup[group_parameters_attributes]
选填 , 允许空值

Array of parameters

Validations:

  • Must be an Array of nested elements

hostgroup[group_parameters_attributes][name]
必填

参数名称

Validations:

  • Must be a String

hostgroup[group_parameters_attributes][value]
必填

参数值

Validations:

  • Must be a String

hostgroup[puppet_proxy_id]
选填 , 允许空值

Puppet 代理服务器 ID

Validations:

  • Must be a number.

hostgroup[puppet_ca_proxy_id]
选填 , 允许空值

Puppet CA 代理服务器 ID

Validations:

  • Must be a number.

hostgroup[root_pass]
选填 , 允许空值

预配主机中的 root 密码

Validations:

  • Must be a String

hostgroup[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

hostgroup[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type


PUT /api/hostgroups/: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.

hostgroup
必填

Validations:

  • Must be a Hash

hostgroup[name]
选填

主机组名称

Validations:

  • Must be a String

hostgroup[description]
选填 , 允许空值

Host group description

Validations:

  • Must be a String

hostgroup[parent_id]
选填 , 允许空值

主机组父 ID

Validations:

  • Must be a number.

hostgroup[environment_id]
选填 , 允许空值

环境 ID

Validations:

  • Must be a number.

hostgroup[compute_profile_id]
选填 , 允许空值

计算配置文件 ID

Validations:

  • Must be a number.

hostgroup[operatingsystem_id]
选填 , 允许空值

操作系统 ID

Validations:

  • Must be a number.

hostgroup[architecture_id]
选填 , 允许空值

架构 ID

Validations:

  • Must be a number.

hostgroup[pxe_loader]
选填 , 允许空值

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

Validations:

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

hostgroup[medium_id]
选填 , 允许空值

介质 ID

Validations:

  • Must be a number.

hostgroup[ptable_id]
选填 , 允许空值

分区表 ID

Validations:

  • Must be a number.

hostgroup[subnet_id]
选填 , 允许空值

子网 ID

Validations:

  • Must be a number.

hostgroup[domain_id]
选填 , 允许空值

域 ID

Validations:

  • Must be a number.

hostgroup[realm_id]
选填 , 允许空值

范围 ID

Validations:

  • Must be a number.

hostgroup[config_group_ids]
选填 , 允许空值

IDs of associated config groups

Validations:

  • Must be an array of any type

hostgroup[group_parameters_attributes]
选填 , 允许空值

Array of parameters

Validations:

  • Must be an Array of nested elements

hostgroup[group_parameters_attributes][name]
选填

参数名称

Validations:

  • Must be a String

hostgroup[group_parameters_attributes][value]
选填

参数值

Validations:

  • Must be a String

hostgroup[puppet_proxy_id]
选填 , 允许空值

Puppet 代理服务器 ID

Validations:

  • Must be a number.

hostgroup[puppet_ca_proxy_id]
选填 , 允许空值

Puppet CA 代理服务器 ID

Validations:

  • Must be a number.

hostgroup[root_pass]
选填 , 允许空值

预配主机中的 root 密码

Validations:

  • Must be a String

hostgroup[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

hostgroup[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type


DELETE /api/hostgroups/: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/hostgroups/:id/clone
克隆主机组

参数

参数名字 描述
name
必填

Validations:

  • Must be a String


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

参数

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

only
选填

Limit rebuild steps, valid steps are DHCP, DNS, TFTP

Validations:

  • Must be an array of any type

children_hosts
选填

Operate on child hostgroup hosts

Validations:

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