Ejemplos

POST /api/hostgroups
{
  "hostgroup": {
    "name": "TestHostgroup"
  }
}
201
{
  "subnet_id": null,
  "subnet_name": null,
  "operatingsystem_id": null,
  "operatingsystem_name": null,
  "domain_id": null,
  "domain_name": null,
  "environment_id": null,
  "environment_name": null,
  "compute_profile_id": null,
  "compute_profile_name": null,
  "ancestry": null,
  "parent_id": null,
  "parent_name": null,
  "ptable_id": null,
  "ptable_name": null,
  "medium_id": null,
  "medium_name": null,
  "pxe_loader": null,
  "subnet6_id": null,
  "subnet6_name": null,
  "compute_resource_id": null,
  "compute_resource_name": null,
  "architecture_id": null,
  "architecture_name": null,
  "realm_id": null,
  "realm_name": null,
  "created_at": "2019-09-11 14:32:24 UTC",
  "updated_at": "2019-09-11 14:32:24 UTC",
  "id": 928644288,
  "name": "TestHostgroup",
  "title": "TestHostgroup",
  "description": null,
  "puppet_proxy_id": null,
  "puppet_proxy_name": null,
  "puppet_ca_proxy_id": null,
  "puppet_ca_proxy_name": null,
  "puppet_proxy": null,
  "puppet_ca_proxy": null,
  "parameters": [],
  "template_combinations": [],
  "puppetclasses": [],
  "config_groups": [],
  "all_puppetclasses": [],
  "locations": [],
  "organizations": []
}

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

hostgroup
requerido

Validations:

  • Must be a Hash

hostgroup[name]
requerido

Nombre del grupo de hosts

Validations:

  • Must be a String

hostgroup[description]
opcional , nil permitido

Descripción del grupo de hosts

Validations:

  • Must be a String

hostgroup[parent_id]
opcional , nil permitido

ID padre del grupo de hosts

Validations:

  • Must be a number.

hostgroup[environment_id]
opcional , nil permitido

ID de entorno

Validations:

  • Must be a number.

hostgroup[compute_profile_id]
opcional , nil permitido

ID del perfil de computación

Validations:

  • Must be a number.

hostgroup[compute_resource_id]
opcional , nil permitido

ID de recurso de cómputo

Validations:

  • Must be a number.

hostgroup[operatingsystem_id]
opcional , nil permitido

ID del sistema operativo

Validations:

  • Must be a number.

hostgroup[architecture_id]
opcional , nil permitido

ID de arquitectura

Validations:

  • Must be a number.

hostgroup[pxe_loader]
opcional , nil permitido

Opción de nombre de archivo DHCP (Grub2/PXELinux por defecto)

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.

hostgroup[medium_id]
opcional , nil permitido

ID de medios

Validations:

  • Must be a number.

hostgroup[ptable_id]
opcional , nil permitido

ID de la tabla de particiones

Validations:

  • Must be a number.

hostgroup[subnet_id]
opcional , nil permitido

ID de subred

Validations:

  • Must be a number.

hostgroup[subnet6_id]
opcional , nil permitido

Subnet IPv6 ID

Validations:

  • Must be a number.

hostgroup[domain_id]
opcional , nil permitido

ID de dominio

Validations:

  • Must be a number.

hostgroup[realm_id]
opcional , nil permitido

ID de reino

Validations:

  • Must be a number.

hostgroup[config_group_ids]
opcional , nil permitido

ID de grupos de configuración asociados

Validations:

  • Must be an array of any type

hostgroup[group_parameters_attributes]
opcional , nil permitido

Conjunto de parámetros

Validations:

  • Must be an Array of nested elements

hostgroup[group_parameters_attributes][name]
requerido

Nombre del parámetro

Validations:

  • Must be a String

hostgroup[group_parameters_attributes][value]
requerido

Valor del parámetro

Validations:

  • Must be a String

hostgroup[puppet_proxy_id]
opcional , nil permitido

ID del Proxy Puppet

Validations:

  • Must be a number.

hostgroup[puppet_ca_proxy_id]
opcional , nil permitido

ID del Proxy Puppet CA

Validations:

  • Must be a number.

hostgroup[root_pass]
opcional , nil permitido

Contraseña raíz en hosts aprovisionados

Validations:

  • Must be a String

hostgroup[location_ids]
opcional , nil permitido

REMPLAZAR ubicaciones con ID dadas

Validations:

  • Must be an array of any type

hostgroup[organization_ids]
opcional , nil permitido

REMPLAZAR organizaciones con ID dadas.

Validations:

  • Must be an array of any type