On 02/18/2014 10:25 AM, shaohef(a)linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Sometimes, user creat a template, but networks, cdrom, disks or
typo: creat
storagepool will change later.
So users can not create a vm from this template successfully.
It is necessary to check some paramenters of template.
This patch will check the follow paramenters of template.
networks: check networks exists.
cdrom: check cdrom is available.
disks: check the volume is available.
This patch does not check the storagepool exists. waiting for royce's
disks patch.
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
---
docs/API.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/API.md b/docs/API.md
index 7f5e4d6..c9874fe 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -249,6 +249,10 @@ A interface represents available network interface on VM.
Independent Computing Environments
* null: Graphics is disabled or type not supported
* listen: The network which the vnc/spice server listens on.
+ * invalids: A dict indicates which paramenters of this template are invalid.
invalids
+ * networks *(optional)*: A list of invalid networks name.
+ * cdrom *(optional)*: A dict with "True" value.
From the latest patches, we can add/remove multiples cdrom devices.
So we need to point with cdrom is invalid instead of just True or False
+ * disks *(optional)*: A list of invalid volumes names.
* **DELETE**: Remove the Template
* **POST**: *See Template Actions*