Fix two small bugs and regen docs

This commit is contained in:
Joshua Boniface 2019-12-26 18:42:56 -05:00
parent 49dfc6564f
commit c9fb9600a4
2 changed files with 60 additions and 23 deletions

View File

@ -784,7 +784,7 @@ class API_VM_Root(Resource):
@RequestParser([
{ 'name': 'limit' },
{ 'name': 'node' },
{ 'name': 'selector', 'choices': ('mem', 'vcpu', 'load', 'vms'), 'helptext': "A valid selector must be specified" },
{ 'name': 'selector', 'choices': ('mem', 'vcpus', 'load', 'vms'), 'helptext': "A valid selector must be specified" },
{ 'name': 'autostart' },
{ 'name': 'xml', 'required': True, 'helptext': "A Libvirt XML document must be specified" },
])
@ -819,7 +819,7 @@ class API_VM_Root(Resource):
default: mem
enum:
- mem
- vcpu
- vcpus
- load
- vms
- in: query
@ -1309,6 +1309,12 @@ class API_VM_Console(Resource):
---
tags:
- vm
parameters:
- in: query
name: lines
type: integer
required: false
description: The number of lines to retrieve
responses:
200:
description: OK
@ -1322,12 +1328,6 @@ class API_VM_Console(Resource):
data:
type: string
description: The recent console log text
parameters:
- in: query
name: lines
type: integer
required: false
description: The number of lines to retrieve
404:
description: Not found
schema:

View File

@ -58,6 +58,19 @@
},
"type": "object"
},
"VMLog": {
"properties": {
"data": {
"description": "The recent console log text",
"type": "string"
},
"name": {
"description": "The name of the VM",
"type": "string"
}
},
"type": "object"
},
"VMMetadata": {
"properties": {
"name": {
@ -925,20 +938,6 @@
]
}
},
"/api/v1/doc": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
},
"summary": "Provide the Swagger API documentation",
"tags": [
"root"
]
}
},
"/api/v1/initialize": {
"post": {
"description": "Note: Normally used only once during cluster bootstrap; checks for the existence of the \"/primary_node\" key before proceeding and returns 400 if found",
@ -1946,6 +1945,12 @@
"name": "action",
"required": true,
"type": "string"
},
{
"description": "Whether to block waiting for the full flush/ready state",
"in": "query",
"name": "wait",
"type": "boolean"
}
],
"responses": {
@ -4337,7 +4342,7 @@
"description": "The selector used to determine candidate nodes during migration",
"enum": [
"mem",
"vcpu",
"vcpus",
"load",
"vms"
],
@ -4534,6 +4539,38 @@
]
}
},
"/api/v1/vm/{vm}/console": {
"get": {
"description": "",
"parameters": [
{
"description": "The number of lines to retrieve",
"in": "query",
"name": "lines",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/VMLog"
}
},
"404": {
"description": "Not found",
"schema": {
"$ref": "#/definitions/Message"
}
}
},
"summary": "Return the recent console log of {vm}",
"tags": [
"vm"
]
}
},
"/api/v1/vm/{vm}/locks": {
"post": {
"description": "",