Yaniv Bronhaim has posted comments on this change.
Change subject: vdsm: Handling topology for ppc64
......................................................................
Patch Set 6: Code-Review-1
(3 comments)
....................................................
File vdsm/ppc64HardwareInfo.py
Line 54:
Line 55: def getLsCpu():
Line 56: p = CPopen(['lscpu'])
Line 57: p.wait()
Line 58: return p.stdout.read()
can be in utils.py. move it there please
Line 59:
Line 60:
Line 61: @utils.memoized
Line 62: def getCpuTopology(capabilities):
Line 79: threadsPC = int(value)
Line 80: elif key == 'Core(s) per socket':
Line 81: corePS = int(value)
Line 82:
Line 83: if (corePS is not None
just make also socket = None, and if all None raise the RuntimeError
Line 84: and threadsPC is not None
Line 85: and 'sockets' in topology):
Line 86: topology['cores'] = corePS * topology['sockets']
Line 87: topology['threads'] = threadsPC * corePS *
topology['sockets']
Line 88:
Line 89: keys = ['sockets', 'threads', 'cores']
Line 90:
Line 91: if not all(x in topology for x in keys):
Line 92: raise RuntimeError('Undefined topology')
you can use utils.validateMinimalKeySet I think. but I don't think you need this part
at all ^
Line 93:
--
To view, visit
http://gerrit.ovirt.org/19875
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I048d4a6c083392d63fbcff76453e682b9d6f03fc
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Leonardo Bianconi <leonardo.bianconi(a)eldorado.org.br>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa <gustavo.pedrosa(a)eldorado.org.br>
Gerrit-Reviewer: Leonardo Bianconi <leonardo.bianconi(a)eldorado.org.br>
Gerrit-Reviewer: Vitor de Lima <vitor.lima(a)eldorado.org.br>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes