From 860d1bc73dd891e566e76dad6c1eb178b29bf648 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Wed, 7 Nov 2012 13:43:16 +0530 Subject: [PATCH] api: createStoragePool requires podId, clusterId The CreateStoragePool API requires that podId, clusterId be passed or it fails. Bug found in cli, which in turn got it from Marvin, which got it from commands.xml which got from ApiXmlDocWriter. Patch adds required field on podId, so it trickle downs to cli. Signed-off-by: Rohit Yadav --- api/src/com/cloud/api/commands/CreateStoragePoolCmd.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/com/cloud/api/commands/CreateStoragePoolCmd.java b/api/src/com/cloud/api/commands/CreateStoragePoolCmd.java index 69c1bb5f671..8926ea71b13 100644 --- a/api/src/com/cloud/api/commands/CreateStoragePoolCmd.java +++ b/api/src/com/cloud/api/commands/CreateStoragePoolCmd.java @@ -45,7 +45,7 @@ public class CreateStoragePoolCmd extends BaseCmd { ///////////////////////////////////////////////////// @IdentityMapper(entityTableName="cluster") - @Parameter(name=ApiConstants.CLUSTER_ID, type=CommandType.LONG, description="the cluster ID for the storage pool") + @Parameter(name=ApiConstants.CLUSTER_ID, type=CommandType.LONG, required=true, description="the cluster ID for the storage pool") private Long clusterId; @Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="the details for the storage pool") @@ -55,7 +55,7 @@ public class CreateStoragePoolCmd extends BaseCmd { private String storagePoolName; @IdentityMapper(entityTableName="host_pod_ref") - @Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, description="the Pod ID for the storage pool") + @Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, required=true, description="the Pod ID for the storage pool") private Long podId; @Parameter(name=ApiConstants.TAGS, type=CommandType.STRING, description="the tags for the storage pool")