Exemples

PUT /api/operatingsystems/1073012828-RHEL%206-1
{
  "operatingsystem": {},
  "architectures": [
    {
      "name": "x86_64"
    },
    {
      "name": "sparc"
    }
  ]
}
200
{
  "description": "RHEL 6.1",
  "major": "6",
  "minor": "1",
  "family": "Redhat",
  "release_name": null,
  "password_hash": "SHA256",
  "created_at": "2019-09-11 14:55:21 UTC",
  "updated_at": "2019-09-11 14:55:21 UTC",
  "id": 1073012828,
  "name": "Redhat",
  "title": "RHEL 6.1",
  "media": [
    {
      "id": 980190962,
      "name": "CentOS 5.4"
    }
  ],
  "architectures": [
    {
      "name": "x86_64",
      "id": 501905019
    },
    {
      "name": "sparc",
      "id": 331892513
    }
  ],
  "ptables": [],
  "config_templates": [
    {
      "id": 1007981701,
      "name": "centos5_3_pxelinux",
      "template_kind_id": 452984334,
      "template_kind_name": "PXELinux"
    },
    {
      "id": 104314179,
      "name": "MyFinish",
      "template_kind_id": 550103832,
      "template_kind_name": "finish"
    },
    {
      "id": 981457253,
      "name": "MyScript",
      "template_kind_id": 478250810,
      "template_kind_name": "script"
    },
    {
      "id": 943779058,
      "name": "MyString",
      "template_kind_id": 698706415,
      "template_kind_name": "iPXE"
    },
    {
      "id": 269958254,
      "name": "MyString2",
      "template_kind_id": 983253650,
      "template_kind_name": "provision"
    },
    {
      "id": 554905648,
      "name": "PXEGrub2 global default",
      "template_kind_id": 701398793,
      "template_kind_name": "PXEGrub2"
    },
    {
      "id": 131565194,
      "name": "PXEGrub Dummy Menu",
      "template_kind_id": 131565194,
      "template_kind_name": "PXEGrub"
    },
    {
      "id": 824224502,
      "name": "PXEGrub global default",
      "template_kind_id": 131565194,
      "template_kind_name": "PXEGrub"
    },
    {
      "id": 821548108,
      "name": "PXELinux default local boot",
      "template_kind_id": 452984334,
      "template_kind_name": "PXELinux"
    },
    {
      "id": 352050261,
      "name": "PXELinux global default",
      "template_kind_id": 452984334,
      "template_kind_name": "PXELinux"
    }
  ],
  "provisioning_templates": [
    {
      "id": 1007981701,
      "name": "centos5_3_pxelinux",
      "template_kind_id": 452984334,
      "template_kind_name": "PXELinux"
    },
    {
      "id": 104314179,
      "name": "MyFinish",
      "template_kind_id": 550103832,
      "template_kind_name": "finish"
    },
    {
      "id": 981457253,
      "name": "MyScript",
      "template_kind_id": 478250810,
      "template_kind_name": "script"
    },
    {
      "id": 943779058,
      "name": "MyString",
      "template_kind_id": 698706415,
      "template_kind_name": "iPXE"
    },
    {
      "id": 269958254,
      "name": "MyString2",
      "template_kind_id": 983253650,
      "template_kind_name": "provision"
    },
    {
      "id": 554905648,
      "name": "PXEGrub2 global default",
      "template_kind_id": 701398793,
      "template_kind_name": "PXEGrub2"
    },
    {
      "id": 131565194,
      "name": "PXEGrub Dummy Menu",
      "template_kind_id": 131565194,
      "template_kind_name": "PXEGrub"
    },
    {
      "id": 824224502,
      "name": "PXEGrub global default",
      "template_kind_id": 131565194,
      "template_kind_name": "PXEGrub"
    },
    {
      "id": 821548108,
      "name": "PXELinux default local boot",
      "template_kind_id": 452984334,
      "template_kind_name": "PXELinux"
    },
    {
      "id": 352050261,
      "name": "PXELinux global default",
      "template_kind_id": 452984334,
      "template_kind_name": "PXELinux"
    }
  ],
  "os_default_templates": [
    {
      "id": 980190962,
      "provisioning_template_id": 943779058,
      "provisioning_template_name": "MyString",
      "template_kind_id": 698706415,
      "template_kind_name": "iPXE",
      "operatingsystem_id": 1073012828,
      "operatingsystem_name": "RHEL 6.1",
      "config_template_id": 943779058,
      "config_template_name": "MyString"
    },
    {
      "id": 298486374,
      "provisioning_template_id": 269958254,
      "provisioning_template_name": "MyString2",
      "template_kind_id": 983253650,
      "template_kind_name": "provision",
      "operatingsystem_id": 1073012828,
      "operatingsystem_name": "RHEL 6.1",
      "config_template_id": 269958254,
      "config_template_name": "MyString2"
    },
    {
      "id": 113629430,
      "provisioning_template_id": 981457253,
      "provisioning_template_name": "MyScript",
      "template_kind_id": 478250810,
      "template_kind_name": "script",
      "operatingsystem_id": 1073012828,
      "operatingsystem_name": "RHEL 6.1",
      "config_template_id": 981457253,
      "config_template_name": "MyScript"
    },
    {
      "id": 281110143,
      "provisioning_template_id": 1007981701,
      "provisioning_template_name": "centos5_3_pxelinux",
      "template_kind_id": 710512633,
      "template_kind_name": null,
      "operatingsystem_id": 1073012828,
      "operatingsystem_name": "RHEL 6.1",
      "config_template_id": 1007981701,
      "config_template_name": "centos5_3_pxelinux"
    },
    {
      "id": 1018350795,
      "provisioning_template_id": 131565194,
      "provisioning_template_name": "PXEGrub Dummy Menu",
      "template_kind_id": 131565194,
      "template_kind_name": "PXEGrub",
      "operatingsystem_id": 1073012828,
      "operatingsystem_name": "RHEL 6.1",
      "config_template_id": 131565194,
      "config_template_name": "PXEGrub Dummy Menu"
    },
    {
      "id": 51848956,
      "provisioning_template_id": 698706415,
      "provisioning_template_name": "iPXE Dummy Menu",
      "template_kind_id": 698706415,
      "template_kind_name": "iPXE",
      "operatingsystem_id": 1073012828,
      "operatingsystem_name": "RHEL 6.1",
      "config_template_id": 698706415,
      "config_template_name": "iPXE Dummy Menu"
    }
  ],
  "images": [],
  "parameters": [
    {
      "priority": null,
      "created_at": "2019-09-11 14:55:21 UTC",
      "updated_at": "2019-09-11 14:55:21 UTC",
      "id": 716195090,
      "name": "os1",
      "parameter_type": null,
      "value": "os1"
    }
  ]
}

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

id
requis

Validations:

  • Must be a String

operatingsystem
requis

Validations:

  • Must be a Hash

operatingsystem[name]
optionel

Validations:

  • Must match regular expression /\A(\S+)\Z/.

operatingsystem[major]
optionel

Validations:

  • Must be a String

operatingsystem[minor]
optionel , nil autorisé

Validations:

  • Must be a String

operatingsystem[description]
optionel , nil autorisé

Validations:

  • Must be a String

operatingsystem[family]
optionel , nil autorisé

Validations:

  • Must be a String

operatingsystem[release_name]
optionel , nil autorisé

Validations:

  • Must be a String

operatingsystem[os_parameters_attributes]
optionel , nil autorisé

Tableau des paramètres

Validations:

  • Must be an Array of nested elements

operatingsystem[os_parameters_attributes][name]
optionel

Nom du paramêtre

Validations:

  • Must be a String

operatingsystem[os_parameters_attributes][value]
optionel

Valeur du paramètre

Validations:

  • Must be a String

operatingsystem[password_hash]
optionel , nil autorisé

La fonction de hachage à utiliser pour le mot de passe root. Les fonctions possibles : MD5, SHA256, SHA512, Base64

Validations:

  • Must be a String

operatingsystem[architecture_ids]
optionel , nil autorisé

ID des architectures associées

Validations:

  • Must be an array of any type

operatingsystem[config_template_ids]
optionel , nil autorisé

ID des modèles de provisioning associés

Validations:

  • Must be an array of any type

operatingsystem[provisioning_template_ids]
optionel , nil autorisé

ID des modèles de provisioning associés

Validations:

  • Must be an array of any type

operatingsystem[medium_ids]
optionel , nil autorisé

ID des médias associés

Validations:

  • Must be an array of any type

operatingsystem[ptable_ids]
optionel , nil autorisé

ID des tables de partitions associées

Validations:

  • Must be an array of any type