示例

POST /api/operatingsystems
{
  "operatingsystem": {
    "name": "nIchybcxxO",
    "major": "1"
  }
}
201
{
  "description": null,
  "major": "1",
  "minor": "",
  "family": null,
  "release_name": null,
  "password_hash": "SHA256",
  "created_at": "2019-09-11 14:55:41 UTC",
  "updated_at": "2019-09-11 14:55:41 UTC",
  "id": 1073012837,
  "name": "nIchybcxxO",
  "title": "nIchybcxxO 1",
  "media": [],
  "architectures": [],
  "ptables": [],
  "config_templates": [],
  "provisioning_templates": [],
  "os_default_templates": [],
  "images": [],
  "parameters": []
}

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

operatingsystem
必填

Validations:

  • Must be a Hash

operatingsystem[name]
必填

Validations:

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

operatingsystem[major]
必填

Validations:

  • Must be a String

operatingsystem[minor]
选填 , 允许空值

Validations:

  • Must be a String

operatingsystem[description]
选填 , 允许空值

Validations:

  • Must be a String

operatingsystem[family]
选填 , 允许空值

Validations:

  • Must be a String

operatingsystem[release_name]
选填 , 允许空值

Validations:

  • Must be a String

operatingsystem[os_parameters_attributes]
选填 , 允许空值

参数阵列

Validations:

  • Must be an Array of nested elements

operatingsystem[os_parameters_attributes][name]
必填

参数名称

Validations:

  • Must be a String

operatingsystem[os_parameters_attributes][value]
必填

参数值

Validations:

  • Must be a String

operatingsystem[password_hash]
选填 , 允许空值

要使用的 root 密码哈希功能,应为 MD5、SHA256、SHA512 和 Base64 之一。

Validations:

  • Must be a String

operatingsystem[architecture_ids]
选填 , 允许空值

关联架构的 ID

Validations:

  • Must be an array of any type

operatingsystem[config_template_ids]
选填 , 允许空值

关联预配模板的 ID

Validations:

  • Must be an array of any type

operatingsystem[provisioning_template_ids]
选填 , 允许空值

关联预配模板的 ID

Validations:

  • Must be an array of any type

operatingsystem[medium_ids]
选填 , 允许空值

关联介质的 ID

Validations:

  • Must be an array of any type

operatingsystem[ptable_ids]
选填 , 允许空值

关联分区表的 ID

Validations:

  • Must be an array of any type