vmm: openapi: Fix OpenAPI YAML file formatting

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-08-10 15:48:35 +01:00
parent 999bc2baca
commit 51fdc48817

View File

@ -8,10 +8,9 @@ info:
version: 0.3.0 version: 0.3.0
servers: servers:
- url: http://localhost/api/v1 - url: http://localhost/api/v1
paths: paths:
/vmm.ping: /vmm.ping:
get: get:
summary: Ping the VMM to check for API server availability summary: Ping the VMM to check for API server availability
@ -21,7 +20,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VmmPingResponse' $ref: "#/components/schemas/VmmPingResponse"
/vmm.shutdown: /vmm.shutdown:
put: put:
@ -40,7 +39,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VmInfo' $ref: "#/components/schemas/VmInfo"
/vm.counters: /vm.counters:
get: get:
@ -51,7 +50,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VmCounters' $ref: "#/components/schemas/VmCounters"
/vm.create: /vm.create:
put: put:
@ -62,7 +61,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VmConfig' $ref: "#/components/schemas/VmConfig"
required: true required: true
responses: responses:
204: 204:
@ -154,7 +153,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VmResize' $ref: "#/components/schemas/VmResize"
required: true required: true
responses: responses:
204: 204:
@ -170,7 +169,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VmResizeZone' $ref: "#/components/schemas/VmResizeZone"
required: true required: true
responses: responses:
204: 204:
@ -186,7 +185,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VmAddDevice' $ref: "#/components/schemas/VmAddDevice"
required: true required: true
responses: responses:
200: 200:
@ -194,7 +193,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PciDeviceInfo' $ref: "#/components/schemas/PciDeviceInfo"
204: 204:
description: The new device was successfully (cold) added to the VM instance. description: The new device was successfully (cold) added to the VM instance.
404: 404:
@ -208,7 +207,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VmRemoveDevice' $ref: "#/components/schemas/VmRemoveDevice"
required: true required: true
responses: responses:
204: 204:
@ -224,7 +223,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/DiskConfig' $ref: "#/components/schemas/DiskConfig"
required: true required: true
responses: responses:
200: 200:
@ -232,7 +231,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PciDeviceInfo' $ref: "#/components/schemas/PciDeviceInfo"
204: 204:
description: The new disk was successfully (cold) added to the VM instance. description: The new disk was successfully (cold) added to the VM instance.
500: 500:
@ -246,7 +245,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/FsConfig' $ref: "#/components/schemas/FsConfig"
required: true required: true
responses: responses:
200: 200:
@ -254,7 +253,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PciDeviceInfo' $ref: "#/components/schemas/PciDeviceInfo"
204: 204:
description: The new device was successfully (cold) added to the VM instance. description: The new device was successfully (cold) added to the VM instance.
500: 500:
@ -268,7 +267,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PmemConfig' $ref: "#/components/schemas/PmemConfig"
required: true required: true
responses: responses:
200: 200:
@ -276,7 +275,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PciDeviceInfo' $ref: "#/components/schemas/PciDeviceInfo"
204: 204:
description: The new device was successfully (cold) added to the VM instance. description: The new device was successfully (cold) added to the VM instance.
500: 500:
@ -290,7 +289,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/NetConfig' $ref: "#/components/schemas/NetConfig"
required: true required: true
responses: responses:
200: 200:
@ -298,7 +297,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PciDeviceInfo' $ref: "#/components/schemas/PciDeviceInfo"
204: 204:
description: The new device was successfully (cold) added to the VM instance. description: The new device was successfully (cold) added to the VM instance.
500: 500:
@ -312,7 +311,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VsockConfig' $ref: "#/components/schemas/VsockConfig"
required: true required: true
responses: responses:
200: 200:
@ -320,12 +319,12 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PciDeviceInfo' $ref: "#/components/schemas/PciDeviceInfo"
204: 204:
description: The new device was successfully (cold) added to the VM instance. description: The new device was successfully (cold) added to the VM instance.
500: 500:
description: The new device could not be added to the VM instance. description: The new device could not be added to the VM instance.
/vm.add-vdpa: /vm.add-vdpa:
put: put:
summary: Add a new vDPA device to the VM summary: Add a new vDPA device to the VM
@ -334,7 +333,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VdpaConfig' $ref: "#/components/schemas/VdpaConfig"
required: true required: true
responses: responses:
200: 200:
@ -342,7 +341,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PciDeviceInfo' $ref: "#/components/schemas/PciDeviceInfo"
204: 204:
description: The new vDPA device was successfully (cold) added to the VM instance. description: The new vDPA device was successfully (cold) added to the VM instance.
500: 500:
@ -356,7 +355,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VmSnapshotConfig' $ref: "#/components/schemas/VmSnapshotConfig"
required: true required: true
responses: responses:
204: 204:
@ -374,7 +373,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VmCoredumpData' $ref: "#/components/schemas/VmCoredumpData"
required: true required: true
responses: responses:
204: 204:
@ -392,7 +391,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/RestoreConfig' $ref: "#/components/schemas/RestoreConfig"
required: true required: true
responses: responses:
204: 204:
@ -408,7 +407,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ReceiveMigrationData' $ref: "#/components/schemas/ReceiveMigrationData"
required: true required: true
responses: responses:
204: 204:
@ -424,7 +423,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/SendMigrationData' $ref: "#/components/schemas/SendMigrationData"
required: true required: true
responses: responses:
204: 204:
@ -434,10 +433,9 @@ paths:
components: components:
schemas: schemas:
VmmPingResponse: VmmPingResponse:
required: required:
- version - version
type: object type: object
properties: properties:
version: version:
@ -446,12 +444,12 @@ components:
VmInfo: VmInfo:
required: required:
- config - config
- state - state
type: object type: object
properties: properties:
config: config:
$ref: '#/components/schemas/VmConfig' $ref: "#/components/schemas/VmConfig"
state: state:
type: string type: string
enum: [Created, Running, Shutdown, Paused] enum: [Created, Running, Shutdown, Paused]
@ -461,7 +459,7 @@ components:
device_tree: device_tree:
type: object type: object
additionalProperties: additionalProperties:
$ref: '#/components/schemas/DeviceNode' $ref: "#/components/schemas/DeviceNode"
description: Virtual Machine information description: Virtual Machine information
DeviceNode: DeviceNode:
@ -491,8 +489,8 @@ components:
PciDeviceInfo: PciDeviceInfo:
required: required:
- id - id
- bdf - bdf
type: object type: object
properties: properties:
id: id:
@ -503,63 +501,63 @@ components:
VmConfig: VmConfig:
required: required:
- kernel - kernel
type: object type: object
properties: properties:
cpus: cpus:
$ref: '#/components/schemas/CpusConfig' $ref: "#/components/schemas/CpusConfig"
memory: memory:
$ref: '#/components/schemas/MemoryConfig' $ref: "#/components/schemas/MemoryConfig"
kernel: kernel:
$ref: '#/components/schemas/KernelConfig' $ref: "#/components/schemas/KernelConfig"
initramfs: initramfs:
$ref: '#/components/schemas/InitramfsConfig' $ref: "#/components/schemas/InitramfsConfig"
cmdline: cmdline:
$ref: '#/components/schemas/CmdLineConfig' $ref: "#/components/schemas/CmdLineConfig"
disks: disks:
type: array type: array
items: items:
$ref: '#/components/schemas/DiskConfig' $ref: "#/components/schemas/DiskConfig"
net: net:
type: array type: array
items: items:
$ref: '#/components/schemas/NetConfig' $ref: "#/components/schemas/NetConfig"
rng: rng:
$ref: '#/components/schemas/RngConfig' $ref: "#/components/schemas/RngConfig"
balloon: balloon:
$ref: '#/components/schemas/BalloonConfig' $ref: "#/components/schemas/BalloonConfig"
fs: fs:
type: array type: array
items: items:
$ref: '#/components/schemas/FsConfig' $ref: "#/components/schemas/FsConfig"
pmem: pmem:
type: array type: array
items: items:
$ref: '#/components/schemas/PmemConfig' $ref: "#/components/schemas/PmemConfig"
serial: serial:
$ref: '#/components/schemas/ConsoleConfig' $ref: "#/components/schemas/ConsoleConfig"
console: console:
$ref: '#/components/schemas/ConsoleConfig' $ref: "#/components/schemas/ConsoleConfig"
devices: devices:
type: array type: array
items: items:
$ref: '#/components/schemas/DeviceConfig' $ref: "#/components/schemas/DeviceConfig"
vdpa: vdpa:
type: array type: array
items: items:
$ref: '#/components/schemas/VdpaConfig' $ref: "#/components/schemas/VdpaConfig"
vsock: vsock:
$ref: '#/components/schemas/VsockConfig' $ref: "#/components/schemas/VsockConfig"
sgx_epc: sgx_epc:
type: array type: array
items: items:
$ref: '#/components/schemas/SgxEpcConfig' $ref: "#/components/schemas/SgxEpcConfig"
tdx: tdx:
$ref: '#/components/schemas/TdxConfig' $ref: "#/components/schemas/TdxConfig"
numa: numa:
type: array type: array
items: items:
$ref: '#/components/schemas/NumaConfig' $ref: "#/components/schemas/NumaConfig"
iommu: iommu:
type: boolean type: boolean
default: false default: false
@ -567,7 +565,7 @@ components:
type: boolean type: boolean
default: false default: false
platform: platform:
$ref: '#/components/schemas/PlatformConfig' $ref: "#/components/schemas/PlatformConfig"
description: Virtual machine configuration description: Virtual machine configuration
CpuAffinity: CpuAffinity:
@ -600,8 +598,8 @@ components:
CpusConfig: CpusConfig:
required: required:
- boot_vcpus - boot_vcpus
- max_vcpus - max_vcpus
type: object type: object
properties: properties:
boot_vcpus: boot_vcpus:
@ -613,7 +611,7 @@ components:
default: 1 default: 1
type: integer type: integer
topology: topology:
$ref: '#/components/schemas/CpuTopology' $ref: "#/components/schemas/CpuTopology"
kvm_hyperv: kvm_hyperv:
type: boolean type: boolean
default: false default: false
@ -622,9 +620,9 @@ components:
affinity: affinity:
type: array type: array
items: items:
$ref: '#/components/schemas/CpuAffinity' $ref: "#/components/schemas/CpuAffinity"
features: features:
$ref: '#/components/schemas/CpuFeatures' $ref: "#/components/schemas/CpuFeatures"
PlatformConfig: PlatformConfig:
type: object type: object
@ -648,8 +646,8 @@ components:
MemoryZoneConfig: MemoryZoneConfig:
required: required:
- id - id
- size - size
type: object type: object
properties: properties:
id: id:
@ -687,7 +685,7 @@ components:
MemoryConfig: MemoryConfig:
required: required:
- size - size
type: object type: object
properties: properties:
size: size:
@ -721,11 +719,11 @@ components:
zones: zones:
type: array type: array
items: items:
$ref: '#/components/schemas/MemoryZoneConfig' $ref: "#/components/schemas/MemoryZoneConfig"
KernelConfig: KernelConfig:
required: required:
- path - path
type: object type: object
properties: properties:
path: path:
@ -734,7 +732,7 @@ components:
InitramfsConfig: InitramfsConfig:
nullable: true nullable: true
required: required:
- path - path
type: object type: object
properties: properties:
path: path:
@ -742,7 +740,7 @@ components:
CmdLineConfig: CmdLineConfig:
required: required:
- args - args
type: object type: object
properties: properties:
args: args:
@ -750,8 +748,8 @@ components:
TokenBucket: TokenBucket:
required: required:
- size - size
- refill_time - refill_time
type: object type: object
properties: properties:
size: size:
@ -783,16 +781,16 @@ components:
type: object type: object
properties: properties:
bandwidth: bandwidth:
$ref: '#/components/schemas/TokenBucket' $ref: "#/components/schemas/TokenBucket"
ops: ops:
$ref: '#/components/schemas/TokenBucket' $ref: "#/components/schemas/TokenBucket"
description: description:
Defines an IO rate limiter with independent bytes/s and ops/s limits. Defines an IO rate limiter with independent bytes/s and ops/s limits.
Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
DiskConfig: DiskConfig:
required: required:
- path - path
type: object type: object
properties: properties:
path: path:
@ -818,7 +816,7 @@ components:
vhost_socket: vhost_socket:
type: string type: string
rate_limiter_config: rate_limiter_config:
$ref: '#/components/schemas/RateLimiterConfig' $ref: "#/components/schemas/RateLimiterConfig"
pci_segment: pci_segment:
type: integer type: integer
format: int16 format: int16
@ -861,11 +859,11 @@ components:
type: integer type: integer
format: int16 format: int16
rate_limiter_config: rate_limiter_config:
$ref: '#/components/schemas/RateLimiterConfig' $ref: "#/components/schemas/RateLimiterConfig"
RngConfig: RngConfig:
required: required:
- src - src
type: object type: object
properties: properties:
src: src:
@ -877,7 +875,7 @@ components:
BalloonConfig: BalloonConfig:
required: required:
- size - size
type: object type: object
properties: properties:
size: size:
@ -894,10 +892,10 @@ components:
FsConfig: FsConfig:
required: required:
- num_queues - num_queues
- queue_size - queue_size
- socket - socket
- tag - tag
type: object type: object
properties: properties:
tag: tag:
@ -918,7 +916,7 @@ components:
PmemConfig: PmemConfig:
required: required:
- file - file
type: object type: object
properties: properties:
file: file:
@ -940,7 +938,7 @@ components:
ConsoleConfig: ConsoleConfig:
required: required:
- mode - mode
type: object type: object
properties: properties:
file: file:
@ -954,7 +952,7 @@ components:
DeviceConfig: DeviceConfig:
required: required:
- path - path
type: object type: object
properties: properties:
path: path:
@ -970,8 +968,8 @@ components:
VdpaConfig: VdpaConfig:
required: required:
- path - path
- num_queues - num_queues
type: object type: object
properties: properties:
path: path:
@ -990,8 +988,8 @@ components:
VsockConfig: VsockConfig:
required: required:
- cid - cid
- socket - socket
type: object type: object
properties: properties:
cid: cid:
@ -1013,8 +1011,8 @@ components:
SgxEpcConfig: SgxEpcConfig:
required: required:
- id - id
- size - size
type: object type: object
properties: properties:
id: id:
@ -1028,7 +1026,7 @@ components:
TdxConfig: TdxConfig:
required: required:
- firmware - firmware
type: object type: object
properties: properties:
firmware: firmware:
@ -1037,8 +1035,8 @@ components:
NumaDistance: NumaDistance:
required: required:
- destination - destination
- distance - distance
type: object type: object
properties: properties:
destination: destination:
@ -1050,7 +1048,7 @@ components:
NumaConfig: NumaConfig:
required: required:
- guest_numa_id - guest_numa_id
type: object type: object
properties: properties:
guest_numa_id: guest_numa_id:
@ -1064,7 +1062,7 @@ components:
distances: distances:
type: array type: array
items: items:
$ref: '#/components/schemas/NumaDistance' $ref: "#/components/schemas/NumaDistance"
memory_zones: memory_zones:
type: array type: array
items: items:
@ -1130,7 +1128,7 @@ components:
RestoreConfig: RestoreConfig:
required: required:
- source_url - source_url
type: object type: object
properties: properties:
source_url: source_url:
@ -1140,7 +1138,7 @@ components:
ReceiveMigrationData: ReceiveMigrationData:
required: required:
- receiver_url - receiver_url
type: object type: object
properties: properties:
receiver_url: receiver_url:
@ -1148,7 +1146,7 @@ components:
SendMigrationData: SendMigrationData:
required: required:
- destination_url - destination_url
type: object type: object
properties: properties:
destination_url: destination_url: