From: Aline Manera <alinefm(a)br.ibm.com>
Instead of storages_create and storages_update they should be
vmstorages_create and vmstorages_update.
Fix it in order to use jsonschema to validate data while adding/updating
vm cdrom.
Signed-off-by: Aline Manera <alinefm(a)br.ibm.com>
---
src/kimchi/API.json | 6 ++++--
src/kimchi/i18n.py | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/kimchi/API.json b/src/kimchi/API.json
index d3a8e64..1189c01 100644
--- a/src/kimchi/API.json
+++ b/src/kimchi/API.json
@@ -352,8 +352,9 @@
"additionalProperties": false,
"error": "KCHAPI0001E"
},
- "storages_create": {
+ "vmstorages_create": {
"type": "object",
+ "error": "KCHCDROM0012E",
"properties": {
"dev": {
"description": "The storage (cd-rom) device
name",
@@ -377,8 +378,9 @@
}
}
},
- "storage_update": {
+ "vmstorage_update": {
"type": "object",
+ "error": "KCHCDROM0013E",
"properties": {
"path": {
"description": "Path of iso image file or disk mount
point",
diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index 43acd71..dfc1b2b 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -197,15 +197,16 @@ messages = {
"KCHCDROM0001E": _("Invalid CDROM device name"),
"KCHCDROM0002E": _("Invalid storage type. Types supported:
'cdrom'"),
- "KCHCDROM0003E": _("The path %(value)s is not valid local/remote path
for the device"),
+ "KCHCDROM0003E": _("The path '%(value)s' is not valid
local/remote path for the device"),
"KCHCDROM0004E": _("Device name %(dev_name)s already exists in vm
%(vm_name)s"),
- "KCHCDROM0005E": _("Must specify a device name"),
"KCHCDROM0006E": _("Can't specify a directory for a CDROM device
path"),
"KCHCDROM0007E": _("The storage device %(dev_name)s does not exist in
the guest %(vm_name)s"),
"KCHCDROM0008E": _("Error while creating new storage device:
%(error)s"),
"KCHCDROM0009E": _("Error while updating storage device:
%(error)s"),
"KCHCDROM0010E": _("Error while removing storage device:
%(error)s"),
"KCHCDROM0011E": _("Do not support guest CDROM hot plug
attachment"),
+ "KCHCDROM0012E": _("Specify type and path to add a new virtual machine
disk"),
+ "KCHCDROM0013E": _("Specify path to update virtual machine
disk"),
"KCHREPOS0001E": _("Repository ID must be one word only
string."),
"KCHREPOS0002E": _("Repository URL must be an http://, ftp:// or
file:// URL."),
--
1.7.10.4