Foreman considers a domain and a DNS zone as the same thing. That is, if you are planning to manage a site where all the machines are of the form hostname.somewhere.com then the domain is somewhere.com. This allows Foreman to associate a puppet variable with a domain/site and automatically append this variable to all external node requests made by machines at that site.


GET /api/domains
域列表

GET /api/subnets/:subnet_id/domains
每个子网的域列表

GET /api/locations/:location_id/domains
每个位置的域列表

GET /api/organizations/:organization_id/domains
每个机构的域列表

参数

参数名字 描述
subnet_id
选填

子网 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


GET /api/domains/:id
显示域

参数

参数名字 描述
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/domains
创建域

The fullname field is used for human readability in reports and other pages that refer to domains, and also available as an external node parameter

参数

参数名字 描述
domain
必填

Validations:

  • Must be a Hash

domain[name]
必填

完整 DNS 域名

Validations:

  • Must be a String

domain[fullname]
选填 , 允许空值

域描述

Validations:

  • Must be a String

domain[dns_id]
选填 , 允许空值

要在此域中使用的 DNS 代理 ID

Validations:

  • Must be a number.

domain[domain_parameters_attributes]
选填 , 允许空值

参数阵列(name,value)

Validations:

  • Must be an array of any type

domain[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

domain[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type


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

domain
必填

Validations:

  • Must be a Hash

domain[name]
选填

完整 DNS 域名

Validations:

  • Must be a String

domain[fullname]
选填 , 允许空值

域描述

Validations:

  • Must be a String

domain[dns_id]
选填 , 允许空值

要在此域中使用的 DNS 代理 ID

Validations:

  • Must be a number.

domain[domain_parameters_attributes]
选填 , 允许空值

参数阵列(name,value)

Validations:

  • Must be an array of any type

domain[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

domain[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type


DELETE /api/domains/: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.