Change in vdsm[master]: schema: Marked optional fields in ExternalVmInfo.
Tomas Golembiovsky
tgolembi at redhat.com
Fri May 13 13:20:51 UTC 2016
Tomas Golembiovsky has uploaded a new change for review.
Change subject: schema: Marked optional fields in ExternalVmInfo.
......................................................................
schema: Marked optional fields in ExternalVmInfo.
Some fields may remain empty in certain cases, but they were not marked
as optional in the scheme. Small changes to capitalization included.
We prefer to fix the schema instead of adding defaults to the code.
Returning (nearly) empty structure will come in handy for next API
change that will provida us with the ability to do a lazy loading of
information.
Change-Id: I8e2e7f81ba39be2616f732de1deff477a1ca6c65
Signed-off-by: Tomáš Golembiovský <tgolembi at redhat.com>
---
M lib/api/vdsm-api.yml
M lib/api/vdsmapi-schema.json
2 files changed, 11 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/57417/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 81d86b3..40a0cfe 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -924,11 +924,13 @@
name: allocation
type: *VolumeAllocation
- - description: size of actual memory in MB
+ - defaultvalue: null
+ description: Size of actual memory in MB
name: memSize
type: uint
- - description: number of cpu
+ - defaultvalue: null
+ description: Number of CPUs
name: smp
type: uint
@@ -937,7 +939,8 @@
name: virtio_iso_path
type: string
- - description: The VM uuid
+ - defaultvalue: null
+ description: The VM UUID
name: vmId
type: *UUID
diff --git a/lib/api/vdsmapi-schema.json b/lib/api/vdsmapi-schema.json
index c2da818..b2dd77a 100644
--- a/lib/api/vdsmapi-schema.json
+++ b/lib/api/vdsmapi-schema.json
@@ -4006,11 +4006,11 @@
#
# @status: The current VM status
#
-# @vmId: The VM uuid
+# @vmId: #optional The VM UUID
#
-# @smp: number of cpu
+# @smp: #optional Number of CPUs
#
-# @memSize: size of actual memory in MB
+# @memSize: #optional Size of actual memory in MB
#
# @disks: #optional list of disk devices
#
@@ -4032,8 +4032,8 @@
# Since: 4.17.0
##
{'type': 'ExternalVmInfo',
- 'data': {'vmName': 'str', 'status': 'VmStatus', 'vmId': 'UUID', 'smp': 'uint',
- 'memSize': 'uint', '*disks': ['ExternalDiskInfo'],
+ 'data': {'vmName': 'str', 'status': 'VmStatus', '*vmId': 'UUID',
+ '*smp': 'uint', '*memSize': 'uint', '*disks': ['ExternalDiskInfo'],
'*networks': ['ExternalNetworkInfo'], '*format': 'VolumeFormat',
'*allocation': 'VolumeAllocation', '*virtio_iso_path': 'str',
'*graphics': 'str', '*video': 'str'}}
--
To view, visit https://gerrit.ovirt.org/57417
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e2e7f81ba39be2616f732de1deff477a1ca6c65
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Golembiovsky <tgolembi at redhat.com>
More information about the vdsm-patches
mailing list