From 07bbcc701401bbe8d223d75bb537056fc5a8e22b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Tue, 17 Nov 2015 18:07:41 +0100 Subject: [PATCH] Allow ramdisk_id, kernel_id to be null on schema Since is possible to create images with no ramdisk_id, kernel_id parameters on glance v1, then the schema-image.json needs to be modified to allow null, string values for both attributes and prevent LP #1447193 to happen with a glance v2 client. Change-Id: I1319a1f6bdb69db90f9be7cf34df62cbd8538969 Closes-Bug: #1516330 Related-Bug: #1447193 --- templates/schema.json.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/schema.json.j2 b/templates/schema.json.j2 index 5aafd6b3..d9f433bd 100644 --- a/templates/schema.json.j2 +++ b/templates/schema.json.j2 @@ -1,11 +1,11 @@ { "kernel_id": { - "type": "string", + "type": ["null", "string"], "pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "description": "ID of image stored in Glance that should be used as the kernel when booting an AMI-style image." }, "ramdisk_id": { - "type": "string", + "type": ["null", "string"], "pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "description": "ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image." },