Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
model/templates.py | 3 +--
model/vms.py | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/model/templates.py b/model/templates.py
index e5b111a..c3e24e1 100644
--- a/model/templates.py
+++ b/model/templates.py
@@ -327,8 +327,7 @@ def validate_memory(memory):
'maxmem': str(maxmem)})
# make sure memory and Maxmemory are alingned in 256MiB in PowerPC
- distro, _, _ = platform.linux_distribution()
- if distro == "IBM_PowerKVM":
+ if platform.machine().startswith('ppc'):
if current % PPC_MEM_ALIGN != 0:
raise InvalidParameter('KCHVM0071E',
{'param': "Memory",
diff --git a/model/vms.py b/model/vms.py
index a1b0df7..f4df4a3 100644
--- a/model/vms.py
+++ b/model/vms.py
@@ -1086,8 +1086,7 @@ class VMModel(object):
memory = new_mem - old_mem
flags = libvirt.VIR_DOMAIN_MEM_CONFIG | libvirt.VIR_DOMAIN_MEM_LIVE
- distro, _, _ = platform.linux_distribution()
- if distro == "IBM_PowerKVM":
+ if platform.machine().startswith('ppc'):
# make sure memory is alingned in 256MiB in PowerPC
if (new_mem % PPC_MEM_ALIGN != 0):
raise InvalidParameter('KCHVM0071E',
--
2.7.4
Show replies by date
Applied. Thanks.
Regards,
Aline Manera