From 522d8c841242e0983c2dc0c0b8ccbfd58e32946f Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 26 Jun 2020 15:05:15 +0100 Subject: [PATCH] vmm: openapi: Add the /vm.counters API entry point This is a hash table of string to hash tables of u64s. In JSON these hash tables are object types. Signed-off-by: Rob Bradford --- vmm/src/api/openapi/cloud-hypervisor.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/vmm/src/api/openapi/cloud-hypervisor.yaml b/vmm/src/api/openapi/cloud-hypervisor.yaml index 4672b3c2a..8fabcc39e 100644 --- a/vmm/src/api/openapi/cloud-hypervisor.yaml +++ b/vmm/src/api/openapi/cloud-hypervisor.yaml @@ -42,6 +42,17 @@ paths: schema: $ref: '#/components/schemas/VmInfo' + /vm.counters: + get: + summary: Get counters from the VM + responses: + 200: + description: The VM counters + content: + application/json: + schema: + $ref: '#/components/schemas/VmCounters' + /vm.create: put: summary: Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created. @@ -335,6 +346,14 @@ components: enum: [Created, Running, Shutdown, Paused] description: Virtual Machine information + VmCounters: + type: object + additionalProperties: + type: object + additionalProperties: + type: integer + format: uint64 + PciDeviceInfo: required: - id