Martin Polednik has uploaded a new change for review. Change subject: ppc64le: fix cpuinfo caps parsing ......................................................................
ppc64le: fix cpuinfo caps parsing Our capability parsing for CpuInfo ignored ppc64le platform. This patch adds ppc64le as a POWER platform and fixes raised RuntimeErrors. Change-Id: I042e817e4f97866be3a762efb3cf7afdd3ecee7f Signed-off-by: Martin Polednik <mpoled...@redhat.com> --- M vdsm/caps.py 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/39059/1 diff --git a/vdsm/caps.py b/vdsm/caps.py index 58f3075..1b9d3bb 100644 --- a/vdsm/caps.py +++ b/vdsm/caps.py @@ -143,6 +143,8 @@ class Architecture: X86_64 = 'x86_64' PPC64 = 'ppc64' + PPC64LE = 'ppc64le' + POWER = (PPC64, PPC64LE) class CpuInfo(object): @@ -166,7 +168,7 @@ def flags(self): if self._arch == Architecture.X86_64: return self._info.itervalues().next()['flags'].split() - elif self._arch == Architecture.PPC64: + elif self._arch in Architecture.POWER: return ['powernv'] else: raise RuntimeError('Unsupported architecture') @@ -174,7 +176,7 @@ def mhz(self): if self._arch == Architecture.X86_64: return self._info.itervalues().next()['cpu MHz'] - elif self._arch == Architecture.PPC64: + elif self._arch in Architecture.POWER: clock = self._info.itervalues().next()['clock'] return clock[:-3] else: @@ -183,7 +185,7 @@ def model(self): if self._arch == Architecture.X86_64: return self._info.itervalues().next()['model name'] - elif self._arch == Architecture.PPC64: + elif self._arch in Architecture.POWER: return self._info.itervalues().next()['cpu'] else: raise RuntimeError('Unsupported architecture') -- To view, visit https://gerrit.ovirt.org/39059 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I042e817e4f97866be3a762efb3cf7afdd3ecee7f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik <mpoled...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches