diff options
author | Dmitry Tantsur <divius.inside@gmail.com> | 2019-02-25 11:24:53 +0100 |
---|---|---|
committer | Dmitry Tantsur <divius.inside@gmail.com> | 2019-03-05 19:14:56 +0100 |
commit | 3e1e0c9d5e6e5753d0fe2529901986ea36934971 (patch) | |
tree | 0dfd46645b8ca7e81bf6b37ed3262da43f2cc14d /api-ref | |
parent | ec2f7f992e1cca141df26441bdbf9cd9c682541c (diff) | |
download | ironic-3e1e0c9d5e6e5753d0fe2529901986ea36934971.tar.gz |
Allow building configdrive from JSON in the API
Extend the API with the ability to build config drives from meta_data,
network_data and user_data, where meta_data and network_data are JSON
objects, and user_data is either a JSON object, a JSON array or
raw contents as a string.
This change uses openstacksdk (which is already an indirect dependency)
for building config drives.
Change-Id: Ie1f399a4cb6d4fe5afec79341d3bccc0f81204b2
Story: #2005083
Task: #29663
Diffstat (limited to 'api-ref')
-rw-r--r-- | api-ref/source/baremetal-api-v1-node-management.inc | 4 | ||||
-rw-r--r-- | api-ref/source/parameters.yaml | 16 |
2 files changed, 16 insertions, 4 deletions
diff --git a/api-ref/source/baremetal-api-v1-node-management.inc b/api-ref/source/baremetal-api-v1-node-management.inc index fd6f15059..4cc58ce05 100644 --- a/api-ref/source/baremetal-api-v1-node-management.inc +++ b/api-ref/source/baremetal-api-v1-node-management.inc @@ -352,6 +352,10 @@ detailed documentation of the Ironic State Machine is available A node can be rescued or unrescued by setting the node's provision target state to ``rescue`` or ``unrescue`` respectively. +.. versionadded:: 1.56 + A ``configdrive`` can be a JSON object with ``meta_data``, ``network_data`` + and ``user_data``. + Normal response code: 202 Error codes: diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 0e0c1eb08..c562a14aa 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -545,12 +545,20 @@ conductor_group: type: string configdrive: description: | - A gzip'ed and base-64 encoded config drive, to be written to a partition - on the Node's boot disk. This parameter is only accepted when setting the - state to "active" or "rebuild". + A config drive to be written to a partition on the Node's boot disk. Can be + a full gzip'ed and base-64 encoded image or a JSON object with the keys: + + * ``meta_data`` (optional) - JSON object with the standard meta data. + Ironic will provide the defaults for the ``uuid`` and ``name`` fields. + * ``network_data`` (optional) - JSON object with networking configuration. + * ``user_data`` (optional) - user data. May be a string (which will be + UTF-8 encoded); a JSON object, or a JSON array. + + This parameter is only accepted when setting the state to "active" or + "rebuild". in: body required: false - type: string or gzip+b64 blob + type: string or object console_enabled: description: | Indicates whether console access is enabled or disabled on this node. |