[API] add boot source API specification
@@ -38,6 +38,48 @@ paths:
description: Unexpected error.
schema:
$ref: '#/definitions/Error'
+ /boot/source:
+ get:
+ summary: "Get configured boot source."
+ operationId: "getGuestBootSource"
+ responses:
+ 200:
+ description: Specified boot source.
+ schema:
+ $ref: "#/definitions/BootSource"
+ 404:
+ description: Boot source does not exist.
+ schema:
+ $ref: '#/definitions/Error'
+ default:
+ description: Internal server error.
+ schema:
+ $ref: '#/definitions/Error'
+ put:
+ summary: "Creates new boot source. If boot source already exists,
+ updates its state based on new input. May fail if update is not possible."
+ operationId: "putGuestBootSource"
+ parameters:
+ - name: "body"
+ in: body
+ description: "Guest boot source properties"
+ required: true
+ schema:
+ $ref: "#/definitions/BootSource"
+ responses:
+ 201:
+ description: Boot source created.
+ 204:
+ description: Boot source updated.
+ 400:
+ description: Boot source cannot be created due to bad input.
+ schema:
+ $ref: '#/definitions/Error'
+ default:
+ description: Internal server error.
+ schema:
+ $ref: '#/definitions/Error'
+
/metadata:
get:
summary: Return metadata about an instance.
@@ -119,6 +161,65 @@ definitions:
node_info:
$ref: '#/definitions/NodeInfo'
+ BootSource:
+ type: object
+ description: |
+ Boot source descriptor. 'source_type' will specify the boot source type and depending
+ on its value: one and only one of 'local_image', 'drive_boot' or 'network_boot' should
+ describe the boot resource in detail.
+ properties:
+ boot_source_id:
+ type: string
+ description: "unique identifier for this boot source"
+ source_type:
+ type: string
+ description: "type of boot source"
+ enum:
+ - "LocalImage"
+ - "DriveBoot"
+ - "NetworkBoot"
+ local_image:
+ $ref: '#/definitions/LocalImage'
+ drive_boot:
+ $ref: '#/definitions/DriveBoot'
+ network_boot:
+ $ref: '#/definitions/NetworkBoot'
+ boot_args:
+ type: string
+ description: "kernel boot arguments"
+ LocalImage:
+ type: object
+ description: |
+ Locations for local kernel image and initrd files. Empty path(s) means not used.
+ properties:
+ kernel_image_path:
+ type: string
+ description: "host level path to the kernel image used to boot the guest"
+ initrd_path:
+ type: string
+ description: "host level path to initrd used to boot the guest"
+ DriveBoot:
+ type: object
+ description: Drive to use as boot source.
+ properties:
+ drive_id:
+ type: string
+ description: "unique identifier specifying which drive to boot from"
+ NetworkBoot:
+ type: object
+ description: Network to use as boot source.
+ properties:
+ iface_id:
+ type: string
+ description: "unique identifier specifying which network interface to boot from"
+
+ InstanceStartAction:
+ type: object
+ properties:
+ # Timestamp generated by FC - output only
+ timestamp:
+ type: string
+
Error:
properties:
faultMessage:
