If the user enters a non-integer template disk size (e.g. 10.5), guests
created with that template fail to start.
In order to simplify the user experience, all numeric values are
supposed to be consistent. Currently, all numeric values (except the
template disk size) are integer numbers, so it's more consistent for the
user to use integer numbers here as well.
Signed-off-by: Crístian Viana <vianac(a)linux.vnet.ibm.com>
---
src/kimchi/API.json | 2 +-
src/kimchi/i18n.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/API.json b/src/kimchi/API.json
index f262e1c..5b752dc 100644
--- a/src/kimchi/API.json
+++ b/src/kimchi/API.json
@@ -585,7 +585,7 @@
},
"size": {
"description": "Size (GB) of the
disk",
- "type": "number",
+ "type": "integer",
"minimum": 1,
"error": "KCHTMPL0022E"
}
diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index 8315d1d..635d6b9 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -128,7 +128,7 @@ messages = {
"KCHTMPL0019E": _("The volume %(volume)s is not in storage pool
%(pool)s"),
"KCHTMPL0020E": _("Unable to create template due error:
%(err)s"),
"KCHTMPL0021E": _("Unable to delete template due error:
%(err)s"),
- "KCHTMPL0022E": _("Disk size must be greater than 1GB."),
+ "KCHTMPL0022E": _("Disk size must be an integer greater than
1GB."),
"KCHTMPL0023E": _("Template base image must be a valid local image
file"),
"KCHTMPL0024E": _("Cannot identify base image %(path)s format"),
--
1.9.3