Updated Branches: refs/heads/api_refactoring 0719f2132 -> 38225a17f
api: Annotate template related api Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/38225a17 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/38225a17 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/38225a17 Branch: refs/heads/api_refactoring Commit: 38225a17f6d2ed4c72c3d43e096ed5e35602867c Parents: 0719f21 Author: Rohit Yadav <[email protected]> Authored: Sun Dec 23 03:56:07 2012 -0800 Committer: Rohit Yadav <[email protected]> Committed: Sun Dec 23 03:56:07 2012 -0800 ---------------------------------------------------------------------- .../api/command/user/template/CopyTemplateCmd.java | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/38225a17/api/src/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java index 31003be..9aa3d16 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java @@ -23,11 +23,12 @@ import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.IdentityMapper; import org.apache.cloudstack.api.Implementation; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.api.response.ZoneResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceAllocationException; @@ -45,16 +46,16 @@ public class CopyTemplateCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.DESTINATION_ZONE_ID, type=CommandType.LONG, required=true, description="ID of the zone the template is being copied to.") + @Parameter(name=ApiConstants.DESTINATION_ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, + required=true, description="ID of the zone the template is being copied to.") private Long destZoneId; - @IdentityMapper(entityTableName="vm_template") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="Template ID.") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = UserVmResponse.class, + required=true, description="Template ID.") private Long id; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.SOURCE_ZONE_ID, type=CommandType.LONG, required=true, description="ID of the zone the template is currently hosted on.") + @Parameter(name=ApiConstants.SOURCE_ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, + required=true, description="ID of the zone the template is currently hosted on.") private Long sourceZoneId;
