Change in vdsm[master]: Adding system information to getCapabilities
danken at redhat.com
danken at redhat.com
Sat Nov 17 21:50:11 UTC 2012
Dan Kenigsberg has posted comments on this change.
Change subject: Adding system information to getCapabilities
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(5 inline comments)
....................................................
File vdsm/caps.py
Line 255:
Line 256: cpuInfo = CpuInfo()
Line 257: cpuTopology = CpuTopology()
Line 258:
Line 259: caps['SystemInfo'] = supervdsm.getProxy().getSystemInfo()
everything else has a leading lower case.
but more importantly - any API change requires a vdsm_api/vdsmapi-schema.json change.
Line 260:
Line 261: if config.getboolean('vars', 'report_host_threads_as_cores'):
Line 262: caps['cpuCores'] = str(cpuTopology.threads())
Line 263: else:
....................................................
File vdsm/dmidecode_util.py
Line 1: #
I'm not very pleased with this module's existence. There's only one conversion function here, which is not really a utility to anything else.
Line 2: # Copyright 2012 Red Hat, Inc.
Line 3: #
Line 4: # This program is free software; you can redistribute it and/or modify
Line 5: # it under the terms of the GNU General Public License as published by
Line 28: try:
Line 29: if systemInfo[info]['data']['Version'] is not None:
Line 30: data = systemInfo[info]['data']
Line 31: break
Line 32: except:
no naked "except"s please.
Line 33: continue
Line 34:
Line 35: if data is None:
Line 36: raise OSError("could not get system information")
Line 32: except:
Line 33: continue
Line 34:
Line 35: if data is None:
Line 36: raise OSError("could not get system information")
OSErrors take two args: errno and message.
Line 37:
Line 38: try:
Line 39: retData = {}
Line 40: retData['Manufacturer'] = data['Manufacturer']
....................................................
File vdsm.spec.in
Line 621: %dir %{_datadir}/%{vdsm_name}/storage/imageRepository
Line 622: %{_datadir}/%{vdsm_name}/alignmentScan.py*
Line 623: %{_datadir}/%{vdsm_name}/blkid.py*
Line 624: %{_datadir}/%{vdsm_name}/caps.py*
Line 625: %{_datadir}/%{vdsm_name}/clientIF.py*
must add python-dmidecode requirement, too.
Line 626: %{_datadir}/%{vdsm_name}/dmidecode_util.py*
Line 627: %{_datadir}/%{vdsm_name}/API.py*
Line 628: %{_datadir}/%{vdsm_name}/hooking.py*
Line 629: %{_datadir}/%{vdsm_name}/hooks.py*
--
To view, visit http://gerrit.ovirt.org/9258
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic429ef101fcf9047c4b552405314dc7ba9ba07a0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list