示例

POST /api/ptables
{
  "ptable": {
    "name": "W",
    "layout": "d-i partman-auto/disk"
  }
}
201
{
  "layout": "d-i partman-auto/disk",
  "locked": false,
  "os_family": null,
  "created_at": "2019-09-11 14:34:42 UTC",
  "updated_at": "2019-09-11 14:34:42 UTC",
  "name": "W",
  "id": 1007981781,
  "operatingsystems": [],
  "locations": [],
  "organizations": []
}

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

ptable
必填

Validations:

  • Must be a Hash

ptable[name]
必填

Validations:

  • Must be a String

ptable[layout]
必填

Validations:

  • Must be a String

ptable[snippet]
选填 , 允许空值

Validations:

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

ptable[audit_comment]
选填 , 允许空值

Validations:

  • Must be a String

ptable[locked]
选填 , 允许空值

是否已锁定该模板进行编辑

Validations:

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

ptable[os_family]
选填 , 允许空值

Validations:

  • Must be a String

ptable[operatingsystem_ids]
选填 , 允许空值

与该分区表关联的操作系统 ID 阵列

Validations:

  • Must be an array of any type

ptable[host_ids]
选填 , 允许空值

与该分区表关联的主机 ID 阵列

Validations:

  • Must be an array of any type

ptable[hostgroup_ids]
选填 , 允许空值

与该分区表关联的主机组 ID 阵列

Validations:

  • Must be an array of any type

ptable[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

ptable[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type