cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/master to a654e52
Date Wed, 26 Jun 2013 22:46:59 GMT
Updated Branches:
  refs/heads/master 53d1ce75a -> a654e52cb


Fix an issue of createVolumeCmd for regular user.


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

Branch: refs/heads/master
Commit: a654e52cb6578c15a21bed127d63f2ba352296af
Parents: 53d1ce7
Author: Min Chen <min.chen@citrix.com>
Authored: Wed Jun 26 15:38:57 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Wed Jun 26 15:46:48 2013 -0700

----------------------------------------------------------------------
 .../api/command/user/volume/CreateVolumeCmd.java | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a654e52c/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
index 107af11..6f0bf3a 100644
--- a/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
@@ -55,7 +55,7 @@ public class CreateVolumeCmd extends BaseAsyncCreateCmd {
 
     @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class,
             description="the domain ID associated with the disk offering. If used with the
account parameter" +
-                    " returns the disk volume associated with the account for the specified
domain.")
+            " returns the disk volume associated with the account for the specified domain.")
     private Long domainId;
 
     @Parameter(name=ApiConstants.DISK_OFFERING_ID,required = false, type=CommandType.UUID,
entityType=DiskOfferingResponse.class,
@@ -79,7 +79,7 @@ public class CreateVolumeCmd extends BaseAsyncCreateCmd {
     @Parameter(name=ApiConstants.DISPLAY_VOLUME, type=CommandType.BOOLEAN, description="an
optional field, whether to display the volume to the end user or not.")
     private Boolean displayVolume;
 
-/////////////////////////////////////////////////////
+    /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
 
@@ -117,7 +117,7 @@ public class CreateVolumeCmd extends BaseAsyncCreateCmd {
     }
 
     public Boolean getDisplayVolume() {
-        return displayVolume != null ? displayVolume : Boolean.TRUE;
+        return displayVolume;
     }
 
     /////////////////////////////////////////////////////
@@ -132,6 +132,7 @@ public class CreateVolumeCmd extends BaseAsyncCreateCmd {
         return "volume";
     }
 
+    @Override
     public AsyncJob.Type getInstanceType() {
         return AsyncJob.Type.Volume;
     }
@@ -179,12 +180,12 @@ public class CreateVolumeCmd extends BaseAsyncCreateCmd {
                 Snapshot snap = _entityMgr.findById(Snapshot.class, getSnapshotId());
                 if (snap != null) {
                     response.setSnapshotId(snap.getUuid()); // if the volume was
-                                                            // created from a
-                                                            // snapshot,
-                                                            // snapshotId will
-                                                            // be set so we pass
-                                                            // it back in the
-                                                            // response
+                    // created from a
+                    // snapshot,
+                    // snapshotId will
+                    // be set so we pass
+                    // it back in the
+                    // response
                 }
             }
             response.setResponseName(getCommandName());


Mime
View raw message