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
servers:
- url: http://localhost/api/v1
- url: http://localhost/api/v1
paths:
/vmm.ping:
get:
summary: Ping the VMM to check for API server availability
@ -21,7 +20,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VmmPingResponse'
$ref: "#/components/schemas/VmmPingResponse"
/vmm.shutdown:
put:
@ -40,7 +39,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VmInfo'
$ref: "#/components/schemas/VmInfo"
/vm.counters:
get:
@ -51,7 +50,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VmCounters'
$ref: "#/components/schemas/VmCounters"
/vm.create:
put:
@ -62,7 +61,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VmConfig'
$ref: "#/components/schemas/VmConfig"
required: true
responses:
204:
@ -154,7 +153,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VmResize'
$ref: "#/components/schemas/VmResize"
required: true
responses:
204:
@ -170,7 +169,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VmResizeZone'
$ref: "#/components/schemas/VmResizeZone"
required: true
responses:
204:
@ -186,7 +185,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VmAddDevice'
$ref: "#/components/schemas/VmAddDevice"
required: true
responses:
200:
@ -194,7 +193,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
$ref: "#/components/schemas/PciDeviceInfo"
204:
description: The new device was successfully (cold) added to the VM instance.
404:
@ -208,7 +207,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VmRemoveDevice'
$ref: "#/components/schemas/VmRemoveDevice"
required: true
responses:
204:
@ -224,7 +223,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/DiskConfig'
$ref: "#/components/schemas/DiskConfig"
required: true
responses:
200:
@ -232,7 +231,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
$ref: "#/components/schemas/PciDeviceInfo"
204:
description: The new disk was successfully (cold) added to the VM instance.
500:
@ -246,7 +245,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/FsConfig'
$ref: "#/components/schemas/FsConfig"
required: true
responses:
200:
@ -254,7 +253,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
$ref: "#/components/schemas/PciDeviceInfo"
204:
description: The new device was successfully (cold) added to the VM instance.
500:
@ -268,7 +267,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/PmemConfig'
$ref: "#/components/schemas/PmemConfig"
required: true
responses:
200:
@ -276,7 +275,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
$ref: "#/components/schemas/PciDeviceInfo"
204:
description: The new device was successfully (cold) added to the VM instance.
500:
@ -290,7 +289,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/NetConfig'
$ref: "#/components/schemas/NetConfig"
required: true
responses:
200:
@ -298,7 +297,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
$ref: "#/components/schemas/PciDeviceInfo"
204:
description: The new device was successfully (cold) added to the VM instance.
500:
@ -312,7 +311,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VsockConfig'
$ref: "#/components/schemas/VsockConfig"
required: true
responses:
200:
@ -320,7 +319,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
$ref: "#/components/schemas/PciDeviceInfo"
204:
description: The new device was successfully (cold) added to the VM instance.
500:
@ -334,7 +333,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VdpaConfig'
$ref: "#/components/schemas/VdpaConfig"
required: true
responses:
200:
@ -342,7 +341,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
$ref: "#/components/schemas/PciDeviceInfo"
204:
description: The new vDPA device was successfully (cold) added to the VM instance.
500:
@ -356,7 +355,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VmSnapshotConfig'
$ref: "#/components/schemas/VmSnapshotConfig"
required: true
responses:
204:
@ -374,7 +373,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/VmCoredumpData'
$ref: "#/components/schemas/VmCoredumpData"
required: true
responses:
204:
@ -392,7 +391,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/RestoreConfig'
$ref: "#/components/schemas/RestoreConfig"
required: true
responses:
204:
@ -408,7 +407,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ReceiveMigrationData'
$ref: "#/components/schemas/ReceiveMigrationData"
required: true
responses:
204:
@ -424,7 +423,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/SendMigrationData'
$ref: "#/components/schemas/SendMigrationData"
required: true
responses:
204:
@ -434,7 +433,6 @@ paths:
components:
schemas:
VmmPingResponse:
required:
- version
@ -451,7 +449,7 @@ components:
type: object
properties:
config:
$ref: '#/components/schemas/VmConfig'
$ref: "#/components/schemas/VmConfig"
state:
type: string
enum: [Created, Running, Shutdown, Paused]
@ -461,7 +459,7 @@ components:
device_tree:
type: object
additionalProperties:
$ref: '#/components/schemas/DeviceNode'
$ref: "#/components/schemas/DeviceNode"
description: Virtual Machine information
DeviceNode:
@ -507,59 +505,59 @@ components:
type: object
properties:
cpus:
$ref: '#/components/schemas/CpusConfig'
$ref: "#/components/schemas/CpusConfig"
memory:
$ref: '#/components/schemas/MemoryConfig'
$ref: "#/components/schemas/MemoryConfig"
kernel:
$ref: '#/components/schemas/KernelConfig'
$ref: "#/components/schemas/KernelConfig"
initramfs:
$ref: '#/components/schemas/InitramfsConfig'
$ref: "#/components/schemas/InitramfsConfig"
cmdline:
$ref: '#/components/schemas/CmdLineConfig'
$ref: "#/components/schemas/CmdLineConfig"
disks:
type: array
items:
$ref: '#/components/schemas/DiskConfig'
$ref: "#/components/schemas/DiskConfig"
net:
type: array
items:
$ref: '#/components/schemas/NetConfig'
$ref: "#/components/schemas/NetConfig"
rng:
$ref: '#/components/schemas/RngConfig'
$ref: "#/components/schemas/RngConfig"
balloon:
$ref: '#/components/schemas/BalloonConfig'
$ref: "#/components/schemas/BalloonConfig"
fs:
type: array
items:
$ref: '#/components/schemas/FsConfig'
$ref: "#/components/schemas/FsConfig"
pmem:
type: array
items:
$ref: '#/components/schemas/PmemConfig'
$ref: "#/components/schemas/PmemConfig"
serial:
$ref: '#/components/schemas/ConsoleConfig'
$ref: "#/components/schemas/ConsoleConfig"
console:
$ref: '#/components/schemas/ConsoleConfig'
$ref: "#/components/schemas/ConsoleConfig"
devices:
type: array
items:
$ref: '#/components/schemas/DeviceConfig'
$ref: "#/components/schemas/DeviceConfig"
vdpa:
type: array
items:
$ref: '#/components/schemas/VdpaConfig'
$ref: "#/components/schemas/VdpaConfig"
vsock:
$ref: '#/components/schemas/VsockConfig'
$ref: "#/components/schemas/VsockConfig"
sgx_epc:
type: array
items:
$ref: '#/components/schemas/SgxEpcConfig'
$ref: "#/components/schemas/SgxEpcConfig"
tdx:
$ref: '#/components/schemas/TdxConfig'
$ref: "#/components/schemas/TdxConfig"
numa:
type: array
items:
$ref: '#/components/schemas/NumaConfig'
$ref: "#/components/schemas/NumaConfig"
iommu:
type: boolean
default: false
@ -567,7 +565,7 @@ components:
type: boolean
default: false
platform:
$ref: '#/components/schemas/PlatformConfig'
$ref: "#/components/schemas/PlatformConfig"
description: Virtual machine configuration
CpuAffinity:
@ -613,7 +611,7 @@ components:
default: 1
type: integer
topology:
$ref: '#/components/schemas/CpuTopology'
$ref: "#/components/schemas/CpuTopology"
kvm_hyperv:
type: boolean
default: false
@ -622,9 +620,9 @@ components:
affinity:
type: array
items:
$ref: '#/components/schemas/CpuAffinity'
$ref: "#/components/schemas/CpuAffinity"
features:
$ref: '#/components/schemas/CpuFeatures'
$ref: "#/components/schemas/CpuFeatures"
PlatformConfig:
type: object
@ -721,7 +719,7 @@ components:
zones:
type: array
items:
$ref: '#/components/schemas/MemoryZoneConfig'
$ref: "#/components/schemas/MemoryZoneConfig"
KernelConfig:
required:
@ -783,9 +781,9 @@ components:
type: object
properties:
bandwidth:
$ref: '#/components/schemas/TokenBucket'
$ref: "#/components/schemas/TokenBucket"
ops:
$ref: '#/components/schemas/TokenBucket'
$ref: "#/components/schemas/TokenBucket"
description:
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.
@ -818,7 +816,7 @@ components:
vhost_socket:
type: string
rate_limiter_config:
$ref: '#/components/schemas/RateLimiterConfig'
$ref: "#/components/schemas/RateLimiterConfig"
pci_segment:
type: integer
format: int16
@ -861,7 +859,7 @@ components:
type: integer
format: int16
rate_limiter_config:
$ref: '#/components/schemas/RateLimiterConfig'
$ref: "#/components/schemas/RateLimiterConfig"
RngConfig:
required:
@ -1064,7 +1062,7 @@ components:
distances:
type: array
items:
$ref: '#/components/schemas/NumaDistance'
$ref: "#/components/schemas/NumaDistance"
memory_zones:
type: array
items: