Esempi

PUT /api/smart_class_parameters/1018350795
{
  "smart_class_parameter": {
    "override": true,
    "parameter_type": "array",
    "default_value": "[aPtzKwuMSk, neBPGzsIqu]",
    "merge_overrides": true,
    "merge_default": true
  }
}
200
{
  "description": null,
  "override": true,
  "parameter_type": "array",
  "hidden_value?": false,
  "omit": null,
  "required": false,
  "validator_type": null,
  "validator_rule": null,
  "merge_overrides": true,
  "merge_default": true,
  "avoid_duplicates": false,
  "override_value_order": "fqdn\norganization,location\nhostgroup",
  "created_at": "2019-09-11 14:57:07 UTC",
  "updated_at": "2019-09-11 14:57:47 UTC",
  "use_puppet_default": null,
  "parameter": "custom_class_param",
  "id": 1018350795,
  "puppetclass_id": 298486374,
  "override_values_count": 0,
  "default_value": [
    "aPtzKwuMSk",
    "neBPGzsIqu"
  ],
  "puppetclass_name": "apache",
  "environments": [
    {
      "id": 334344675,
      "name": "production"
    }
  ],
  "puppetclass": {
    "id": 298486374,
    "name": "apache",
    "module_name": "apache"
  },
  "override_values": []
}

Parametri

Nome parametro Descrizione
location_id
opzionale

Scopo per posizioni

Validations:

  • Must be a Integer

organization_id
opzionale

Scopo per organizzazioni

Validations:

  • Must be a Integer

id
richiesto

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

smart_class_parameter
richiesto

Validations:

  • Must be a Hash

smart_class_parameter[override]
opzionale

Whether the smart class parameter value is managed by Foreman

Validations:

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

smart_class_parameter[description]
opzionale

Description of smart class

Validations:

  • Must be a String

smart_class_parameter[default_value]
opzionale

Valore da usare quando non è presente alcuna corrispondenza

Validations:

  • Must be one of types: string, boolean, integer, real, array, hash, yaml, json

smart_class_parameter[hidden_value]
opzionale

When enabled the parameter is hidden in the UI

Validations:

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

smart_class_parameter[use_puppet_default]
opzionale

Deprecated, please use omit

Validations:

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

smart_class_parameter[omit]
opzionale

Foreman will not send this parameter in classification output. Puppet will use the value defined in the Puppet manifest for this parameter

Validations:

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

smart_class_parameter[path]
opzionale

L’ordine attraverso il quale vengono risolti i valori

Validations:

  • Must be a String

smart_class_parameter[validator_type]
opzionale

Types of validation values

Validations:

  • Must be one of: regexp, list.

smart_class_parameter[validator_rule]
opzionale

Used to enforce certain values for the parameter values

Validations:

  • Must be a String

smart_class_parameter[override_value_order]
opzionale

L’ordine attraverso il quale vengono risolti i valori

Validations:

  • Must be a String

smart_class_parameter[parameter_type]
opzionale

Types of variable values

Validations:

  • Must be one of: string, boolean, integer, real, array, hash, yaml, json.

smart_class_parameter[required]
opzionale

If true, will raise an error if there is no default value and no matcher provide a value

Validations:

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

smart_class_parameter[merge_overrides]
opzionale

Merge all matching values (only array/hash type)

Validations:

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

smart_class_parameter[merge_default]
opzionale

Include default value when merging all matching values

Validations:

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

smart_class_parameter[avoid_duplicates]
opzionale

Remove duplicate values (only array type)

Validations:

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