You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2013/05/29 11:54:16 UTC
[15/50] git commit: updated refs/heads/vmware-storage-motion to
004e74d
CLOUDSTACK-2686 Upload volume to project is not shown in project storage view
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cc2866c1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cc2866c1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cc2866c1
Branch: refs/heads/vmware-storage-motion
Commit: cc2866c1ea2c778d434e416f8a7183bd3c10c518
Parents: a16b707
Author: Mice Xia <mi...@tcloudcomputing.com>
Authored: Mon May 27 15:47:56 2013 +0800
Committer: Mice Xia <mi...@tcloudcomputing.com>
Committed: Mon May 27 15:48:09 2013 +0800
----------------------------------------------------------------------
.../api/command/user/volume/UploadVolumeCmd.java | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cc2866c1/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 3b00ba0..fea3e04 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
@@ -22,7 +22,9 @@ import org.apache.cloudstack.api.ApiErrorCode;
import org.apache.cloudstack.api.BaseAsyncCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.BaseCmd.CommandType;
import org.apache.cloudstack.api.response.DomainResponse;
+import org.apache.cloudstack.api.response.ProjectResponse;
import org.apache.cloudstack.api.response.VolumeResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
import org.apache.log4j.Logger;
@@ -72,6 +74,10 @@ public class UploadVolumeCmd extends BaseAsyncCmd {
description="Image store uuid")
private String imageStoreUuid;
+ @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class,
+ description="Upload volume for the project")
+ private Long projectId;
+
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////
@@ -135,7 +141,7 @@ public class UploadVolumeCmd extends BaseAsyncCmd {
@Override
public long getEntityOwnerId() {
- Long accountId = finalyzeAccountId(accountName, domainId, null, true);
+ Long accountId = finalyzeAccountId(accountName, domainId, projectId, true);
if (accountId == null) {
return UserContext.current().getCaller().getId();
}