CLOUDSTACK-2713: StoragePoolResponse for a createTemplate

createTemplate returns a templateresponse and not a storagepool
response. Correcting the mapping to fix API docs.

Signed-off-by: Prasanna Santhanam <t...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4a563b64
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4a563b64
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4a563b64

Branch: refs/heads/vmware-storage-motion
Commit: 4a563b64ee73fd280967ffb0d1efd9f2918c6573
Parents: 75a8c1c
Author: Prasanna Santhanam <t...@apache.org>
Authored: Tue May 28 16:37:23 2013 +0530
Committer: Prasanna Santhanam <t...@apache.org>
Committed: Tue May 28 16:37:23 2013 +0530

----------------------------------------------------------------------
 .../command/user/template/CreateTemplateCmd.java   |   32 +++++++--------
 1 files changed, 15 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a563b64/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java
----------------------------------------------------------------------
diff --git 
a/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java
 
b/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java
index ba1f924..6a482ac 100644
--- 
a/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java
@@ -16,10 +16,17 @@
 // under the License.
 package org.apache.cloudstack.api.command.user.template;
 
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
+import com.cloud.async.AsyncJob;
+import com.cloud.event.EventTypes;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.projects.Project;
+import com.cloud.storage.Snapshot;
+import com.cloud.storage.Volume;
+import com.cloud.template.VirtualMachineTemplate;
+import com.cloud.user.Account;
+import com.cloud.user.UserContext;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
@@ -28,25 +35,16 @@ import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.GuestOSResponse;
 import org.apache.cloudstack.api.response.SnapshotResponse;
-import org.apache.cloudstack.api.response.StoragePoolResponse;
 import org.apache.cloudstack.api.response.TemplateResponse;
 import org.apache.cloudstack.api.response.UserVmResponse;
 import org.apache.cloudstack.api.response.VolumeResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
-import com.cloud.event.EventTypes;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.exception.PermissionDeniedException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.projects.Project;
-import com.cloud.storage.Snapshot;
-import com.cloud.storage.Volume;
-import com.cloud.template.VirtualMachineTemplate;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
 
-@APICommand(name = "createTemplate", responseObject = 
StoragePoolResponse.class, description = "Creates a template of a virtual 
machine. " + "The virtual machine must be in a STOPPED state. "
+@APICommand(name = "createTemplate", responseObject = TemplateResponse.class, 
description = "Creates a template of a virtual machine. " + "The virtual 
machine must be in a STOPPED state. "
         + "A template created from this command is automatically designated as 
a private template visible to the account that created it.")
         public class CreateTemplateCmd extends BaseAsyncCreateCmd {
     public static final Logger s_logger = 
Logger.getLogger(CreateTemplateCmd.class.getName());

Reply via email to