Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
i18n.py | 2 +-
model/templates.py | 6 +++---
tests/test_template.py | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/i18n.py b/i18n.py
index 008e327..dc374c3 100644
--- a/i18n.py
+++ b/i18n.py
@@ -133,7 +133,7 @@ messages = {
"KCHVM0076E": _("VM %(name)s must have serial and console defined to
open a web serial console"),
"KCHVM0077E": _("Impossible to get the serial console of
%(name)s"),
"KCHVM0078E": _("Memory or Maximum Memory value is higher than amount
supported by the host: %(memHost)sMiB."),
- "KCHVM0079E": _("Memory or Maximum Memory value is higher than maximum
amount recommended: 1TiB"),
+ "KCHVM0079E": _("Memory or Maximum Memory value is higher than maximum
amount recommended: 16TiB"),
"KCHVM0080E": _("Cannot update Maximum Memory when guest is
running."),
"KCHVMHDEV0001E": _("VM %(vmid)s does not contain directly assigned
host device %(dev_name)s."),
diff --git a/model/templates.py b/model/templates.py
index fb63dc1..39e8982 100644
--- a/model/templates.py
+++ b/model/templates.py
@@ -38,8 +38,8 @@ from wok.plugins.kimchi.vmtemplate import VMTemplate
# In PowerPC, memories must be aligned to 256 MiB
PPC_MEM_ALIGN = 256
-# Max memory 1TB, in KiB
-MAX_MEM_LIM = 1073741824
+# Max memory 16TB, in KiB
+MAX_MEM_LIM = 17179869184
class TemplatesModel(object):
@@ -225,7 +225,7 @@ def validate_memory(memory):
else:
host_memory = psutil.TOTAL_PHYMEM >> 10 >> 10
- # Memories must be lesser than 1TB and the Host memory limit
+ # Memories must be lesser than 16TB and the Host memory limit
if (current > (MAX_MEM_LIM >> 10)) or (maxmem > (MAX_MEM_LIM >>
10)):
raise InvalidParameter("KCHVM0079E")
if (current > host_memory) or (maxmem > host_memory):
diff --git a/tests/test_template.py b/tests/test_template.py
index 4a74955..912afe3 100644
--- a/tests/test_template.py
+++ b/tests/test_template.py
@@ -227,8 +227,8 @@ class TemplateTests(unittest.TestCase):
req = json.dumps({'memory': {'current': 2048}})
resp = self.request(new_tmpl_uri, req, 'PUT')
self.assertEquals(400, resp.status)
- # - max memory greater than 1TiB limit
- req = json.dumps({'memory': {'maxmemory': 1073741824 + 1024}})
+ # - max memory greater than 16TiB limit
+ req = json.dumps({'memory': {'maxmemory': (16 * 1073741824) +
1024}})
resp = self.request(new_tmpl_uri, req, 'PUT')
self.assertEquals(400, resp.status)
self.assertTrue('KCHVM0079E' in resp.read())
--
2.1.0