Peter V. Saveliev has uploaded a new change for review. Change subject: new API call getVersionInfo() ......................................................................
new API call getVersionInfo() getCapabilities() is too expensive to discover the target VDSM version e.g. for migration Signed-off-by: Peter V. Saveliev <[email protected]> Change-Id: I3f55ef437ca404ca04598d34c41756b1e68ced95 --- M vdsm/API.py M vdsm/BindingXMLRPC.py M vdsm_api/vdsmapi-schema.json 3 files changed, 50 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/8431/1 diff --git a/vdsm/API.py b/vdsm/API.py index bbc3221..f95ac80 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -39,6 +39,7 @@ import storage.image from vdsm.define import doneCode, errCode, Kbytes, Mbytes import caps +import dsaversion from vdsm.config import config import supervdsm @@ -328,6 +329,12 @@ return errCode['noVM'] return v.migrateStatus() + def getVersionInfo(self): + """ + """ + info = dsaversion.version_info + return {'status': doneCode, 'info': info} + def getStats(self): """ Obtain statistics of the specified VM diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py index fc57019..351e3a0 100644 --- a/vdsm/BindingXMLRPC.py +++ b/vdsm/BindingXMLRPC.py @@ -284,6 +284,10 @@ ret['info'].update(self.getServerInfo()) return ret + def getVersionInfo(self): + api = API.Global() + return api.getVersionInfo() + def getStats(self): api = API.Global() return api.getStats() @@ -748,6 +752,7 @@ (self.vmGetMigrationStatus, 'migrateStatus'), (self.vmMigrationCancel, 'migrateCancel'), (self.getCapabilities, 'getVdsCapabilities'), + (self.getVersionInfo, 'getVersionInfo'), (self.getStats, 'getVdsStats'), (self.vmGetStats, 'getVmStats'), (self.getAllVmStats, 'getAllVmStats'), diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json index 10d2aaa..a1b5ba3 100644 --- a/vdsm_api/vdsmapi-schema.json +++ b/vdsm_api/vdsmapi-schema.json @@ -1515,6 +1515,44 @@ 'returns': 'HostStats'} ## +# @VdsmCapabilities: +# +# Host information and capabilities. +# +# @version_name: The name given to this version of VDSM +# +# @software_version: VDSM version (x.y.z) +# +# @software_revision: Extra VDSM version information +# +# @supportedRHEVMs: A list of supported ovirt-engine versions +# +# @supportedProtocols: A list of supported xmlrpc protocol versions +# +# @clusterLevels: A list of supported cluster versions +# +# Since: 4.10.1 +# +## +{'type': 'HostInfo', + 'data': {'version_name': 'str', 'software_version': 'str', + 'software_revision': 'str', 'supportedRHEVMs': ['str'], + 'supportedProtocols': ['str'], 'clusterLevels': ['str']}} + +## +## @Host.getVersionInfo: +# +# Get VDSM version information +# +# Returns: +# The versions dictionary +# +# Since: 4.10.1 +## +{'command': {'class': 'Host', 'name': 'getVersionInfo'}, + 'returns': 'HostInfo'} + +## # @StorageDomainImageClass: # # An enumeration of Storage Domain classes. -- To view, visit http://gerrit.ovirt.org/8431 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f55ef437ca404ca04598d34c41756b1e68ced95 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Peter V. Saveliev <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
