Saggi Mizrahi has posted comments on this change.

Change subject: Adding system information to getCapabilities
......................................................................


Patch Set 5: I would prefer that you didn't submit this

(5 inline comments)

....................................................
File Makefile.am
Line 60:        vdsm/configNetwork.py \
Line 61:        vdsm/constants.py.in \
Line 62:        vdsm/debugPluginClient.py \
Line 63:        vdsm/define.py \
Line 64:        vdsm/dmidecode_util.py \
Naming convention is demidecodeUtil
Line 65:        vdsm/exception.py \
Line 66:        vdsm/gluster \
Line 67:        vdsm/guestIF.py \
Line 68:        vdsm/hooks.py \


....................................................
File vdsm/caps.py
Line 28: import socket
Line 29: import itertools
Line 30: import linecache
Line 31: import glob
Line 32: from supervdsm import getProxy as svdsmProxy
Why? It'll just make grepping harder
Line 33: import libvirt
Line 34: import rpm
Line 35: 
Line 36: from vdsm.config import config


Line 253:                     os.path.exists('/dev/kvm')).lower()
Line 254: 
Line 255:     cpuInfo = CpuInfo()
Line 256:     cpuTopology = CpuTopology()
Line 257:     dmiInfo = svdsmProxy().getDmidecodeInfo()
Get that information once and cache it, it never changes and the less we use 
SVDSM the better
Line 258: 
Line 259:     caps['hostManufacturer'] = dmiInfo['system']['Manufacturer']
Line 260:     caps['hostProductName'] = dmiInfo['system']['Product Name']
Line 261:     caps['hostVersion'] = dmiInfo['system']['Version']


Line 255:     cpuInfo = CpuInfo()
Line 256:     cpuTopology = CpuTopology()
Line 257:     dmiInfo = svdsmProxy().getDmidecodeInfo()
Line 258: 
Line 259:     caps['hostManufacturer'] = dmiInfo['system']['Manufacturer']
I'd rather use the "official" names for these fields, IE systemManufacturer
Line 260:     caps['hostProductName'] = dmiInfo['system']['Product Name']
Line 261:     caps['hostVersion'] = dmiInfo['system']['Version']
Line 262:     caps['hostSerialNumber'] = dmiInfo['system']['Serial Number']
Line 263:     caps['hostUUID'] = dmiInfo['system']['UUID']


....................................................
File vdsm/dmidecode_util.py
Line 20: 
Line 21: import dmidecode
Line 22: 
Line 23: 
Line 24: def leafDict(d, n):
I think you meant to make this privat
Line 25:     for k in d:
Line 26:         if type(d[k]) == dict:
Line 27:             leafDict(d[k], n)
Line 28:         else:


--
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: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: ShaoHe Feng <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to