cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject git commit: updated refs/heads/master to cc2866c
Date Mon, 27 May 2013 07:44:13 GMT
Updated Branches:
  refs/heads/master a16b70725 -> cc2866c1e


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/master
Commit: cc2866c1ea2c778d434e416f8a7183bd3c10c518
Parents: a16b707
Author: Mice Xia <mice_xia@tcloudcomputing.com>
Authored: Mon May 27 15:47:56 2013 +0800
Committer: Mice Xia <mice_xia@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();
         }


Mime
View raw message