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: