示例

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]
選填 , 允許空值

Array of parameters

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