cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject [3/3] git commit: updated refs/heads/CS-2163 to a3958cd
Date Thu, 25 Apr 2013 07:12:10 GMT
=iniitial changes


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

Branch: refs/heads/CS-2163
Commit: a3958cda9bd80be1fed225793da632cc4f4118b0
Parents: 2c176ab
Author: Nitin Mehta <nitin.mehta@citrix.com>
Authored: Thu Apr 25 12:41:46 2013 +0530
Committer: Nitin Mehta <nitin.mehta@citrix.com>
Committed: Thu Apr 25 12:41:46 2013 +0530

----------------------------------------------------------------------
 api/src/com/cloud/event/EventTypes.java            |    3 +
 api/src/com/cloud/network/Network.java             |    2 +
 api/src/com/cloud/network/NetworkProfile.java      |    7 +
 api/src/com/cloud/network/NetworkService.java      |   13 +-
 api/src/com/cloud/network/vpc/VpcService.java      |    2 +-
 api/src/com/cloud/storage/VolumeApiService.java    |   13 +-
 api/src/com/cloud/storage/VolumeDetail.java        |   16 +
 api/src/com/cloud/vm/UserVmService.java            |   12 +-
 .../org/apache/cloudstack/api/ApiConstants.java    |    4 +
 .../admin/offering/CreateDiskOfferingCmd.java      |    9 +-
 .../api/command/user/network/AddNicDetailCmd.java  |  116 +++++
 .../api/command/user/network/CreateNetworkCmd.java |    7 +
 .../command/user/network/RemoveNicDetailCmd.java   |  117 +++++
 .../api/command/user/network/UpdateNetworkCmd.java |   12 +-
 .../command/user/network/UpdateNicDetailCmd.java   |  116 +++++
 .../api/command/user/vm/DeployVMCmd.java           |   12 +-
 .../api/command/user/vm/UpdateVMCmd.java           |    7 +
 .../command/user/volume/AddVolumeDetailCmd.java    |  115 +++++
 .../api/command/user/volume/CreateVolumeCmd.java   |    8 +-
 .../command/user/volume/ListVolumeDetailCmd.java   |   11 +
 .../command/user/volume/ListVolumeDetailsCmd.java  |   82 ++++
 .../command/user/volume/RemoveVolumeDetailCmd.java |  107 +++++
 .../api/command/user/volume/UpdateVolumeCmd.java   |  121 +++++
 .../command/user/volume/UpdateVolumeDetailCmd.java |  115 +++++
 .../api/response/DiskOfferingResponse.java         |   12 +
 .../cloudstack/api/response/NetworkResponse.java   |   13 +-
 .../cloudstack/api/response/UserVmResponse.java    |    9 +
 .../api/response/VolumeDetailResponse.java         |   82 ++++
 .../cloudstack/api/response/VolumeResponse.java    |   12 +
 .../org/apache/cloudstack/query/QueryService.java  |   28 +-
 .../api/command/test/AddNicDetailCmdTest.java      |   62 +++
 .../api/command/test/AddVolumeDetailCmdTest.java   |   62 +++
 .../api/command/test/RemoveNicDetailCmdTest.java   |   62 +++
 .../command/test/RemoveVolumeDetailCmdTest.java    |   63 +++
 .../command/test/UpdateVolumeDetailCmdTest.java    |   65 +++
 .../api/command/test/updateNicDetailCmdTest.java   |   62 +++
 client/tomcatconf/commands.properties.in           |    7 +
 core/src/com/cloud/storage/DiskOfferingVO.java     |   12 +
 core/src/com/cloud/storage/VolumeDetailVO.java     |   85 ++++
 core/src/com/cloud/storage/VolumeVO.java           |   14 +-
 core/src/com/cloud/vm/VMInstanceVO.java            |   11 +
 .../cloudstack/storage/volume/db/VolumeVO.java     |    2 +
 server/src/com/cloud/api/ApiResponseHelper.java    |    1 +
 .../src/com/cloud/api/query/QueryManagerImpl.java  |   62 ++-
 .../api/query/dao/DiskOfferingJoinDaoImpl.java     |    5 +-
 .../com/cloud/api/query/dao/UserVmJoinDaoImpl.java |    1 +
 .../com/cloud/api/query/dao/VolumeJoinDaoImpl.java |    1 +
 .../com/cloud/api/query/vo/DiskOfferingJoinVO.java |   11 +
 .../src/com/cloud/api/query/vo/UserVmJoinVO.java   |   10 +
 .../src/com/cloud/api/query/vo/VolumeJoinVO.java   |   10 +
 .../cloud/configuration/ConfigurationManager.java  |    4 +-
 .../configuration/ConfigurationManagerImpl.java    |   14 +-
 server/src/com/cloud/network/NetworkManager.java   |    6 +-
 .../src/com/cloud/network/NetworkManagerImpl.java  |   15 +-
 .../src/com/cloud/network/NetworkServiceImpl.java  |   87 +++-
 server/src/com/cloud/network/dao/NetworkVO.java    |   12 +
 server/src/com/cloud/network/vpc/VpcManager.java   |    8 +-
 .../src/com/cloud/network/vpc/VpcManagerImpl.java  |   15 +-
 .../src/com/cloud/server/ManagementServerImpl.java |    7 +
 .../src/com/cloud/storage/VolumeManagerImpl.java   |   88 +++-
 .../com/cloud/storage/dao/VolumeDetailsDao.java    |   33 ++
 .../cloud/storage/dao/VolumeDetailsDaoImpl.java    |   93 ++++
 server/src/com/cloud/vm/NicDetailsVO.java          |   11 +
 server/src/com/cloud/vm/UserVmManagerImpl.java     |   32 +-
 server/src/com/cloud/vm/dao/NicDetailDao.java      |   32 ++
 server/src/com/cloud/vm/dao/NicDetailDaoImpl.java  |   98 ++++
 server/src/com/cloud/vm/dao/UserVmDao.java         |    3 +-
 server/src/com/cloud/vm/dao/UserVmDaoImpl.java     |  353 ++++++++-------
 .../com/cloud/network/MockNetworkManagerImpl.java  |   47 +-
 .../test/com/cloud/vm/MockUserVmManagerImpl.java   |   42 +-
 .../cloud/vpc/MockConfigurationManagerImpl.java    |    8 +-
 .../test/com/cloud/vpc/MockNetworkManagerImpl.java |   28 +-
 server/test/com/cloud/vpc/MockVpcManagerImpl.java  |    7 +-
 setup/db/db/schema-410to420.sql                    |  351 ++++++++++++++
 74 files changed, 2796 insertions(+), 389 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/com/cloud/event/EventTypes.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java
index 2e961e5..6aed013 100755
--- a/api/src/com/cloud/event/EventTypes.java
+++ b/api/src/com/cloud/event/EventTypes.java
@@ -158,6 +158,9 @@ public class EventTypes {
     public static final String EVENT_VOLUME_UPLOAD = "VOLUME.UPLOAD";
     public static final String EVENT_VOLUME_MIGRATE = "VOLUME.MIGRATE";
     public static final String EVENT_VOLUME_RESIZE = "VOLUME.RESIZE";
+    public static final String EVENT_VOLUME_DETAIL_UPDATE = "VOLUME.DETAIL.UPDATE";
+    public static final String EVENT_VOLUME_DETAIL_ADD = "VOLUME.DETAIL.ADD";
+    public static final String EVENT_VOLUME_DETAIL_REMOVE = "VOLUME.DETAIL.REMOVE";
 
     // Domains
     public static final String EVENT_DOMAIN_CREATE = "DOMAIN.CREATE";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/com/cloud/network/Network.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Network.java b/api/src/com/cloud/network/Network.java
index c2ab655..963725c 100644
--- a/api/src/com/cloud/network/Network.java
+++ b/api/src/com/cloud/network/Network.java
@@ -331,6 +331,8 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
 
     boolean getSpecifyIpRanges();
 
+    boolean getDisplayNetwork();
+
     /**
      * @return
      */

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/com/cloud/network/NetworkProfile.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkProfile.java b/api/src/com/cloud/network/NetworkProfile.java
index 2f56645..7358b1a 100644
--- a/api/src/com/cloud/network/NetworkProfile.java
+++ b/api/src/com/cloud/network/NetworkProfile.java
@@ -52,6 +52,7 @@ public class NetworkProfile implements Network {
     private boolean restartRequired;
     private boolean specifyIpRanges;
     private Long vpcId;
+    private boolean displayNetwork;
 
     public NetworkProfile(Network network) {
         this.id = network.getId();
@@ -81,6 +82,7 @@ public class NetworkProfile implements Network {
         this.restartRequired = network.isRestartRequired();
         this.specifyIpRanges = network.getSpecifyIpRanges();
         this.vpcId = network.getVpcId();
+        this.displayNetwork = network.getDisplayNetwork();
     }
 
     public String getDns1() {
@@ -232,6 +234,11 @@ public class NetworkProfile implements Network {
     }
 
     @Override
+    public boolean getDisplayNetwork() {
+        return displayNetwork;
+    }
+
+    @Override
     public Long getVpcId() {
         return vpcId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/com/cloud/network/NetworkService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkService.java b/api/src/com/cloud/network/NetworkService.java
index ab6d7bf..6e3c795 100755
--- a/api/src/com/cloud/network/NetworkService.java
+++ b/api/src/com/cloud/network/NetworkService.java
@@ -19,9 +19,7 @@ package com.cloud.network;
 import java.util.List;
 
 import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
-import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd;
-import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd;
-import org.apache.cloudstack.api.command.user.network.ListNetworksCmd;
+import org.apache.cloudstack.api.command.user.network.*;
 import org.apache.cloudstack.api.command.user.vm.ListNicsCmd;
 
 import com.cloud.exception.ConcurrentOperationException;
@@ -70,7 +68,7 @@ public interface NetworkService {
     IpAddress getIp(long id);
 
     Network updateGuestNetwork(long networkId, String name, String displayText, Account callerAccount, User callerUser,
-            String domainSuffix, Long networkOfferingId, Boolean changeCidr, String guestVmCidr);
+                               String domainSuffix, Long networkOfferingId, Boolean changeCidr, String guestVmCidr, Boolean displayNetwork);
 
     PhysicalNetwork createPhysicalNetwork(Long zoneId, String vnetRange, String networkSpeed, 
             List<String> isolationMethods, String broadcastDomainRange, Long domainId, List<String> tags, String name);
@@ -165,4 +163,11 @@ public interface NetworkService {
 
     /* lists the nic informaton */
     List<? extends Nic> listNics(ListNicsCmd listNicsCmd);
+
+    void addNicDetail(AddNicDetailCmd addNicDetailCmd);
+
+    void updateNicDetail(UpdateNicDetailCmd addNicDetailCmd);
+
+    void removeNicDetail(RemoveNicDetailCmd addNicDetailCmd);
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/com/cloud/network/vpc/VpcService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/vpc/VpcService.java b/api/src/com/cloud/network/vpc/VpcService.java
index 9bf1bee..4242691 100644
--- a/api/src/com/cloud/network/vpc/VpcService.java
+++ b/api/src/com/cloud/network/vpc/VpcService.java
@@ -246,5 +246,5 @@ public interface VpcService {
         InsufficientAddressCapacityException, ConcurrentOperationException;
 
     public Network updateVpcGuestNetwork(long networkId, String name, String displayText, Account callerAccount,
-            User callerUser, String domainSuffix, Long ntwkOffId, Boolean changeCidr, String guestVmCidr);
+                                         User callerUser, String domainSuffix, Long ntwkOffId, Boolean changeCidr, String guestVmCidr, Boolean displayNetwork);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/com/cloud/storage/VolumeApiService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/storage/VolumeApiService.java b/api/src/com/cloud/storage/VolumeApiService.java
index 09a07d4..1f70c5b 100644
--- a/api/src/com/cloud/storage/VolumeApiService.java
+++ b/api/src/com/cloud/storage/VolumeApiService.java
@@ -18,12 +18,7 @@
  */
 package com.cloud.storage;
 
-import org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd;
-import org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd;
-import org.apache.cloudstack.api.command.user.volume.DetachVolumeCmd;
-import org.apache.cloudstack.api.command.user.volume.MigrateVolumeCmd;
-import org.apache.cloudstack.api.command.user.volume.ResizeVolumeCmd;
-import org.apache.cloudstack.api.command.user.volume.UploadVolumeCmd;
+import org.apache.cloudstack.api.command.user.volume.*;
 
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.PermissionDeniedException;
@@ -79,4 +74,10 @@ public interface VolumeApiService {
     Volume attachVolumeToVM(AttachVolumeCmd command);
 
     Volume detachVolumeFromVM(DetachVolumeCmd cmmd);
+
+    void updateVolumeDetails(UpdateVolumeDetailCmd updateVolumeDetailCmd);
+
+    void removeVolumeDetail(RemoveVolumeDetailCmd removeVolumeDetailCmd);
+
+    void addVolumeDetail(AddVolumeDetailCmd addVolumeDetailCmd);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/com/cloud/storage/VolumeDetail.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/storage/VolumeDetail.java b/api/src/com/cloud/storage/VolumeDetail.java
new file mode 100644
index 0000000..7017373
--- /dev/null
+++ b/api/src/com/cloud/storage/VolumeDetail.java
@@ -0,0 +1,16 @@
+package com.cloud.storage;
+
+import org.apache.cloudstack.acl.ControlledEntity;
+import org.apache.cloudstack.api.Identity;
+import org.apache.cloudstack.api.InternalIdentity;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: nitinmehta
+ * Date: 24/04/13
+ * Time: 5:55 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface VolumeDetail extends ControlledEntity, InternalIdentity, Identity {
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/com/cloud/vm/UserVmService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/UserVmService.java b/api/src/com/cloud/vm/UserVmService.java
index 2c33d41..1b64096 100755
--- a/api/src/com/cloud/vm/UserVmService.java
+++ b/api/src/com/cloud/vm/UserVmService.java
@@ -165,6 +165,8 @@ public interface UserVmService {
      *            TODO
      * @param defaultIp
      *            TODO
+     * @param displayVm
+     *            - Boolean flag whether to the display the vm to the end user or not
      * @param accountName
      *            - an optional account for the virtual machine. Must be used with domainId
      * @param domainId
@@ -181,7 +183,7 @@ public interface UserVmService {
      * @throws InsufficientResourcesException
      */
     UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> securityGroupIdList, Account owner, String hostName,
-            String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIp, String keyboard)
+            String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIp, Boolean displayVm , String keyboard)
             throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
 
     /**
@@ -230,6 +232,8 @@ public interface UserVmService {
      *            TODO
      * @param defaultIps
      *            TODO
+     * @param displayVm
+     *            - Boolean flag whether to the display the vm to the end user or not
      * @param accountName
      *            - an optional account for the virtual machine. Must be used with domainId
      * @param domainId
@@ -247,7 +251,7 @@ public interface UserVmService {
      */
     UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList, List<Long> securityGroupIdList,
             Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps,
-            IpAddresses defaultIps, String keyboard)
+            IpAddresses defaultIps, Boolean displayVm, String keyboard)
             throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
 
     /**
@@ -293,6 +297,8 @@ public interface UserVmService {
      * @param requestedIps
      *            TODO
      * @param defaultIps TODO
+     * @param displayVm
+     *            - Boolean flag whether to the display the vm to the end user or not
      * @param accountName
      *            - an optional account for the virtual machine. Must be used with domainId
      * @param domainId
@@ -309,7 +315,7 @@ public interface UserVmService {
      * @throws InsufficientResourcesException
      */
     UserVm createAdvancedVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList, Account owner, String hostName,
-            String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, String keyboard)
+            String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard)
             throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
 
     /**

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index c518830..daee57a 100755
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -56,7 +56,11 @@ public class ApiConstants {
     public static final String DISK_OFFERING_ID = "diskofferingid";
     public static final String DISK_SIZE = "disksize";
     public static final String DISPLAY_NAME = "displayname";
+    public static final String DISPLAY_NETWORK = "displaynetwork";
     public static final String DISPLAY_TEXT = "displaytext";
+    public static final String DISPLAY_VM = "displayvm";
+    public static final String DISPLAY_OFFERING = "displayoffering";
+    public static final String DISPLAY_VOLUME = "displayvolume";
     public static final String DNS1 = "dns1";
     public static final String DNS2 = "dns2";
     public static final String IP6_DNS1 = "ip6dns1";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
index 68d5dd4..aa11599 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
@@ -62,7 +62,10 @@ public class CreateDiskOfferingCmd extends BaseCmd {
     @Parameter(name=ApiConstants.STORAGE_TYPE, type=CommandType.STRING, description="the storage type of the disk offering. Values are local and shared.")
     private String storageType = ServiceOffering.StorageType.shared.toString();
 
-    /////////////////////////////////////////////////////
+    @Parameter(name=ApiConstants.DISPLAY_OFFERING, type=CommandType.BOOLEAN, description="an optional field, whether to display the offering to the end user or not.")
+    private Boolean displayOffering;
+
+/////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
 
@@ -94,6 +97,10 @@ public class CreateDiskOfferingCmd extends BaseCmd {
         return storageType;
     }
 
+    public Boolean getDisplayOffering() {
+        return displayOffering;
+    }
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/network/AddNicDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/network/AddNicDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/AddNicDetailCmd.java
new file mode 100644
index 0000000..e5f7a0e
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/user/network/AddNicDetailCmd.java
@@ -0,0 +1,116 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.user.network;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+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.response.NicResponse;
+import org.apache.cloudstack.api.response.SuccessResponse;
+import org.apache.cloudstack.api.response.UserVmResponse;
+import org.apache.cloudstack.api.response.VolumeResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.async.AsyncJob;
+import com.cloud.event.EventTypes;
+import com.cloud.storage.Volume;
+import com.cloud.user.Account;
+import com.cloud.user.UserContext;
+
+@APICommand(name = "addNicDetail", description="Adds detail for the volume.", since="4.2", responseObject=SuccessResponse.class)
+public class AddNicDetailCmd extends BaseAsyncCmd {
+    public static final Logger s_logger = Logger.getLogger(AddNicDetailCmd.class.getName());
+    private static final String s_name = "addNicDetailresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=NicResponse.class,
+            required=true, description="the ID of the nic")
+    private Long id;
+
+    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
+            required=true, description="the name of the field")
+    private String name;
+
+    @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING,
+            required=true, description="the value of the field")
+    private String value;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+
+    public String getName() {
+        return name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    public AsyncJob.Type getInstanceType() {
+        return AsyncJob.Type.Volume;
+    }
+
+    public Long getInstanceId() {
+        return getId();
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        Volume volume = _responseGenerator.findVolumeById(getId());
+        if (volume == null) {
+            return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
+        }
+        return volume.getAccountId();
+    }
+
+    @Override
+    public String getEventType() {
+        return EventTypes.EVENT_VOLUME_ATTACH;
+    }
+
+    @Override
+    public String getEventDescription() {
+        return  "adding detail to the nic: " + getId();
+    }
+
+    @Override
+    public void execute(){
+        _networkService.addNicDetail(this);
+        this.setResponseObject(new SuccessResponse(getCommandName()));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java
index fc7bd9f..8c0f75e 100644
--- a/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java
@@ -126,6 +126,9 @@ public class CreateNetworkCmd extends BaseCmd {
     @Parameter(name=ApiConstants.IP6_CIDR, type=CommandType.STRING, description="the CIDR of IPv6 network, must be at least /64")
     private String ip6Cidr;
 
+    @Parameter(name=ApiConstants.DISPLAY_NETWORK, type=CommandType.BOOLEAN, description="an optional field, whether to the display the network to the end user or not.")
+    private Boolean displayNetwork;
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -189,6 +192,10 @@ public class CreateNetworkCmd extends BaseCmd {
         return vpcId;
     }
 
+    public Boolean getDisplayNetwork() {
+        return displayNetwork;
+    }
+
     public Long getZoneId() {
         Long physicalNetworkId = getPhysicalNetworkId();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/network/RemoveNicDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/network/RemoveNicDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/RemoveNicDetailCmd.java
new file mode 100644
index 0000000..fe7503f
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/user/network/RemoveNicDetailCmd.java
@@ -0,0 +1,117 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for removeitional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.user.network;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+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.response.NicResponse;
+import org.apache.cloudstack.api.response.SuccessResponse;
+import org.apache.cloudstack.api.response.UserVmResponse;
+import org.apache.cloudstack.api.response.VolumeResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.async.AsyncJob;
+import com.cloud.event.EventTypes;
+import com.cloud.storage.Volume;
+import com.cloud.user.Account;
+import com.cloud.user.UserContext;
+
+@APICommand(name = "removeNicDetail", description="Removes detail for the volume.", since="4.2", responseObject=SuccessResponse.class)
+public class RemoveNicDetailCmd extends BaseAsyncCmd {
+    public static final Logger s_logger = Logger.getLogger(RemoveNicDetailCmd.class.getName());
+    private static final String s_name = "removeNicDetailresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=NicResponse.class,
+            required=true, description="the ID of the nic")
+    private Long id;
+
+    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
+            required=true, description="the name of the field")
+    private String name;
+
+    @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING,
+            required=true, description="the value of the field")
+    private String value;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+
+    public String getName() {
+        return name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    public AsyncJob.Type getInstanceType() {
+        return AsyncJob.Type.Volume;
+    }
+
+    public Long getInstanceId() {
+        return getId();
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        Volume volume = _responseGenerator.findVolumeById(getId());
+        if (volume == null) {
+            return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
+        }
+        return volume.getAccountId();
+    }
+
+    @Override
+    public String getEventType() {
+        return EventTypes.EVENT_VOLUME_ATTACH;
+    }
+
+    @Override
+    public String getEventDescription() {
+        return  "removing detail to the nic: " + getId();
+    }
+
+    @Override
+    public void execute(){
+        UserContext.current().setEventDetails("Nic Id: "+getId());
+        _networkService.removeNicDetail(this);
+        this.setResponseObject(new SuccessResponse(getCommandName()));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java
index 41aaaaa..a7f1fb3 100644
--- a/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java
@@ -67,6 +67,9 @@ public class UpdateNetworkCmd extends BaseAsyncCmd {
     @Parameter(name=ApiConstants.GUEST_VM_CIDR, type=CommandType.STRING, description="CIDR for Guest VMs,Cloudstack allocates IPs to Guest VMs only from this CIDR")
     private String guestVmCidr;
 
+    @Parameter(name=ApiConstants.DISPLAY_NETWORK, type=CommandType.BOOLEAN, description="an optional field, whether to the display the network to the end user or not.")
+    private Boolean displayNetwork;
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -101,6 +104,11 @@ public class UpdateNetworkCmd extends BaseAsyncCmd {
     private String getGuestVmCidr() {
         return guestVmCidr;
     }
+
+    public Boolean getDisplayNetwork() {
+        return displayNetwork;
+    }
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -132,10 +140,10 @@ public class UpdateNetworkCmd extends BaseAsyncCmd {
         Network result = null;
         if (network.getVpcId() != null) {
             result = _vpcService.updateVpcGuestNetwork(getId(), getNetworkName(), getDisplayText(), callerAccount,
-                    callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr(), getGuestVmCidr());
+                    callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr(), getGuestVmCidr(), getDisplayNetwork());
         } else {
             result = _networkService.updateGuestNetwork(getId(), getNetworkName(), getDisplayText(), callerAccount,
-                    callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr(), getGuestVmCidr());
+                    callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr(), getGuestVmCidr(), getDisplayNetwork());
         }
 
         if (result != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/network/UpdateNicDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/network/UpdateNicDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/UpdateNicDetailCmd.java
new file mode 100644
index 0000000..0e263e1
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/user/network/UpdateNicDetailCmd.java
@@ -0,0 +1,116 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for updateitional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.user.network;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+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.response.NicResponse;
+import org.apache.cloudstack.api.response.SuccessResponse;
+import org.apache.cloudstack.api.response.UserVmResponse;
+import org.apache.cloudstack.api.response.VolumeResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.async.AsyncJob;
+import com.cloud.event.EventTypes;
+import com.cloud.storage.Volume;
+import com.cloud.user.Account;
+import com.cloud.user.UserContext;
+
+@APICommand(name = "updateNicDetail", description="Updates detail for the nic.", since="4.2", responseObject=SuccessResponse.class)
+public class UpdateNicDetailCmd extends BaseAsyncCmd {
+    public static final Logger s_logger = Logger.getLogger(UpdateNicDetailCmd.class.getName());
+    private static final String s_name = "updateNicDetailresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=NicResponse.class,
+            required=true, description="the ID of the nic")
+    private Long id;
+
+    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
+            required=true, description="the name of the field")
+    private String name;
+
+    @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING,
+            required=true, description="the value of the field")
+    private String value;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+
+    public String getName() {
+        return name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    public AsyncJob.Type getInstanceType() {
+        return AsyncJob.Type.Volume;
+    }
+
+    public Long getInstanceId() {
+        return getId();
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        Volume volume = _responseGenerator.findVolumeById(getId());
+        if (volume == null) {
+            return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
+        }
+        return volume.getAccountId();
+    }
+
+    @Override
+    public String getEventType() {
+        return EventTypes.EVENT_VOLUME_ATTACH;
+    }
+
+    @Override
+    public String getEventDescription() {
+        return  "updating detail to the nic: " + getId();
+    }
+
+    @Override
+    public void execute(){
+        _networkService.updateNicDetail(this);
+        this.setResponseObject(new SuccessResponse(getCommandName()));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
index 21a45f8..1310538 100755
--- a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
@@ -172,6 +172,8 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
     @Parameter(name=ApiConstants.START_VM, type=CommandType.BOOLEAN, description="true if network offering supports specifying ip ranges; defaulted to true if not specified")
     private Boolean startVm;
 
+    @Parameter(name=ApiConstants.DISPLAY_VM, type=CommandType.BOOLEAN, since="4.2", description="an optional field, whether to the display the vm to the end user or not.")
+    private Boolean displayVm;
 
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
@@ -208,6 +210,10 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
         return HypervisorType.getType(hypervisor);
     }
 
+    public Boolean getDisplayVm() {
+        return displayVm;
+    }
+
     public List<Long> getSecurityGroupIdList() {
         if (securityGroupNameList != null && securityGroupIdList != null) {
             throw new InvalidParameterValueException("securitygroupids parameter is mutually exclusive with securitygroupnames parameter");
@@ -447,18 +453,18 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
                     throw new InvalidParameterValueException("Can't specify network Ids in Basic zone");
                 } else {
                     vm = _userVmService.createBasicSecurityGroupVirtualMachine(zone, serviceOffering, template, getSecurityGroupIdList(), owner, name,
-                                displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard);
+                                displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, displayVm, keyboard);
                 }
             } else {
                 if (zone.isSecurityGroupEnabled())  {
                     vm = _userVmService.createAdvancedSecurityGroupVirtualMachine(zone, serviceOffering, template, getNetworkIds(), getSecurityGroupIdList(),
-                                owner, name, displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard);
+                                owner, name, displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, displayVm, keyboard);
                 } else {
                     if (getSecurityGroupIdList() != null && !getSecurityGroupIdList().isEmpty()) {
                         throw new InvalidParameterValueException("Can't create vm with security groups; security group feature is not enabled per zone");
                     }
                     vm = _userVmService.createAdvancedVirtualMachine(zone, serviceOffering, template, getNetworkIds(), owner, name, displayName,
-                                diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard);
+                                diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, displayVm, keyboard);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
index ff8fff1..1d6a18e 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
@@ -64,6 +64,8 @@ public class UpdateVMCmd extends BaseCmd{
     @Parameter(name=ApiConstants.USER_DATA, type=CommandType.STRING, description="an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Currently only HTTP GET is supported. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding.", length=2048)
     private String userData;
 
+    @Parameter(name=ApiConstants.DISPLAY_VM, type=CommandType.BOOLEAN, description="an optional field, whether to the display the vm to the end user or not.")
+    private Boolean displayVm;
 
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
@@ -89,6 +91,10 @@ public class UpdateVMCmd extends BaseCmd{
         return userData;
     }
 
+    public Boolean getDisplayVm() {
+        return displayVm;
+    }
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -107,6 +113,7 @@ public class UpdateVMCmd extends BaseCmd{
     }
 
     @Override
+
     public long getEntityOwnerId() {
         UserVm userVm = _entityMgr.findById(UserVm.class, getId());
         if (userVm != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/volume/AddVolumeDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/AddVolumeDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/AddVolumeDetailCmd.java
new file mode 100644
index 0000000..e9eff59
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/AddVolumeDetailCmd.java
@@ -0,0 +1,115 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.user.volume;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+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.response.SuccessResponse;
+import org.apache.cloudstack.api.response.UserVmResponse;
+import org.apache.cloudstack.api.response.VolumeResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.async.AsyncJob;
+import com.cloud.event.EventTypes;
+import com.cloud.storage.Volume;
+import com.cloud.user.Account;
+import com.cloud.user.UserContext;
+
+@APICommand(name = "addVolumeDetail", description="Adds detail for the volume.", responseObject=SuccessResponse.class)
+public class AddVolumeDetailCmd extends BaseAsyncCmd {
+    public static final Logger s_logger = Logger.getLogger(AddVolumeDetailCmd.class.getName());
+    private static final String s_name = "addVolumeDetailresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class,
+            required=true, description="the ID of the disk volume")
+    private Long id;
+
+    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
+            required=true, description="the name of the field")
+    private String name;
+
+    @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING,
+            required=true, description="the value of the field")
+    private String value;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+
+    public String getName() {
+        return name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    public AsyncJob.Type getInstanceType() {
+        return AsyncJob.Type.Volume;
+    }
+
+    public Long getInstanceId() {
+        return getId();
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        Volume volume = _responseGenerator.findVolumeById(getId());
+        if (volume == null) {
+            return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
+        }
+        return volume.getAccountId();
+    }
+
+    @Override
+    public String getEventType() {
+        return EventTypes.EVENT_VOLUME_DETAIL_ADD;
+    }
+
+    @Override
+    public String getEventDescription() {
+        return  "adding detail to the volume: " + getId();
+    }
+
+    @Override
+    public void execute(){
+        _volumeService.addVolumeDetail(this);
+        this.setResponseObject(new SuccessResponse(getCommandName()));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/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 5db06bc..86a494b 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
@@ -76,8 +76,10 @@ public class CreateVolumeCmd extends BaseAsyncCreateCmd {
             description="the ID of the availability zone")
     private Long zoneId;
 
+    @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 ///////////////////////
     /////////////////////////////////////////////////////
 
@@ -114,6 +116,10 @@ public class CreateVolumeCmd extends BaseAsyncCreateCmd {
         return projectId;
     }
 
+    public Boolean getDisplayVolume() {
+        return displayVolume;
+    }
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailCmd.java
new file mode 100644
index 0000000..db53eb4
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailCmd.java
@@ -0,0 +1,11 @@
+package org.apache.cloudstack.api.command.user.volume;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: nitinmehta
+ * Date: 24/04/13
+ * Time: 5:18 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ListVolumeDetailCmd {
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailsCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailsCmd.java
new file mode 100644
index 0000000..a0424b6
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailsCmd.java
@@ -0,0 +1,82 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.user.volume;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListTaggedResourcesCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.response.*;
+import org.apache.log4j.Logger;
+
+import com.cloud.async.AsyncJob;
+
+import java.util.List;
+
+
+@APICommand(name = "listVolumeDetails", description="Lists all volume details.", responseObject=VolumeDetailResponse.class)
+public class ListVolumeDetailsCmd extends BaseListTaggedResourcesCmd {
+    public static final Logger s_logger = Logger.getLogger(ListVolumesCmd.class.getName());
+
+    private static final String s_name = "listvolumedetailsresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class,
+            required=true, description="the ID of the volume")
+    private Long id;
+
+    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the volume detail")
+    private String name;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+    public Long getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    @Override
+    public AsyncJob.Type getInstanceType() {
+        return AsyncJob.Type.Volume;
+    }
+
+    @Override
+    public void execute(){
+        ListResponse<VolumeDetailResponse> responses = new ListResponse<VolumeDetailResponse>();
+        List<VolumeDetailResponse> volumeDetailList = _queryService.searchForVolumeDetails(this);
+        responses.setResponses(volumeDetailList);
+        responses.setResponseName(getCommandName());
+        this.setResponseObject(responses);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/volume/RemoveVolumeDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/RemoveVolumeDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/RemoveVolumeDetailCmd.java
new file mode 100644
index 0000000..9e3c1c6
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/RemoveVolumeDetailCmd.java
@@ -0,0 +1,107 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.user.volume;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+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.response.SuccessResponse;
+import org.apache.cloudstack.api.response.UserVmResponse;
+import org.apache.cloudstack.api.response.VolumeResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.async.AsyncJob;
+import com.cloud.event.EventTypes;
+import com.cloud.storage.Volume;
+import com.cloud.user.Account;
+import com.cloud.user.UserContext;
+
+@APICommand(name = "removeVolumeDetail", description="Remove a particular detail for the volume.", responseObject=VolumeResponse.class)
+public class RemoveVolumeDetailCmd extends BaseAsyncCmd {
+    public static final Logger s_logger = Logger.getLogger(AttachVolumeCmd.class.getName());
+    private static final String s_name = "removeVolumeDetailresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class,
+            required=true, description="the ID of the disk volume")
+    private Long id;
+
+    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
+            required=true, description="the name of the field")
+    private String name;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+
+    public String getName() {
+        return name;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    public AsyncJob.Type getInstanceType() {
+        return AsyncJob.Type.Volume;
+    }
+
+    public Long getInstanceId() {
+        return getId();
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        Volume volume = _responseGenerator.findVolumeById(getId());
+        if (volume == null) {
+            return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
+        }
+        return volume.getAccountId();
+    }
+
+    @Override
+    public String getEventType() {
+        return EventTypes.EVENT_VOLUME_ATTACH;
+    }
+
+    @Override
+    public String getEventDescription() {
+        return  "adding detail to the volume: " + getId();
+    }
+
+    @Override
+    public void execute(){
+        _volumeService.removeVolumeDetail(this);
+        this.setResponseObject(new SuccessResponse(getCommandName()));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
new file mode 100644
index 0000000..1f35a43
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
@@ -0,0 +1,121 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.user.volume;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+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.response.UserVmResponse;
+import org.apache.cloudstack.api.response.VolumeResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.async.AsyncJob;
+import com.cloud.event.EventTypes;
+import com.cloud.storage.Volume;
+import com.cloud.user.Account;
+import com.cloud.user.UserContext;
+
+@APICommand(name = "updateVolumeDetail", description="Updates the volume.", responseObject=VolumeResponse.class)
+public class UpdateVolumeCmd extends BaseAsyncCmd {
+    public static final Logger s_logger = Logger.getLogger(AttachVolumeCmd.class.getName());
+    private static final String s_name = "addVolumeDetailresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class,
+            required=true, description="the ID of the disk volume")
+    private Long id;
+
+    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
+            required=true, description="the name of the field")
+    private String name;
+
+    @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING, entityType=UserVmResponse.class,
+            required=true, description="the value of the field")
+    private String value;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+
+    public String getName() {
+        return name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    public AsyncJob.Type getInstanceType() {
+        return AsyncJob.Type.Volume;
+    }
+
+    public Long getInstanceId() {
+        return getId();
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        Volume volume = _responseGenerator.findVolumeById(getId());
+        if (volume == null) {
+            return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
+        }
+        return volume.getAccountId();
+    }
+
+    @Override
+    public String getEventType() {
+        return EventTypes.EVENT_VOLUME_ATTACH;
+    }
+
+    @Override
+    public String getEventDescription() {
+        return  "adding detail to the volume: " + getId();
+    }
+
+    @Override
+    public void execute(){
+        UserContext.current().setEventDetails("Volume Id: "+getId());
+        /*Volume result = _volumeService.attachVolumeToVM(this);
+        if (result != null) {
+            VolumeResponse response = _responseGenerator.createVolumeResponse(result);
+            response.setResponseName(getCommandName());
+            this.setResponseObject(response);
+        } else {
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to attach volume");
+        } */
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeDetailCmd.java
new file mode 100644
index 0000000..8a43c6e
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeDetailCmd.java
@@ -0,0 +1,115 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.user.volume;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+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.response.SuccessResponse;
+import org.apache.cloudstack.api.response.UserVmResponse;
+import org.apache.cloudstack.api.response.VolumeResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.async.AsyncJob;
+import com.cloud.event.EventTypes;
+import com.cloud.storage.Volume;
+import com.cloud.user.Account;
+import com.cloud.user.UserContext;
+
+@APICommand(name = "updateVolumeDetail", description="Updates the volume detail.", responseObject=VolumeResponse.class)
+public class UpdateVolumeDetailCmd extends BaseAsyncCmd {
+    public static final Logger s_logger = Logger.getLogger(AttachVolumeCmd.class.getName());
+    private static final String s_name = "updateVolumeDetailresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class,
+            required=true, description="the ID of the disk volume")
+    private Long id;
+
+    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
+            required=true, description="the name of the field")
+    private String name;
+
+    @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING, entityType=UserVmResponse.class,
+            required=true, description="the value of the field")
+    private String value;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+
+    public String getName() {
+        return name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    public AsyncJob.Type getInstanceType() {
+        return AsyncJob.Type.Volume;
+    }
+
+    public Long getInstanceId() {
+        return getId();
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        Volume volume = _responseGenerator.findVolumeById(getId());
+        if (volume == null) {
+            return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
+        }
+        return volume.getAccountId();
+    }
+
+    @Override
+    public String getEventType() {
+        return EventTypes.EVENT_VOLUME_ATTACH;
+    }
+
+    @Override
+    public String getEventDescription() {
+        return  "updating detail to the volume: " + getId();
+    }
+
+    @Override
+    public void execute(){
+        _volumeService.updateVolumeDetails(this);
+        this.setResponseObject(new SuccessResponse(getCommandName()));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
index 04c318f..377e66e 100644
--- a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
@@ -58,8 +58,20 @@ public class DiskOfferingResponse extends BaseResponse {
     @SerializedName("storagetype") @Param(description="the storage type for this disk offering")
     private String storageType;
 
+    @SerializedName("displayoffering") @Param(description="whether to display the offering to the end user or not.")
+    private Boolean displayOffering;
+
+    public Boolean getDisplayOffering() {
+        return displayOffering;
+    }
+
+    public void setDisplayOffering(Boolean displayOffering) {
+        this.displayOffering = displayOffering;
+    }
+
     public String getId() {
         return id;
+
     }
 
     public void setId(String id) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/NetworkResponse.java b/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
index cd32ded..c664334 100644
--- a/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
@@ -159,7 +159,18 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
     
     @SerializedName(ApiConstants.IP6_CIDR) @Param(description="the cidr of IPv6 network")
     private String ip6Cidr;
-    
+
+    @SerializedName(ApiConstants.DISPLAY_NETWORK) @Param(description="an optional field, whether to the display the network to the end user or not.")
+    private Boolean displayNetwork;
+
+    public Boolean getDisplayNetwork() {
+        return displayNetwork;
+    }
+
+    public void setDisplayNetwork(Boolean displayNetwork) {
+        this.displayNetwork = displayNetwork;
+    }
+
     public void setId(String id) {
         this.id = id;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/response/UserVmResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/UserVmResponse.java b/api/src/org/apache/cloudstack/api/response/UserVmResponse.java
index 71d1b82..bffe7ab 100644
--- a/api/src/org/apache/cloudstack/api/response/UserVmResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/UserVmResponse.java
@@ -169,6 +169,9 @@ public class UserVmResponse extends BaseResponse implements ControlledEntityResp
     @SerializedName(ApiConstants.SSH_KEYPAIR) @Param(description="ssh key-pair")
     private String keyPairName;
 
+    @SerializedName(ApiConstants.DISPLAY_VM) @Param(description="an optional field whether to the display the vm to the end user or not.")
+    private Boolean displayVm;
+
     public UserVmResponse(){
         securityGroupList = new LinkedHashSet<SecurityGroupResponse>();
         nics = new LinkedHashSet<NicResponse>();
@@ -187,7 +190,13 @@ public class UserVmResponse extends BaseResponse implements ControlledEntityResp
         return this.id;
     }
 
+    public Boolean getDisplayVm() {
+        return displayVm;
+    }
 
+    public void setDisplayVm(Boolean displayVm) {
+        this.displayVm = displayVm;
+    }
 
     @Override
     public String getObjectId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/response/VolumeDetailResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/VolumeDetailResponse.java b/api/src/org/apache/cloudstack/api/response/VolumeDetailResponse.java
new file mode 100644
index 0000000..3a8fab9
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/response/VolumeDetailResponse.java
@@ -0,0 +1,82 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.response;
+
+import java.util.Date;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.EntityReference;
+
+import com.cloud.serializer.Param;
+import com.cloud.storage.Volume;
+import com.google.gson.annotations.SerializedName;
+
+@SuppressWarnings("unused")
+public class VolumeDetailResponse extends BaseResponse{
+    @SerializedName(ApiConstants.VOLUME_ID)
+    @Param(description = "ID of the volume")
+    private String id;
+
+    @SerializedName(ApiConstants.NAME)
+    @Param(description = "name of the volume detail")
+    private String name;
+
+
+    @SerializedName(ApiConstants.VALUE)
+    @Param(description = "value of the volume detail")
+    private String value;
+
+    @SerializedName(ApiConstants.DISPLAY_VOLUME) @Param(description="an optional field whether to the display the volume to the end user or not.")
+    private Boolean displayVm;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getName() {
+
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Boolean getDisplayVm() {
+        return displayVm;
+    }
+
+    public void setDisplayVm(Boolean displayVm) {
+        this.displayVm = displayVm;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
index d5054f0..0af9175 100644
--- a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
@@ -161,6 +161,9 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
     @SerializedName(ApiConstants.TAGS)  @Param(description="the list of resource tags associated with volume", responseObject = ResourceTagResponse.class)
     private Set<ResourceTagResponse> tags;
 
+    @SerializedName(ApiConstants.DISPLAY_VOLUME) @Param(description="an optional field whether to the display the volume to the end user or not.")
+    private Boolean displayVm;
+
     public VolumeResponse(){
         tags = new LinkedHashSet<ResourceTagResponse>();
     }
@@ -316,4 +319,13 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
     public void addTag(ResourceTagResponse tag){
         this.tags.add(tag);
     }
+
+    public Boolean getDisplayVm() {
+        return displayVm;
+    }
+
+    public void setDisplayVm(Boolean displayVm) {
+        this.displayVm = displayVm;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/src/org/apache/cloudstack/query/QueryService.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/query/QueryService.java b/api/src/org/apache/cloudstack/query/QueryService.java
index c3f86aa..ceb2974 100644
--- a/api/src/org/apache/cloudstack/query/QueryService.java
+++ b/api/src/org/apache/cloudstack/query/QueryService.java
@@ -32,30 +32,15 @@ import org.apache.cloudstack.api.command.user.securitygroup.ListSecurityGroupsCm
 import org.apache.cloudstack.api.command.user.tag.ListTagsCmd;
 import org.apache.cloudstack.api.command.user.vm.ListVMsCmd;
 import org.apache.cloudstack.api.command.user.vmgroup.ListVMGroupsCmd;
+import org.apache.cloudstack.api.command.user.volume.ListVolumeDetailsCmd;
 import org.apache.cloudstack.api.command.user.volume.ListVolumesCmd;
 import org.apache.cloudstack.api.command.user.zone.ListZonesByCmd;
-import org.apache.cloudstack.api.response.AccountResponse;
-import org.apache.cloudstack.api.response.AsyncJobResponse;
-import org.apache.cloudstack.api.response.DiskOfferingResponse;
-import org.apache.cloudstack.api.response.DomainRouterResponse;
-import org.apache.cloudstack.api.response.EventResponse;
-import org.apache.cloudstack.api.response.HostResponse;
-import org.apache.cloudstack.api.response.InstanceGroupResponse;
-import org.apache.cloudstack.api.response.ListResponse;
-import org.apache.cloudstack.api.response.ProjectAccountResponse;
-import org.apache.cloudstack.api.response.ProjectInvitationResponse;
-import org.apache.cloudstack.api.response.ProjectResponse;
-import org.apache.cloudstack.api.response.ResourceTagResponse;
-import org.apache.cloudstack.api.response.SecurityGroupResponse;
-import org.apache.cloudstack.api.response.ServiceOfferingResponse;
-import org.apache.cloudstack.api.response.StoragePoolResponse;
-import org.apache.cloudstack.api.response.UserResponse;
-import org.apache.cloudstack.api.response.UserVmResponse;
-import org.apache.cloudstack.api.response.VolumeResponse;
-import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.cloudstack.api.response.*;
 
 import com.cloud.exception.PermissionDeniedException;
 
+import java.util.List;
+
 /**
  * Service used for list api query.
  *
@@ -97,4 +82,7 @@ public interface QueryService {
     public ListResponse<ServiceOfferingResponse>  searchForServiceOfferings(ListServiceOfferingsCmd cmd);
 
     public ListResponse<ZoneResponse>  listDataCenters(ListZonesByCmd cmd);
-}
+
+    public List<VolumeDetailResponse> searchForVolumeDetails(ListVolumeDetailsCmd cmd);
+
+    }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/test/org/apache/cloudstack/api/command/test/AddNicDetailCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/AddNicDetailCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddNicDetailCmdTest.java
new file mode 100644
index 0000000..6c43fd8
--- /dev/null
+++ b/api/test/org/apache/cloudstack/api/command/test/AddNicDetailCmdTest.java
@@ -0,0 +1,62 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.test;
+
+import com.cloud.network.NetworkService;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.cloudstack.api.ResponseGenerator;
+
+import org.apache.cloudstack.api.command.user.network.AddNicDetailCmd;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
+import static org.mockito.Mockito.*;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+
+public class AddNicDetailCmdTest extends TestCase{
+
+    private AddNicDetailCmd addNicDetailCmd;
+    private ResponseGenerator responseGenerator;
+
+    @Rule
+    public ExpectedException expectedException = ExpectedException.none();
+
+    @Before
+    public void setUp() {
+
+        addNicDetailCmd = new AddNicDetailCmd();
+
+    }
+
+
+    @Test
+    public void testCreateSuccess() {
+
+        NetworkService networkService = Mockito.mock(NetworkService.class);
+        doNothing().when(networkService).addNicDetail(addNicDetailCmd);
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/test/org/apache/cloudstack/api/command/test/AddVolumeDetailCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/AddVolumeDetailCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddVolumeDetailCmdTest.java
new file mode 100644
index 0000000..d501439
--- /dev/null
+++ b/api/test/org/apache/cloudstack/api/command/test/AddVolumeDetailCmdTest.java
@@ -0,0 +1,62 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.test;
+
+import com.cloud.storage.VolumeApiService;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.cloudstack.api.ResponseGenerator;
+
+import org.apache.cloudstack.api.command.user.volume.AddVolumeDetailCmd;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
+import static org.mockito.Mockito.*;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+
+public class AddVolumeDetailCmdTest extends TestCase{
+
+    private AddVolumeDetailCmd addVolumeDetailCmd;
+    private ResponseGenerator responseGenerator;
+
+    @Rule
+    public ExpectedException expectedException = ExpectedException.none();
+
+    @Before
+    public void setUp() {
+
+        addVolumeDetailCmd = new AddVolumeDetailCmd();
+
+    }
+
+
+    @Test
+    public void testCreateSuccess() {
+
+        VolumeApiService volumeService = Mockito.mock(VolumeApiService.class);
+        doNothing().when(volumeService).addVolumeDetail(addVolumeDetailCmd);
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3958cda/api/test/org/apache/cloudstack/api/command/test/RemoveNicDetailCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/RemoveNicDetailCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/RemoveNicDetailCmdTest.java
new file mode 100644
index 0000000..607255c
--- /dev/null
+++ b/api/test/org/apache/cloudstack/api/command/test/RemoveNicDetailCmdTest.java
@@ -0,0 +1,62 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for removeitional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.test;
+
+import com.cloud.network.NetworkService;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.cloudstack.api.ResponseGenerator;
+
+import org.apache.cloudstack.api.command.user.network.RemoveNicDetailCmd;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
+import static org.mockito.Mockito.*;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+
+public class RemoveNicDetailCmdTest extends TestCase{
+
+    private RemoveNicDetailCmd removeNicDetailCmd;
+    private ResponseGenerator responseGenerator;
+
+    @Rule
+    public ExpectedException expectedException = ExpectedException.none();
+
+    @Before
+    public void setUp() {
+
+        removeNicDetailCmd = new RemoveNicDetailCmd();
+
+    }
+
+
+    @Test
+    public void testCreateSuccess() {
+
+        NetworkService networkService = Mockito.mock(NetworkService.class);
+        doNothing().when(networkService).removeNicDetail(removeNicDetailCmd);
+
+    }
+
+}


Mime
View raw message