cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject [03/54] [abbrv] Merge branch 'master' into rbac.
Date Fri, 14 Mar 2014 10:37:16 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java
index 1bb7cc8,61e9428..63eb12b
--- a/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java
@@@ -42,7 -41,8 +42,8 @@@ import org.apache.cloudstack.context.Ca
  import com.cloud.exception.ResourceAllocationException;
  import com.cloud.template.VirtualMachineTemplate;
  
- @APICommand(name = "registerTemplate", description = "Registers an existing template into the CloudStack cloud. ", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted)
 -@APICommand(name = "registerTemplate", description = "Registers an existing template into the CloudStack cloud. ", responseObject = TemplateResponse.class,
++@APICommand(name = "registerTemplate", description = "Registers an existing template into the CloudStack cloud. ", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted,
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class RegisterTemplateCmd extends BaseCmd {
      public static final Logger s_logger = Logger.getLogger(RegisterTemplateCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java
index f7a2ac2,bad3a2f..81da7ee
--- a/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java
@@@ -28,7 -27,8 +28,8 @@@ import org.apache.cloudstack.api.respon
  import com.cloud.template.VirtualMachineTemplate;
  import com.cloud.user.Account;
  
- @APICommand(name = "updateTemplate", description = "Updates attributes of a template.", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted)
 -@APICommand(name = "updateTemplate", description = "Updates attributes of a template.", responseObject = TemplateResponse.class,
++@APICommand(name = "updateTemplate", description = "Updates attributes of a template.", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted,
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class UpdateTemplateCmd extends BaseUpdateTemplateOrIsoCmd {
      public static final Logger s_logger = Logger.getLogger(UpdateTemplateCmd.class.getName());
      private static final String s_name = "updatetemplateresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java
index b2aee46,4c94e57..d5d0c58
--- a/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java
@@@ -28,7 -27,8 +28,8 @@@ import com.cloud.user.Account
  
  @APICommand(name = "updateTemplatePermissions", responseObject = SuccessResponse.class, description = "Updates a template visibility permissions. "
      + "A public template is visible to all accounts within the same domain. " + "A private template is visible only to the owner of the template. "
-         + "A priviledged template is a private template with account permissions added. " + "Only accounts specified under the template permissions are visible to them.", entityType = {IAMEntityType.VirtualMachineTemplate})
 -    + "A priviledged template is a private template with account permissions added. " + "Only accounts specified under the template permissions are visible to them.",
++    + "A priviledged template is a private template with account permissions added. " + "Only accounts specified under the template permissions are visible to them.", entityType = {IAMEntityType.VirtualMachineTemplate},
+     requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class UpdateTemplatePermissionsCmd extends BaseUpdateTemplateOrIsoPermissionsCmd {
      @Override
      protected String getResponseName() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/AddNicToVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/AddNicToVMCmd.java
index 7857594,46a2010..a1bbe2a
--- a/api/src/org/apache/cloudstack/api/command/user/vm/AddNicToVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/AddNicToVMCmd.java
@@@ -40,7 -36,8 +40,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- @APICommand(name = "addNicToVirtualMachine", description = "Adds VM to specified network by creating a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "addNicToVirtualMachine", description = "Adds VM to specified network by creating a NIC", responseObject = UserVmResponse.class,
++@APICommand(name = "addNicToVirtualMachine", description = "Adds VM to specified network by creating a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class AddNicToVMCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(AddNicToVMCmd.class);
      private static final String s_name = "addnictovirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
index 4be416a,c6f4e19..7d55974
--- a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
@@@ -24,9 -24,7 +24,10 @@@ import java.util.LinkedHashMap
  import java.util.List;
  import java.util.Map;
  
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
+ import org.apache.cloudstack.acl.RoleType;
  import org.apache.cloudstack.acl.SecurityChecker.AccessType;
  import org.apache.cloudstack.affinity.AffinityGroupResponse;
  import org.apache.cloudstack.api.ACL;
@@@ -68,7 -66,8 +69,8 @@@ import com.cloud.template.VirtualMachin
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- @APICommand(name = "deployVirtualMachine", description = "Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "deployVirtualMachine", description = "Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.", responseObject = UserVmResponse.class,
++@APICommand(name = "deployVirtualMachine", description = "Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine },
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd {
      public static final Logger s_logger = Logger.getLogger(DeployVMCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java
index c34e427,9bfd611..b8ac561
--- a/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java
@@@ -40,7 -36,11 +40,9 @@@ import com.cloud.exception.ResourceUnav
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- @APICommand(name = "destroyVirtualMachine", description = "Destroys a virtual machine. Once destroyed, only the administrator can recover it.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "destroyVirtualMachine",
 -            description = "Destroys a virtual machine. Once destroyed, only the administrator can recover it.",
 -            responseObject = UserVmResponse.class,
++@APICommand(name = "destroyVirtualMachine", description = "Destroys a virtual machine. Once destroyed, only the administrator can recover it.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+             requestHasSensitiveInfo = false,
+             responseHasSensitiveInfo = true)
  public class DestroyVMCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(DestroyVMCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java
index 50fa761,6c63213..ebee189
--- a/api/src/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java
@@@ -33,7 -30,8 +33,8 @@@ import org.apache.cloudstack.api.respon
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- @APICommand(name = "getVMPassword", responseObject = GetVMPasswordResponse.class, description = "Returns an encrypted password for the VM", entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "getVMPassword", responseObject = GetVMPasswordResponse.class, description = "Returns an encrypted password for the VM",
++@APICommand(name = "getVMPassword", responseObject = GetVMPasswordResponse.class, description = "Returns an encrypted password for the VM", entityType = {IAMEntityType.VirtualMachine},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class GetVMPasswordCmd extends BaseCmd {
      public static final Logger s_logger = Logger.getLogger(GetVMPasswordCmd.class.getName());
      private static final String s_name = "getvmpasswordresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
index e6111fb,1a564f6..d1e5c09
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
@@@ -20,9 -20,7 +20,10 @@@ import java.util.ArrayList
  import java.util.EnumSet;
  import java.util.List;
  
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
+ import org.apache.cloudstack.acl.RoleType;
  import org.apache.cloudstack.affinity.AffinityGroupResponse;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiCommandJobType;
@@@ -45,8 -43,9 +47,9 @@@ import org.apache.cloudstack.api.respon
  
  import com.cloud.exception.InvalidParameterValueException;
  
 -@APICommand(name = "listVirtualMachines", description = "List the virtual machines owned by the account.", responseObject = UserVmResponse.class,
 +
- @APICommand(name = "listVirtualMachines", description = "List the virtual machines owned by the account.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
++@APICommand(name = "listVirtualMachines", description = "List the virtual machines owned by the account.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine },
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class ListVMsCmd extends BaseListTaggedResourcesCmd {
      public static final Logger s_logger = Logger.getLogger(ListVMsCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java
index 9904415,c54d62f..8f04430
--- a/api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java
@@@ -38,7 -34,8 +38,8 @@@ import com.cloud.exception.ResourceUnav
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- @APICommand(name = "rebootVirtualMachine", description = "Reboots a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "rebootVirtualMachine", description = "Reboots a virtual machine.", responseObject = UserVmResponse.class,
++@APICommand(name = "rebootVirtualMachine", description = "Reboots a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class RebootVMCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(RebootVMCmd.class.getName());
      private static final String s_name = "rebootvirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java
index b81b8a9,c83bcda..75eafa9
--- a/api/src/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java
@@@ -37,7 -37,8 +37,9 @@@ import com.cloud.network.Network
  import com.cloud.user.Account;
  import com.cloud.vm.NicSecondaryIp;
  
- @APICommand(name = "removeIpFromNic", description = "Assigns secondary IP to NIC.", responseObject = SuccessResponse.class)
++
+ @APICommand(name = "removeIpFromNic", description = "Removes secondary IP from the NIC.", responseObject = SuccessResponse.class,
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class RemoveIpFromVmNicCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(RemoveIpFromVmNicCmd.class.getName());
      private static final String s_name = "removeipfromnicresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/RemoveNicFromVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/RemoveNicFromVMCmd.java
index 904f266,eb4f454..44dfcf6
--- a/api/src/org/apache/cloudstack/api/command/user/vm/RemoveNicFromVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/RemoveNicFromVMCmd.java
@@@ -40,7 -36,8 +40,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- @APICommand(name = "removeNicFromVirtualMachine", description = "Removes VM from specified network by deleting a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "removeNicFromVirtualMachine", description = "Removes VM from specified network by deleting a NIC", responseObject = UserVmResponse.class,
++@APICommand(name = "removeNicFromVirtualMachine", description = "Removes VM from specified network by deleting a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class RemoveNicFromVMCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(RemoveNicFromVMCmd.class);
      private static final String s_name = "removenicfromvirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java
index a6f132a,e8d5f73..2fd508b
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java
@@@ -38,9 -34,9 +38,10 @@@ import com.cloud.exception.ResourceUnav
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
 -@APICommand(name = "resetPasswordForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the password for virtual machine. "
 -    + "The virtual machine must be in a \"Stopped\" state and the template must already " + "support this feature for this command to take effect. [async]",
 +@APICommand(name = "resetPasswordForVirtualMachine", responseObject=UserVmResponse.class, description="Resets the password for virtual machine. " +
 +                    "The virtual machine must be in a \"Stopped\" state and the template must already " +
-  "support this feature for this command to take effect. [async]", responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
++        "support this feature for this command to take effect. [async]", responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+     requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class ResetVMPasswordCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(ResetVMPasswordCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java
index bdbd553,318d3c8..288eed7
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java
@@@ -41,8 -37,9 +41,9 @@@ import com.cloud.exception.ResourceUnav
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
 -@APICommand(name = "resetSSHKeyForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the SSH Key for virtual machine. "
 -    + "The virtual machine must be in a \"Stopped\" state. [async]",
 +@APICommand(name = "resetSSHKeyForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the SSH Key for virtual machine. " +
-  "The virtual machine must be in a \"Stopped\" state. [async]", responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
++        "The virtual machine must be in a \"Stopped\" state. [async]", responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+     requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class ResetVMSSHKeyCmd extends BaseAsyncCmd {
  
      public static final Logger s_logger = Logger.getLogger(ResetVMSSHKeyCmd.class.getName());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
index 7844028,7c35680..9befc67
--- a/api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
@@@ -40,7 -36,12 +40,9 @@@ import com.cloud.exception.ResourceUnav
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- @APICommand(name = "restoreVirtualMachine", description = "Restore a VM to original template/ISO or new template/ISO", responseObject = UserVmResponse.class, since = "3.0.0", responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "restoreVirtualMachine",
 -            description = "Restore a VM to original template/ISO or new template/ISO",
 -            responseObject = UserVmResponse.class,
 -            since = "3.0.0",
++@APICommand(name = "restoreVirtualMachine", description = "Restore a VM to original template/ISO or new template/ISO", responseObject = UserVmResponse.class, since = "3.0.0", responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+             requestHasSensitiveInfo = false,
+             responseHasSensitiveInfo = true)
  public class RestoreVMCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(RestoreVMCmd.class);
      private static final String s_name = "restorevmresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
index acc4578,fe752cb..cd658cb
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
@@@ -47,8 -43,8 +47,9 @@@ import com.cloud.exception.VirtualMachi
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
 -@APICommand(name = "scaleVirtualMachine", description = "Scales the virtual machine to a new service offering.", responseObject = SuccessResponse.class,
 +
- @APICommand(name = "scaleVirtualMachine", description = "Scales the virtual machine to a new service offering.", responseObject = SuccessResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
++@APICommand(name = "scaleVirtualMachine", description = "Scales the virtual machine to a new service offering.", responseObject = SuccessResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class ScaleVMCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(ScaleVMCmd.class.getName());
      private static final String s_name = "scalevirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java
index 8237c0f,a59dc6e..2e4187d
--- a/api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java
@@@ -44,7 -40,8 +44,8 @@@ import com.cloud.user.Account
  import com.cloud.uservm.UserVm;
  import com.cloud.utils.exception.ExecutionException;
  
- @APICommand(name = "startVirtualMachine", responseObject = UserVmResponse.class, description = "Starts a virtual machine.", responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "startVirtualMachine", responseObject = UserVmResponse.class, description = "Starts a virtual machine.",
++@APICommand(name = "startVirtualMachine", responseObject = UserVmResponse.class, description = "Starts a virtual machine.", responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class StartVMCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(StartVMCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java
index 6a448ba,b547357..fe94964
--- a/api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java
@@@ -37,7 -34,8 +37,8 @@@ import com.cloud.exception.ConcurrentOp
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- @APICommand(name = "stopVirtualMachine", responseObject = UserVmResponse.class, description = "Stops a virtual machine.", responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "stopVirtualMachine", responseObject = UserVmResponse.class, description = "Stops a virtual machine.",
++@APICommand(name = "stopVirtualMachine", responseObject = UserVmResponse.class, description = "Stops a virtual machine.", responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class StopVMCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(StopVMCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/UpdateDefaultNicForVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/UpdateDefaultNicForVMCmd.java
index 6d32c96,26af16e..c70f7e5
--- a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateDefaultNicForVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateDefaultNicForVMCmd.java
@@@ -40,8 -36,8 +40,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- 
- @APICommand(name = "updateDefaultNicForVirtualMachine", description = "Changes the default NIC on a VM", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "updateDefaultNicForVirtualMachine", description = "Changes the default NIC on a VM", responseObject = UserVmResponse.class,
++@APICommand(name = "updateDefaultNicForVirtualMachine", description = "Changes the default NIC on a VM", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class UpdateDefaultNicForVMCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(UpdateDefaultNicForVMCmd.class);
      private static final String s_name = "updatedefaultnicforvirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
index 4d74574,eb3b955..fac82aa
--- a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
@@@ -16,11 -16,7 +16,12 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.vm;
  
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
+ import org.apache.cloudstack.acl.RoleType;
 +import org.apache.cloudstack.acl.SecurityChecker.AccessType;
 +import org.apache.cloudstack.api.ACL;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiConstants;
  import org.apache.cloudstack.api.ApiErrorCode;
@@@ -37,10 -33,10 +38,10 @@@ import com.cloud.exception.ResourceUnav
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- 
 -@APICommand(name = "updateVirtualMachine", description = "Updates properties of a virtual machine. The VM has to be stopped and restarted for the "
 -    + "new properties to take effect. UpdateVirtualMachine does not first check whether the VM is stopped. "
 -    + "Therefore, stop the VM manually before issuing this call.", responseObject = UserVmResponse.class,
 +@APICommand(name = "updateVirtualMachine", description="Updates properties of a virtual machine. The VM has to be stopped and restarted for the " +
 +        "new properties to take effect. UpdateVirtualMachine does not first check whether the VM is stopped. " +
-  "Therefore, stop the VM manually before issuing this call.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
++        "Therefore, stop the VM manually before issuing this call.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+     requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class UpdateVMCmd extends BaseCustomIdCmd {
      public static final Logger s_logger = Logger.getLogger(UpdateVMCmd.class.getName());
      private static final String s_name = "updatevirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java
index ec06070,46cce80..7282eba
--- a/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java
@@@ -43,9 -38,9 +43,10 @@@ import com.cloud.offering.ServiceOfferi
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
 -@APICommand(name = "changeServiceForVirtualMachine", responseObject = UserVmResponse.class, description = "Changes the service offering for a virtual machine. "
 -        + "The virtual machine must be in a \"Stopped\" state for " + "this command to take effect.",
 +@APICommand(name = "changeServiceForVirtualMachine", responseObject=UserVmResponse.class, description="Changes the service offering for a virtual machine. " +
 +                                            "The virtual machine must be in a \"Stopped\" state for " +
-  "this command to take effect.", responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
++        "this command to take effect.", responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class UpgradeVMCmd extends BaseCmd {
      public static final Logger s_logger = Logger.getLogger(UpgradeVMCmd.class.getName());
      private static final String s_name = "changeserviceforvirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java
index a8cca68,4676def..30b3ac8
--- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java
@@@ -32,7 -31,8 +32,8 @@@ import org.apache.cloudstack.context.Ca
  
  import com.cloud.vm.InstanceGroup;
  
- @APICommand(name = "createInstanceGroup", description = "Creates a vm group", responseObject = InstanceGroupResponse.class, entityType = { IAMEntityType.InstanceGroup })
 -@APICommand(name = "createInstanceGroup", description = "Creates a vm group", responseObject = InstanceGroupResponse.class,
++@APICommand(name = "createInstanceGroup", description = "Creates a vm group", responseObject = InstanceGroupResponse.class, entityType = {IAMEntityType.InstanceGroup},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class CreateVMGroupCmd extends BaseCmd {
      public static final Logger s_logger = Logger.getLogger(CreateVMGroupCmd.class.getName());
  
@@@ -104,7 -104,7 +105,7 @@@
          if (result != null) {
              InstanceGroupResponse response = _responseGenerator.createInstanceGroupResponse(result);
              response.setResponseName(getCommandName());
--            this.setResponseObject(response);
++            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm instance group");
          }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java
index 5b4ff8c,f88f45e..0bc5236
--- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java
@@@ -33,7 -30,8 +33,8 @@@ import org.apache.cloudstack.api.respon
  import com.cloud.user.Account;
  import com.cloud.vm.InstanceGroup;
  
- @APICommand(name = "deleteInstanceGroup", description = "Deletes a vm group", responseObject = SuccessResponse.class, entityType = { IAMEntityType.InstanceGroup })
 -@APICommand(name = "deleteInstanceGroup", description = "Deletes a vm group", responseObject = SuccessResponse.class,
++@APICommand(name = "deleteInstanceGroup", description = "Deletes a vm group", responseObject = SuccessResponse.class, entityType = {IAMEntityType.InstanceGroup},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class DeleteVMGroupCmd extends BaseCmd {
      public static final Logger s_logger = Logger.getLogger(DeleteVMGroupCmd.class.getName());
      private static final String s_name = "deleteinstancegroupresponse";
@@@ -78,7 -75,7 +79,7 @@@
          boolean result = _userVmService.deleteVmGroup(this);
          if (result) {
              SuccessResponse response = new SuccessResponse(getCommandName());
--            this.setResponseObject(response);
++            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete vm group");
          }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java
index 99aeaf8,6d58260..e9844dd
--- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java
@@@ -26,7 -25,8 +26,8 @@@ import org.apache.cloudstack.api.Parame
  import org.apache.cloudstack.api.response.InstanceGroupResponse;
  import org.apache.cloudstack.api.response.ListResponse;
  
- @APICommand(name = "listInstanceGroups", description = "Lists vm groups", responseObject = InstanceGroupResponse.class, entityType = { IAMEntityType.InstanceGroup })
 -@APICommand(name = "listInstanceGroups", description = "Lists vm groups", responseObject = InstanceGroupResponse.class,
++@APICommand(name = "listInstanceGroups", description = "Lists vm groups", responseObject = InstanceGroupResponse.class, entityType = {IAMEntityType.InstanceGroup},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class ListVMGroupsCmd extends BaseListProjectAndAccountResourcesCmd {
      public static final Logger s_logger = Logger.getLogger(ListVMGroupsCmd.class.getName());
  
@@@ -67,6 -67,6 +68,6 @@@
      public void execute() {
          ListResponse<InstanceGroupResponse> response = _queryService.searchForVmGroups(this);
          response.setResponseName(getCommandName());
--        this.setResponseObject(response);
++        setResponseObject(response);
      }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java
index d2f3b46,cc738cd..e06ec52
--- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java
@@@ -32,7 -29,8 +32,8 @@@ import org.apache.cloudstack.api.respon
  import com.cloud.user.Account;
  import com.cloud.vm.InstanceGroup;
  
- @APICommand(name = "updateInstanceGroup", description = "Updates a vm group", responseObject = InstanceGroupResponse.class, entityType = { IAMEntityType.InstanceGroup })
 -@APICommand(name = "updateInstanceGroup", description = "Updates a vm group", responseObject = InstanceGroupResponse.class,
++@APICommand(name = "updateInstanceGroup", description = "Updates a vm group", responseObject = InstanceGroupResponse.class, entityType = {IAMEntityType.InstanceGroup},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class UpdateVMGroupCmd extends BaseCmd {
  
      private static final String s_name = "updateinstancegroupresponse";
@@@ -85,7 -83,7 +86,7 @@@
          if (result != null) {
              InstanceGroupResponse response = _responseGenerator.createInstanceGroupResponse(result);
              response.setResponseName(getCommandName());
--            this.setResponseObject(response);
++            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update vm instance group");
          }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java
index 8f0a8c8,be78528..fae0e61
--- a/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java
@@@ -37,7 -34,8 +37,8 @@@ import com.cloud.exception.ResourceAllo
  import com.cloud.uservm.UserVm;
  import com.cloud.vm.snapshot.VMSnapshot;
  
- @APICommand(name = "createVMSnapshot", description = "Creates snapshot for a vm.", responseObject = VMSnapshotResponse.class, since = "4.2.0", entityType = { IAMEntityType.VMSnapshot })
 -@APICommand(name = "createVMSnapshot", description = "Creates snapshot for a vm.", responseObject = VMSnapshotResponse.class, since = "4.2.0",
++@APICommand(name = "createVMSnapshot", description = "Creates snapshot for a vm.", responseObject = VMSnapshotResponse.class, since = "4.2.0", entityType = {IAMEntityType.VMSnapshot},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class CreateVMSnapshotCmd extends BaseAsyncCreateCmd {
  
      public static final Logger s_logger = Logger.getLogger(CreateVMSnapshotCmd.class.getName());
@@@ -91,7 -88,7 +92,7 @@@
      public void create() throws ResourceAllocationException {
          VMSnapshot vmsnapshot = _vmSnapshotService.allocVMSnapshot(getVmId(), getDisplayName(), getDescription(), snapshotMemory());
          if (vmsnapshot != null) {
--            this.setEntityId(vmsnapshot.getId());
++            setEntityId(vmsnapshot.getId());
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm snapshot");
          }
@@@ -114,7 -111,7 +115,7 @@@
          if (result != null) {
              VMSnapshotResponse response = _responseGenerator.createVMSnapshotResponse(result);
              response.setResponseName(getCommandName());
--            this.setResponseObject(response);
++            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm snapshot due to an internal error creating snapshot for vm " + getVmId());
          }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java
index 063ff77,bee8546..af076cf
--- a/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java
@@@ -36,7 -33,8 +36,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.user.Account;
  import com.cloud.vm.snapshot.VMSnapshot;
  
- @APICommand(name = "deleteVMSnapshot", description = "Deletes a vmsnapshot.", responseObject = SuccessResponse.class, since = "4.2.0", entityType = { IAMEntityType.VMSnapshot })
 -@APICommand(name = "deleteVMSnapshot", description = "Deletes a vmsnapshot.", responseObject = SuccessResponse.class, since = "4.2.0",
++@APICommand(name = "deleteVMSnapshot", description = "Deletes a vmsnapshot.", responseObject = SuccessResponse.class, since = "4.2.0", entityType = {IAMEntityType.VMSnapshot},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class DeleteVMSnapshotCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(DeleteVMSnapshotCmd.class.getName());
      private static final String s_name = "deletevmsnapshotresponse";
@@@ -73,7 -70,7 +74,7 @@@
          boolean result = _vmSnapshotService.deleteVMSnapshot(getId());
          if (result) {
              SuccessResponse response = new SuccessResponse(getCommandName());
--            this.setResponseObject(response);
++            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete vm snapshot");
          }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java
index 7faed63,adebb6e..3167d09
--- a/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java
@@@ -31,7 -30,8 +31,8 @@@ import org.apache.cloudstack.api.respon
  
  import com.cloud.vm.snapshot.VMSnapshot;
  
- @APICommand(name = "listVMSnapshot", description = "List virtual machine snapshot by conditions", responseObject = VMSnapshotResponse.class, since = "4.2.0", entityType = { IAMEntityType.VMSnapshot })
 -@APICommand(name = "listVMSnapshot", description = "List virtual machine snapshot by conditions", responseObject = VMSnapshotResponse.class, since = "4.2.0",
++@APICommand(name = "listVMSnapshot", description = "List virtual machine snapshot by conditions", responseObject = VMSnapshotResponse.class, since = "4.2.0", entityType = {IAMEntityType.VMSnapshot},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class ListVMSnapshotCmd extends BaseListTaggedResourcesCmd {
  
      private static final String s_name = "listvmsnapshotresponse";
@@@ -76,7 -76,7 +77,7 @@@
          }
          response.setResponses(snapshotResponses);
          response.setResponseName(getCommandName());
--        this.setResponseObject(response);
++        setResponseObject(response);
      }
  
      @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToVMSnapshotCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToVMSnapshotCmd.java
index 84916ce,91661f6..0ca5009
--- a/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToVMSnapshotCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToVMSnapshotCmd.java
@@@ -40,7 -37,8 +40,8 @@@ import com.cloud.user.Account
  import com.cloud.uservm.UserVm;
  import com.cloud.vm.snapshot.VMSnapshot;
  
- @APICommand(name = "revertToVMSnapshot", description = "Revert VM from a vmsnapshot.", responseObject = UserVmResponse.class, since = "4.2.0", responseView = ResponseView.Restricted)
 -@APICommand(name = "revertToVMSnapshot", description = "Revert VM from a vmsnapshot.", responseObject = UserVmResponse.class, since = "4.2.0",
++@APICommand(name = "revertToVMSnapshot", description = "Revert VM from a vmsnapshot.", responseObject = UserVmResponse.class, since = "4.2.0", responseView = ResponseView.Restricted,
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
  public class RevertToVMSnapshotCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(RevertToVMSnapshotCmd.class.getName());
      private static final String s_name = "reverttovmsnapshotresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java
index 9fdf2bc,78e1a69..553e2e9
--- a/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java
@@@ -36,7 -33,8 +36,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.storage.Volume;
  import com.cloud.user.Account;
  
- @APICommand(name = "attachVolume", description = "Attaches a disk volume to a virtual machine.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.VirtualMachine })
 -@APICommand(name = "attachVolume", description = "Attaches a disk volume to a virtual machine.", responseObject = VolumeResponse.class,
++@APICommand(name = "attachVolume", description = "Attaches a disk volume to a virtual machine.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.VirtualMachine},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class AttachVolumeCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(AttachVolumeCmd.class.getName());
      private static final String s_name = "attachvolumeresponse";
@@@ -108,8 -108,17 +109,17 @@@
      }
  
      @Override
+     public boolean isDisplayResourceEnabled(){
+         Volume volume = _responseGenerator.findVolumeById(getId());
+         if (volume == null) {
+             return true; // bad id given, parent this command to true so ERROR events are tracked
+         }
+         return volume.isDisplayVolume();
+     }
+ 
+     @Override
      public String getEventDescription() {
 -        return "attaching volume: " + getId() + " to vm: " + getVirtualMachineId();
 +        return  "attaching volume: " + getId() + " to vm: " + getVirtualMachineId();
      }
  
      @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
index 5939ca6,555711b..ad06bc2
--- a/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
@@@ -16,9 -16,7 +16,10 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.volume;
  
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
+ import org.apache.cloudstack.acl.RoleType;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiCommandJobType;
  import org.apache.cloudstack.api.ApiConstants;
@@@ -42,7 -40,10 +43,8 @@@ import com.cloud.exception.ResourceAllo
  import com.cloud.storage.Snapshot;
  import com.cloud.storage.Volume;
  
- @APICommand(name = "createVolume", responseObject = VolumeResponse.class, description = "Creates a disk volume from a disk offering. This disk volume must still be attached to a virtual machine to make use of it.", responseView = ResponseView.Restricted, entityType = { IAMEntityType.Volume })
 -@APICommand(name = "createVolume",
 -            responseObject = VolumeResponse.class,
 -            description = "Creates a disk volume from a disk offering. This disk volume must still be attached to a virtual machine to make use of it.",
++@APICommand(name = "createVolume", responseObject = VolumeResponse.class, description = "Creates a disk volume from a disk offering. This disk volume must still be attached to a virtual machine to make use of it.", responseView = ResponseView.Restricted, entityType = {IAMEntityType.Volume},
+             requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class CreateVolumeCmd extends BaseAsyncCreateCustomIdCmd {
      public static final Logger s_logger = Logger.getLogger(CreateVolumeCmd.class.getName());
      private static final String s_name = "createvolumeresponse";
@@@ -191,8 -196,13 +197,13 @@@
      }
  
      @Override
+     public boolean isDisplayResourceEnabled(){
+         return getDisplayVolume();
+     }
+ 
+     @Override
      public String getEventDescription() {
 -        return "creating volume: " + getVolumeName() + ((getSnapshotId() == null) ? "" : " from snapshot: " + getSnapshotId());
 +        return  "creating volume: " + getVolumeName() + ((getSnapshotId() == null) ? "" : " from snapshot: " + getSnapshotId());
      }
  
      @Override
@@@ -210,9 -220,10 +221,10 @@@
      @Override
      public void execute() {
          CallContext.current().setEventDetails("Volume Id: " + getEntityId() + ((getSnapshotId() == null) ? "" : " from snapshot: " + getSnapshotId()));
+         CallContext.current().setEventDisplayEnabled(getDisplayVolume());
          Volume volume = _volumeService.createVolume(this);
          if (volume != null) {
 -            VolumeResponse response = _responseGenerator.createVolumeResponse(volume);
 +            VolumeResponse response = _responseGenerator.createVolumeResponse(ResponseView.Restricted, volume);
              //FIXME - have to be moved to ApiResponseHelper
              if (getSnapshotId() != null) {
                  Snapshot snap = _entityMgr.findById(Snapshot.class, getSnapshotId());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java
index bb17bd9,2c66dea..546a9d5
--- a/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java
@@@ -34,7 -32,8 +34,8 @@@ import com.cloud.exception.ConcurrentOp
  import com.cloud.storage.Volume;
  import com.cloud.user.Account;
  
- @APICommand(name = "deleteVolume", description = "Deletes a detached disk volume.", responseObject = SuccessResponse.class, entityType = { IAMEntityType.Volume })
 -@APICommand(name = "deleteVolume", description = "Deletes a detached disk volume.", responseObject = SuccessResponse.class,
++@APICommand(name = "deleteVolume", description = "Deletes a detached disk volume.", responseObject = SuccessResponse.class, entityType = {IAMEntityType.Volume},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class DeleteVolumeCmd extends BaseCmd {
      public static final Logger s_logger = Logger.getLogger(DeleteVolumeCmd.class.getName());
      private static final String s_name = "deletevolumeresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java
index c7419fc,2b87ff8..1a874e1
--- a/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java
@@@ -37,7 -34,8 +37,8 @@@ import com.cloud.storage.Volume
  import com.cloud.user.Account;
  import com.cloud.uservm.UserVm;
  
- @APICommand(name = "detachVolume", description = "Detaches a disk volume from a virtual machine.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Volume })
 -@APICommand(name = "detachVolume", description = "Detaches a disk volume from a virtual machine.", responseObject = VolumeResponse.class,
++@APICommand(name = "detachVolume", description = "Detaches a disk volume from a virtual machine.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.Volume},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class DetachVolumeCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(DetachVolumeCmd.class.getName());
      private static final String s_name = "detachvolumeresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java
index fef35dc,da466fd..b9883cc
--- a/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java
@@@ -39,7 -36,8 +39,8 @@@ import com.cloud.storage.Upload
  import com.cloud.storage.Volume;
  import com.cloud.user.Account;
  
- @APICommand(name = "extractVolume", description = "Extracts volume", responseObject = ExtractResponse.class, entityType = { IAMEntityType.Volume })
 -@APICommand(name = "extractVolume", description = "Extracts volume", responseObject = ExtractResponse.class,
++@APICommand(name = "extractVolume", description = "Extracts volume", responseObject = ExtractResponse.class, entityType = {IAMEntityType.Volume},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class ExtractVolumeCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(ExtractVolumeCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java
index 24425cb,04c68fe..b4ac4ae
--- a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java
@@@ -15,16 -15,14 +15,18 @@@
  // specific language governing permissions and limitations
  // under the License.
  package org.apache.cloudstack.api.command.user.volume;
+ 
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
  import org.apache.cloudstack.acl.RoleType;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiCommandJobType;
  import org.apache.cloudstack.api.ApiConstants;
  import org.apache.cloudstack.api.BaseListTaggedResourcesCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
+ import org.apache.cloudstack.api.response.DiskOfferingResponse;
  import org.apache.cloudstack.api.response.HostResponse;
  import org.apache.cloudstack.api.response.ListResponse;
  import org.apache.cloudstack.api.response.PodResponse;
@@@ -32,11 -30,10 +34,9 @@@ import org.apache.cloudstack.api.respon
  import org.apache.cloudstack.api.response.UserVmResponse;
  import org.apache.cloudstack.api.response.VolumeResponse;
  import org.apache.cloudstack.api.response.ZoneResponse;
 -import org.apache.log4j.Logger;
  
- 
- 
- 
- @APICommand(name = "listVolumes", description = "Lists all volumes.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Volume })
 -@APICommand(name = "listVolumes", description = "Lists all volumes.", responseObject = VolumeResponse.class,
++@APICommand(name = "listVolumes", description = "Lists all volumes.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Volume },
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class ListVolumesCmd extends BaseListTaggedResourcesCmd {
      public static final Logger s_logger = Logger.getLogger(ListVolumesCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java
index bbd754a,47bf26f..820d73d
--- a/api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java
@@@ -31,8 -29,8 +31,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.storage.Volume;
  import com.cloud.user.Account;
  
- 
- @APICommand(name = "migrateVolume", description = "Migrate volume", responseObject = VolumeResponse.class, since = "3.0.0", responseView = ResponseView.Restricted, entityType = { IAMEntityType.Volume })
 -@APICommand(name = "migrateVolume", description = "Migrate volume", responseObject = VolumeResponse.class, since = "3.0.0",
++@APICommand(name = "migrateVolume", description = "Migrate volume", responseObject = VolumeResponse.class, since = "3.0.0", responseView = ResponseView.Restricted, entityType = {IAMEntityType.Volume},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class MigrateVolumeCmd extends BaseAsyncCmd {
      private static final String s_name = "migratevolumeresponse";
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java
index 0e7d27d,a95c95b..2f34c75
--- a/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java
@@@ -15,10 -15,7 +15,11 @@@
  // specific language governing permissions and limitations
  // under the License.
  package org.apache.cloudstack.api.command.user.volume;
 +import org.apache.log4j.Logger;
+ 
 +import org.apache.cloudstack.acl.IAMEntityType;
 +import org.apache.cloudstack.acl.SecurityChecker.AccessType;
 +import org.apache.cloudstack.api.ACL;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiCommandJobType;
  import org.apache.cloudstack.api.ApiConstants;
@@@ -30,6 -26,8 +31,7 @@@ import org.apache.cloudstack.api.Server
  import org.apache.cloudstack.api.response.DiskOfferingResponse;
  import org.apache.cloudstack.api.response.VolumeResponse;
  import org.apache.cloudstack.context.CallContext;
 -import org.apache.log4j.Logger;
+ 
  import com.cloud.event.EventTypes;
  import com.cloud.exception.InvalidParameterValueException;
  import com.cloud.exception.PermissionDeniedException;
@@@ -38,8 -36,8 +40,9 @@@ import com.cloud.projects.Project
  import com.cloud.storage.Volume;
  import com.cloud.user.Account;
  
 -@APICommand(name = "resizeVolume", description = "Resizes a volume", responseObject = VolumeResponse.class,
 +
- @APICommand(name = "resizeVolume", description = "Resizes a volume", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Volume })
++@APICommand(name = "resizeVolume", description = "Resizes a volume", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.Volume},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class ResizeVolumeCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(ResizeVolumeCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
index d5b23ab,2d2b215..d9fa82e
--- a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
@@@ -16,11 -16,7 +16,12 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.volume;
  
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
+ import org.apache.cloudstack.acl.RoleType;
 +import org.apache.cloudstack.acl.SecurityChecker.AccessType;
 +import org.apache.cloudstack.api.ACL;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiCommandJobType;
  import org.apache.cloudstack.api.ApiConstants;
@@@ -37,7 -33,8 +38,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.exception.InvalidParameterValueException;
  import com.cloud.storage.Volume;
  
- @APICommand(name = "updateVolume", description = "Updates the volume.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Volume })
 -@APICommand(name = "updateVolume", description = "Updates the volume.", responseObject = VolumeResponse.class,
++@APICommand(name = "updateVolume", description = "Updates the volume.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Volume },
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class UpdateVolumeCmd extends BaseAsyncCustomIdCmd {
      public static final Logger s_logger = Logger.getLogger(UpdateVolumeCmd.class.getName());
      private static final String s_name = "updatevolumeresponse";
@@@ -145,9 -147,10 +153,10 @@@
      @Override
      public void execute() {
          CallContext.current().setEventDetails("Volume Id: " + getId());
-         Volume result = _volumeService.updateVolume(getId(), getPath(), getState(), getStorageId(), getDisplayVolume(), getCustomId(), getEntityOwnerId());
+         Volume result = _volumeService.updateVolume(getId(), getPath(), getState(), getStorageId(), getDisplayVolume(),
+                 getCustomId(), getEntityOwnerId(), getChainInfo());
          if (result != null) {
 -            VolumeResponse response = _responseGenerator.createVolumeResponse(result);
 +            VolumeResponse response = _responseGenerator.createVolumeResponse(ResponseView.Restricted, result);
              response.setResponseName(getCommandName());
              setResponseObject(response);
          } else {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java
index 608bde5,2d97ec9..949e6df
--- a/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java
@@@ -40,7 -38,8 +40,8 @@@ import com.cloud.exception.ResourceAllo
  import com.cloud.exception.ResourceUnavailableException;
  import com.cloud.storage.Volume;
  
- @APICommand(name = "uploadVolume", description = "Uploads a data disk.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Volume })
 -@APICommand(name = "uploadVolume", description = "Uploads a data disk.", responseObject = VolumeResponse.class,
++@APICommand(name = "uploadVolume", description = "Uploads a data disk.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.Volume},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class UploadVolumeCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(UploadVolumeCmd.class.getName());
      private static final String s_name = "uploadvolumeresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java
index 0bbe8cb,7df5e37..f2c9e2c
--- a/api/src/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java
@@@ -40,7 -39,8 +40,8 @@@ import com.cloud.network.vpc.StaticRout
  import com.cloud.network.vpc.Vpc;
  import com.cloud.network.vpc.VpcGateway;
  
- @APICommand(name = "createStaticRoute", description = "Creates a static route", responseObject = StaticRouteResponse.class, entityType = { IAMEntityType.StaticRoute })
 -@APICommand(name = "createStaticRoute", description = "Creates a static route", responseObject = StaticRouteResponse.class,
++@APICommand(name = "createStaticRoute", description = "Creates a static route", responseObject = StaticRouteResponse.class, entityType = {IAMEntityType.StaticRoute},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class CreateStaticRouteCmd extends BaseAsyncCreateCmd {
      private static final String s_name = "createstaticrouteresponse";
      public static final Logger s_logger = Logger.getLogger(CreateStaticRouteCmd.class.getName());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java
index 42eeb62,62fa29f..5cd1f6e
--- a/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java
@@@ -16,9 -16,7 +16,10 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.vpc;
  
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
+ import org.apache.cloudstack.acl.RoleType;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiConstants;
  import org.apache.cloudstack.api.ApiErrorCode;
@@@ -40,8 -38,9 +41,9 @@@ import com.cloud.exception.ResourceAllo
  import com.cloud.exception.ResourceUnavailableException;
  import com.cloud.network.vpc.Vpc;
  
- @APICommand(name = "createVPC", description = "Creates a VPC", responseObject = VpcResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Vpc })
- public class CreateVPCCmd extends BaseAsyncCreateCmd{
 -@APICommand(name = "createVPC", description = "Creates a VPC", responseObject = VpcResponse.class,
++@APICommand(name = "createVPC", description = "Creates a VPC", responseObject = VpcResponse.class, responseView = ResponseView.Restricted, entityType = {IAMEntityType.Vpc},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
+ public class CreateVPCCmd extends BaseAsyncCreateCmd {
      public static final Logger s_logger = Logger.getLogger(CreateVPCCmd.class.getName());
      private static final String s_name = "createvpcresponse";
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java
index b59ba93,dfa4910..0017753
--- a/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java
@@@ -38,7 -35,8 +38,8 @@@ import com.cloud.exception.InvalidParam
  import com.cloud.exception.ResourceUnavailableException;
  import com.cloud.network.vpc.StaticRoute;
  
- @APICommand(name = "deleteStaticRoute", description = "Deletes a static route", responseObject = SuccessResponse.class, entityType = { IAMEntityType.StaticRoute })
 -@APICommand(name = "deleteStaticRoute", description = "Deletes a static route", responseObject = SuccessResponse.class,
++@APICommand(name = "deleteStaticRoute", description = "Deletes a static route", responseObject = SuccessResponse.class, entityType = {IAMEntityType.StaticRoute},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class DeleteStaticRouteCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(DeleteStaticRouteCmd.class.getName());
      private static final String s_name = "deletestaticrouteresponse";
@@@ -100,7 -98,7 +101,7 @@@
  
          if (result) {
              SuccessResponse response = new SuccessResponse(getCommandName());
--            this.setResponseObject(response);
++            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete static route");
          }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java
index ab4a447,94ad9e4..5928aab
--- a/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java
@@@ -36,7 -33,8 +36,8 @@@ import com.cloud.exception.ResourceUnav
  import com.cloud.network.vpc.Vpc;
  import com.cloud.user.Account;
  
- @APICommand(name = "deleteVPC", description = "Deletes a VPC", responseObject = SuccessResponse.class, entityType = { IAMEntityType.Vpc })
 -@APICommand(name = "deleteVPC", description = "Deletes a VPC", responseObject = SuccessResponse.class,
++@APICommand(name = "deleteVPC", description = "Deletes a VPC", responseObject = SuccessResponse.class, entityType = {IAMEntityType.Vpc},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class DeleteVPCCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(DeleteVPCCmd.class.getName());
      private static final String s_name = "deletevpcresponse";
@@@ -76,7 -74,7 +77,7 @@@
              boolean result = _vpcService.deleteVpc(getId());
              if (result) {
                  SuccessResponse response = new SuccessResponse(getCommandName());
--                this.setResponseObject(response);
++                setResponseObject(response);
              } else {
                  throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete VPC");
              }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java
index 03f51f5,ff2d0bc..160355a
--- a/api/src/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java
@@@ -33,7 -32,8 +33,8 @@@ import org.apache.cloudstack.api.respon
  import com.cloud.network.vpc.PrivateGateway;
  import com.cloud.utils.Pair;
  
- @APICommand(name = "listPrivateGateways", description = "List private gateways", responseObject = PrivateGatewayResponse.class, entityType = { IAMEntityType.VpcGateway })
 -@APICommand(name = "listPrivateGateways", description = "List private gateways", responseObject = PrivateGatewayResponse.class,
++@APICommand(name = "listPrivateGateways", description = "List private gateways", responseObject = PrivateGatewayResponse.class, entityType = {IAMEntityType.VpcGateway},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class ListPrivateGatewaysCmd extends BaseListProjectAndAccountResourcesCmd {
      public static final Logger s_logger = Logger.getLogger(ListPrivateGatewaysCmd.class.getName());
  
@@@ -101,6 -101,6 +102,6 @@@
          response.setResponses(projectResponses, gateways.second());
          response.setResponseName(getCommandName());
  
--        this.setResponseObject(response);
++        setResponseObject(response);
      }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java
index 215ae9f,83865ca..b2cdf87
--- a/api/src/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java
@@@ -32,7 -31,8 +32,8 @@@ import org.apache.cloudstack.api.respon
  import com.cloud.network.vpc.StaticRoute;
  import com.cloud.utils.Pair;
  
- @APICommand(name = "listStaticRoutes", description = "Lists all static routes", responseObject = StaticRouteResponse.class, entityType = { IAMEntityType.StaticRoute })
 -@APICommand(name = "listStaticRoutes", description = "Lists all static routes", responseObject = StaticRouteResponse.class,
++@APICommand(name = "listStaticRoutes", description = "Lists all static routes", responseObject = StaticRouteResponse.class, entityType = {IAMEntityType.StaticRoute},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class ListStaticRoutesCmd extends BaseListTaggedResourcesCmd {
      private static final String s_name = "liststaticroutesresponse";
  
@@@ -80,7 -80,7 +81,7 @@@
          }
          response.setResponses(routeResponses, result.second());
          response.setResponseName(getCommandName());
--        this.setResponseObject(response);
++        setResponseObject(response);
      }
  
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java
index bbd07d6,69a8693..fa60f6f
--- a/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java
@@@ -19,9 -19,7 +19,10 @@@ package org.apache.cloudstack.api.comma
  import java.util.ArrayList;
  import java.util.List;
  
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
+ import org.apache.cloudstack.acl.RoleType;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiConstants;
  import org.apache.cloudstack.api.BaseListTaggedResourcesCmd;
@@@ -34,9 -31,10 +35,10 @@@ import org.apache.cloudstack.api.respon
  
  import com.cloud.network.vpc.Vpc;
  
 -@APICommand(name = "listVPCs", description = "Lists VPCs", responseObject = VpcResponse.class,
 +
- @APICommand(name = "listVPCs", description = "Lists VPCs", responseObject = VpcResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Vpc })
- public class ListVPCsCmd extends BaseListTaggedResourcesCmd{
++@APICommand(name = "listVPCs", description = "Lists VPCs", responseObject = VpcResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Vpc },
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
+ public class ListVPCsCmd extends BaseListTaggedResourcesCmd {
      public static final Logger s_logger = Logger.getLogger(ListVPCsCmd.class.getName());
      private static final String s_name = "listvpcsresponse";
  
@@@ -117,10 -126,10 +130,10 @@@
  
      @Override
      public void execute() {
-         List<? extends Vpc> vpcs = _vpcService.listVpcs(getId(), getVpcName(), getDisplayText(),
-                 getSupportedServices(), getCidr(), getVpcOffId(), getState(), getAccountName(), getDomainId(),
-                 getKeyword(), getStartIndex(), getPageSizeVal(), getZoneId(), isRecursive(),
-                 listAll(), getRestartRequired(), getTags(), getProjectId());
+         List<? extends Vpc> vpcs =
+             _vpcService.listVpcs(getId(), getVpcName(), getDisplayText(), getSupportedServices(), getCidr(), getVpcOffId(), getState(), getAccountName(), getDomainId(),
 -                this.getKeyword(), this.getStartIndex(), this.getPageSizeVal(), getZoneId(), this.isRecursive(), this.listAll(), getRestartRequired(), getTags(),
++                getKeyword(), getStartIndex(), getPageSizeVal(), getZoneId(), isRecursive(), listAll(), getRestartRequired(), getTags(),
+                 getProjectId(), getDisplay());
          ListResponse<VpcResponse> response = new ListResponse<VpcResponse>();
          List<VpcResponse> offeringResponses = new ArrayList<VpcResponse>();
          for (Vpc vpc : vpcs) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java
index cb395ee,f68760b..d1d805a
--- a/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java
@@@ -37,7 -34,8 +37,8 @@@ import com.cloud.exception.ResourceUnav
  import com.cloud.network.vpc.Vpc;
  import com.cloud.user.Account;
  
- @APICommand(name = "restartVPC", description = "Restarts a VPC", responseObject = VpcResponse.class, entityType = { IAMEntityType.Vpc })
 -@APICommand(name = "restartVPC", description = "Restarts a VPC", responseObject = VpcResponse.class,
++@APICommand(name = "restartVPC", description = "Restarts a VPC", responseObject = VpcResponse.class, entityType = {IAMEntityType.Vpc},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class RestartVPCCmd extends BaseAsyncCmd {
      public static final Logger s_logger = Logger.getLogger(RestartVPCCmd.class.getName());
      private static final String Name = "restartvpcresponse";
@@@ -81,7 -79,7 +82,7 @@@
              boolean result = _vpcService.restartVpc(getId());
              if (result) {
                  SuccessResponse response = new SuccessResponse(getCommandName());
--                this.setResponseObject(response);
++                setResponseObject(response);
              } else {
                  throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to restart VPC");
              }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java
index a081b9f,f0b9814..7624423
--- a/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java
@@@ -16,11 -16,7 +16,12 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.vpc;
  
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
+ import org.apache.cloudstack.acl.RoleType;
 +import org.apache.cloudstack.acl.SecurityChecker.AccessType;
 +import org.apache.cloudstack.api.ACL;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiConstants;
  import org.apache.cloudstack.api.ApiErrorCode;
@@@ -35,7 -31,8 +36,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.network.vpc.Vpc;
  import com.cloud.user.Account;
  
- @APICommand(name = "updateVPC", description = "Updates a VPC", responseObject = VpcResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Vpc })
 -@APICommand(name = "updateVPC", description = "Updates a VPC", responseObject = VpcResponse.class,
++@APICommand(name = "updateVPC", description = "Updates a VPC", responseObject = VpcResponse.class, responseView = ResponseView.Restricted, entityType = { IAMEntityType.Vpc },
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class UpdateVPCCmd extends BaseAsyncCustomIdCmd {
      public static final Logger s_logger = Logger.getLogger(UpdateVPCCmd.class.getName());
      private static final String Name = "updatevpcresponse";
@@@ -89,11 -93,11 +98,11 @@@
  
      @Override
      public void execute() {
-         Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText(), getCustomId());
 -        Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText(), this.getCustomId(), getDisplayVpc());
++        Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText(), getCustomId(), getDisplayVpc());
          if (result != null) {
 -            VpcResponse response = _responseGenerator.createVpcResponse(result);
 +            VpcResponse response = _responseGenerator.createVpcResponse(ResponseView.Restricted, result);
              response.setResponseName(getCommandName());
 -            this.setResponseObject(response);
 +            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update VPC");
          }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java
index 48ee1fd,45d8703..d057629
--- a/api/src/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java
@@@ -35,7 -34,8 +35,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.network.VpnUser;
  import com.cloud.user.Account;
  
- @APICommand(name = "addVpnUser", description = "Adds vpn users", responseObject = VpnUsersResponse.class, entityType = { IAMEntityType.VpnUser })
 -@APICommand(name = "addVpnUser", description = "Adds vpn users", responseObject = VpnUsersResponse.class,
++@APICommand(name = "addVpnUser", description = "Adds vpn users", responseObject = VpnUsersResponse.class, entityType = {IAMEntityType.VpnUser},
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class AddVpnUserCmd extends BaseAsyncCreateCmd {
      public static final Logger s_logger = Logger.getLogger(AddVpnUserCmd.class.getName());
  
@@@ -136,7 -136,7 +137,7 @@@
  
          vpnResponse.setResponseName(getCommandName());
          vpnResponse.setObjectName("vpnuser");
--        this.setResponseObject(vpnResponse);
++        setResponseObject(vpnResponse);
      }
  
      @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48e08fe6/api/src/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java
index b350f3b,7f56353..4df2134
--- a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java
@@@ -16,9 -16,7 +16,10 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.vpn;
  
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
+ import org.apache.cloudstack.acl.RoleType;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiConstants;
  import org.apache.cloudstack.api.ApiErrorCode;
@@@ -37,7 -36,8 +38,8 @@@ import com.cloud.exception.ResourceUnav
  import com.cloud.network.IpAddress;
  import com.cloud.network.RemoteAccessVpn;
  
- @APICommand(name = "createRemoteAccessVpn", description = "Creates a l2tp/ipsec remote access vpn", responseObject = RemoteAccessVpnResponse.class, entityType = { IAMEntityType.RemoteAccessVpn })
 -@APICommand(name = "createRemoteAccessVpn", description = "Creates a l2tp/ipsec remote access vpn", responseObject = RemoteAccessVpnResponse.class,
++@APICommand(name = "createRemoteAccessVpn", description = "Creates a l2tp/ipsec remote access vpn", responseObject = RemoteAccessVpnResponse.class, entityType = { IAMEntityType.RemoteAccessVpn },
+         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
  public class CreateRemoteAccessVpnCmd extends BaseAsyncCreateCmd {
      public static final Logger s_logger = Logger.getLogger(CreateRemoteAccessVpnCmd.class.getName());
  
@@@ -140,13 -144,13 +146,13 @@@
      @Override
      public void create() {
          try {
-             RemoteAccessVpn vpn = _ravService.createRemoteAccessVpn(publicIpId, ipRange, getOpenFirewall());
+             RemoteAccessVpn vpn = _ravService.createRemoteAccessVpn(publicIpId, ipRange, getOpenFirewall(), getDisplay());
              if (vpn != null) {
--                this.setEntityId(vpn.getServerAddressId());
++                setEntityId(vpn.getServerAddressId());
                  // find uuid for server ip address
                  IpAddress ipAddr = _entityMgr.findById(IpAddress.class, vpn.getServerAddressId());
                  if (ipAddr != null) {
--                    this.setEntityUuid(ipAddr.getUuid());
++                    setEntityUuid(ipAddr.getUuid());
                  }
              } else {
                  throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create remote access vpn");
@@@ -165,7 -169,7 +171,7 @@@
              if (result != null) {
                  RemoteAccessVpnResponse response = _responseGenerator.createRemoteAccessVpnResponse(result);
                  response.setResponseName(getCommandName());
--                this.setResponseObject(response);
++                setResponseObject(response);
              } else {
                  throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create remote access vpn");
              }


Mime
View raw message