Change in vdsm[master]: supervdsm: use cpuarch

mpolednik at redhat.com mpolednik at redhat.com
Wed Jan 6 13:47:27 UTC 2016


Martin Polednik has uploaded a new change for review.

Change subject: supervdsm: use cpuarch
......................................................................

supervdsm: use cpuarch

This patch replaces the previous platform lookup that used string
constants by more sophisticated approach from cpuarch.

Change-Id: I1738ae49fe06b67ca28efd11f6597f1bc700e322
Signed-off-by: Martin Polednik <mpolednik at redhat.com>
---
M vdsm/supervdsmServer
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/51433/1

diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer
index 9503ee7..972a196 100755
--- a/vdsm/supervdsmServer
+++ b/vdsm/supervdsmServer
@@ -18,7 +18,6 @@
 # Refer to the README and COPYING files for full details of the license
 #
 from pwd import getpwnam
-import platform
 import sys
 import os
 import stat
@@ -155,10 +154,11 @@
 
     @logDecorator
     def getHardwareInfo(self, *args, **kwargs):
-        if platform.machine() in ('x86_64', 'i686'):
+        arch = cpuarch.real()
+        if cpuarch.is_x86(arch):
             from vdsm.dmidecodeUtil import getHardwareInfoStructure
             return getHardwareInfoStructure()
-        elif cpuarch.is_ppc(platform.machine()):
+        elif cpuarch.is_ppc(arch):
             from vdsm.ppc64HardwareInfo import getHardwareInfoStructure
             return getHardwareInfoStructure()
         else:


-- 
To view, visit https://gerrit.ovirt.org/51433
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1738ae49fe06b67ca28efd11f6597f1bc700e322
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>


More information about the vdsm-patches mailing list