[Kimchi-devel] [PATCH] Remove slash "/" filter in template name when create VM

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Wed Mar 11 19:28:17 UTC 2015


Users are allowed to create or update template names with "slash",
this generates an error when he tries to create a guest with that
template because the guest paramters validation prohibits slashes
in templates names. This patch fixes this problem.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
 src/kimchi/API.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kimchi/API.json b/src/kimchi/API.json
index 0cfa20c..f507251 100644
--- a/src/kimchi/API.json
+++ b/src/kimchi/API.json
@@ -233,7 +233,7 @@
                 "template": {
                     "description": "The URI of a template to use when building a VM",
                     "type": "string",
-                    "pattern": "^/templates/[^/]+/?$",
+                    "pattern": "^/templates/(.*?)/?$",
                     "required": true,
                     "error": "KCHVM0012E"
                 },
-- 
2.1.0




More information about the Kimchi-devel mailing list