api: Annotate volume 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/19316672 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/19316672 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/19316672 Branch: refs/heads/api_refactoring Commit: 1931667243dbb566925e0b8acbbd4f25649f2bcb Parents: edb42d2 Author: Rohit Yadav <[email protected]> Authored: Sun Dec 23 17:21:43 2012 -0800 Committer: Rohit Yadav <[email protected]> Committed: Sun Dec 23 17:21:43 2012 -0800 ---------------------------------------------------------------------- .../api/command/user/volume/UploadVolumeCmd.java | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/19316672/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java index be15048..ff39cd9 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java @@ -16,12 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.user.volume; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.ZoneResponse; 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; @@ -53,12 +54,12 @@ public class UploadVolumeCmd extends BaseAsyncCmd { @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required=true, description="the URL of where the volume is hosted. Possible URL include http:// and https://") private String url; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="the ID of the zone the volume is to be hosted on") + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, + required=true, description="the ID of the zone the volume is to be hosted on") private Long zoneId; - @IdentityMapper(entityTableName="domain") - @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="an optional domainId. If the account parameter is used, domainId must also be used.") + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class, + description="an optional domainId. If the account parameter is used, domainId must also be used.") private Long domainId; @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="an optional accountName. Must be used with domainId.")
