cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [03/50] [abbrv] git commit: updated refs/heads/4.4 to 48f8a95
Date Fri, 14 Mar 2014 13:58:00 GMT
Merge branch 'master' into rbac.


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

Branch: refs/heads/4.4
Commit: 99bdc8d8752a37f629bd86b842312e420b87b0af
Parents: f2d4b4d 5779292
Author: Min Chen <min.chen@citrix.com>
Authored: Thu Mar 13 11:05:03 2014 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Thu Mar 13 11:05:03 2014 -0700

----------------------------------------------------------------------
 agent/conf/agent.properties                     |  11 +
 .../SYSCONFDIR/rc.d/init.d/cloud-agent.in       |   2 +-
 .../SYSCONFDIR/rc.d/init.d/cloud-agent.in       |   2 +-
 .../sles/SYSCONFDIR/init.d/cloud-agent.in       |   2 +-
 .../rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in  |   2 +-
 .../sles/SYSCONFDIR/init.d/cloud-agent.in       |   2 +-
 .../cloud/agent/api/HostVmStateReportEntry.java |  10 +-
 api/src/com/cloud/agent/api/to/GPUDeviceTO.java |  56 ++
 .../cloud/agent/api/to/VirtualMachineTO.java    |   9 +
 api/src/com/cloud/event/EventTypes.java         |  42 +-
 api/src/com/cloud/gpu/GPU.java                  |  49 ++
 .../VpcVirtualNetworkApplianceService.java      |   8 +-
 .../element/AggregatedCommandExecutor.java      |  28 +
 .../com/cloud/offering/DiskOfferingInfo.java    |  65 ++
 api/src/com/cloud/server/ManagementService.java |  77 ++-
 api/src/com/cloud/storage/GuestOS.java          |   6 +
 .../com/cloud/storage/GuestOSHypervisor.java    |  10 +
 api/src/com/cloud/storage/VolumeApiService.java |   2 +
 api/src/com/cloud/user/AccountService.java      |   2 +
 api/src/com/cloud/vm/UserVmService.java         |   6 +
 .../cloudstack/api/ApiCommandJobType.java       |   6 +-
 .../org/apache/cloudstack/api/ApiConstants.java |  22 +-
 .../org/apache/cloudstack/api/BaseAsyncCmd.java |  36 -
 .../apache/cloudstack/api/BaseAsyncVMCmd.java   |  30 +
 .../cloudstack/api/BaseAsyncVolumeCmd.java      |  30 +
 api/src/org/apache/cloudstack/api/BaseCmd.java  | 239 +++----
 .../org/apache/cloudstack/api/BaseListCmd.java  |  30 +-
 .../org/apache/cloudstack/api/Parameter.java    |   2 -
 .../cloudstack/api/ResponseGenerator.java       |   4 +
 .../api/command/admin/guest/AddGuestOsCmd.java  | 136 ++++
 .../admin/guest/AddGuestOsMappingCmd.java       | 146 ++++
 .../admin/guest/ListGuestOsMappingCmd.java      | 101 +++
 .../command/admin/guest/RemoveGuestOsCmd.java   |  98 +++
 .../admin/guest/RemoveGuestOsMappingCmd.java    |  98 +++
 .../command/admin/guest/UpdateGuestOsCmd.java   | 104 +++
 .../admin/guest/UpdateGuestOsMappingCmd.java    | 102 +++
 .../admin/offering/CreateDiskOfferingCmd.java   |   6 +-
 .../offering/CreateServiceOfferingCmd.java      |  54 +-
 .../api/command/admin/user/CreateUserCmd.java   |   3 +-
 .../affinitygroup/DeleteAffinityGroupCmd.java   |   1 +
 .../user/autoscale/CreateConditionCmd.java      |   2 +-
 .../api/command/user/iso/ListIsosCmd.java       |   3 +-
 .../api/command/user/iso/RegisterIsoCmd.java    |   5 +-
 .../command/user/network/CreateNetworkCmd.java  |   2 +-
 .../gslb/CreateGlobalLoadBalancerRuleCmd.java   |   5 +-
 .../user/resource/ListResourceLimitsCmd.java    |   5 +-
 .../user/resource/UpdateResourceCountCmd.java   |   5 +-
 .../user/resource/UpdateResourceLimitCmd.java   |   7 +-
 .../AuthorizeSecurityGroupEgressCmd.java        |   2 +-
 .../AuthorizeSecurityGroupIngressCmd.java       |   2 +-
 .../securitygroup/DeleteSecurityGroupCmd.java   |   2 +-
 .../command/user/ssh/CreateSSHKeyPairCmd.java   |   2 +-
 .../command/user/ssh/DeleteSSHKeyPairCmd.java   |   1 +
 .../command/user/ssh/RegisterSSHKeyPairCmd.java |   2 +-
 .../command/user/template/ListTemplatesCmd.java |   3 +-
 .../user/template/RegisterTemplateCmd.java      |   5 +-
 .../api/command/user/vm/DeployVMCmd.java        |  62 +-
 .../api/command/user/vm/DestroyVMCmd.java       |   4 +-
 .../api/command/user/vm/ListVMsCmd.java         |   8 +
 .../api/command/user/vm/RebootVMCmd.java        |   4 +-
 .../api/command/user/vm/ResetVMPasswordCmd.java |   4 +-
 .../api/command/user/vm/ResetVMSSHKeyCmd.java   |   4 +-
 .../api/command/user/vm/RestoreVMCmd.java       |  10 +-
 .../api/command/user/vm/ScaleVMCmd.java         |   4 +-
 .../api/command/user/vm/StartVMCmd.java         |   4 +-
 .../api/command/user/vm/StopVMCmd.java          |   4 +-
 .../api/command/user/vm/UpgradeVMCmd.java       |   5 +
 .../command/user/vmgroup/CreateVMGroupCmd.java  |   2 +-
 .../command/user/volume/AttachVolumeCmd.java    |  15 +-
 .../command/user/volume/CreateVolumeCmd.java    |  14 +-
 .../command/user/volume/DeleteVolumeCmd.java    |   5 +
 .../command/user/volume/DetachVolumeCmd.java    |   6 +-
 .../command/user/volume/ExtractVolumeCmd.java   |   4 +-
 .../command/user/volume/MigrateVolumeCmd.java   |  10 +-
 .../command/user/volume/ResizeVolumeCmd.java    |  10 +-
 .../command/user/volume/UpdateVolumeCmd.java    |   5 +
 .../command/user/volume/UploadVolumeCmd.java    |   2 +-
 .../api/command/user/vpc/CreateVPCCmd.java      |   2 +-
 .../api/command/user/vpn/AddVpnUserCmd.java     |   2 +-
 .../user/vpn/CreateVpnCustomerGatewayCmd.java   |   2 +-
 .../api/command/user/vpn/RemoveVpnUserCmd.java  |   2 +-
 .../command/user/vpn/ResetVpnConnectionCmd.java |   2 +-
 .../user/vpn/UpdateVpnCustomerGatewayCmd.java   |   2 +-
 .../api/response/DiskOfferingResponse.java      |  12 +
 .../cloudstack/api/response/GpuResponse.java    |  46 ++
 .../api/response/GuestOsMappingResponse.java    | 102 +++
 .../cloudstack/api/response/HostResponse.java   |   8 +
 .../api/response/ServiceOfferingResponse.java   |  48 ++
 .../cloudstack/api/response/UserVmResponse.java |  10 +
 .../cloudstack/api/response/VgpuResponse.java   |  52 ++
 .../org/apache/cloudstack/api/BaseCmdTest.java  |  69 ++
 .../classes/resources/messages.properties       | 209 ++++++
 .../classes/resources/messages_ja_JP.properties | 272 +++++++-
 .../classes/resources/messages_zh_CN.properties | 572 +++++++++++-----
 client/tomcatconf/commands.properties.in        |   9 +
 .../com/cloud/agent/api/ClusterSyncAnswer.java  |  10 +-
 .../agent/api/ClusterVMMetaDataSyncAnswer.java  |  52 ++
 .../agent/api/ClusterVMMetaDataSyncCommand.java |  47 ++
 .../com/cloud/agent/api/GetGPUStatsAnswer.java  |  36 +
 .../com/cloud/agent/api/GetGPUStatsCommand.java |  47 ++
 .../cloud/agent/api/StartupRoutingCommand.java  |  17 +-
 core/src/com/cloud/agent/api/StopCommand.java   |   9 +
 .../api/routing/AggregationControlCommand.java  |  44 ++
 .../virtualnetwork/VirtualRoutingResource.java  | 210 ++++--
 core/src/com/cloud/info/ConsoleProxyInfo.java   |  19 +-
 .../storage/to/PrimaryDataStoreTO.java          |  18 +
 .../VirtualRoutingResourceTest.java             | 467 ++++++++++---
 .../src/com/cloud/vm/VirtualMachineManager.java |   4 +-
 .../service/VolumeOrchestrationService.java     |   2 +-
 .../api/storage/DataMotionService.java          |   2 +
 .../api/storage/DataMotionStrategy.java         |   2 +
 .../api/storage/PrimaryDataStoreInfo.java       |  18 +
 .../subsystem/api/storage/VolumeService.java    |   6 +-
 .../src/com/cloud/resource/ResourceManager.java |  41 ++
 .../cloud/agent/manager/DirectAgentAttache.java |   2 -
 .../com/cloud/vm/VirtualMachineManagerImpl.java | 123 ++--
 .../engine/orchestration/CloudOrchestrator.java |  40 +-
 .../orchestration/NetworkOrchestrator.java      |  33 +-
 .../orchestration/VolumeOrchestrator.java       |  29 +-
 .../spring-engine-schema-core-daos-context.xml  |   2 +
 engine/schema/src/com/cloud/event/EventVO.java  |  12 +-
 .../src/com/cloud/gpu/HostGpuGroupsVO.java      |  70 ++
 .../schema/src/com/cloud/gpu/VGPUTypesVO.java   |  82 +++
 .../src/com/cloud/gpu/dao/HostGpuGroupsDao.java |  60 ++
 .../com/cloud/gpu/dao/HostGpuGroupsDaoImpl.java |  94 +++
 .../src/com/cloud/gpu/dao/VGPUTypesDao.java     |  48 ++
 .../src/com/cloud/gpu/dao/VGPUTypesDaoImpl.java |  95 +++
 engine/schema/src/com/cloud/host/HostVO.java    |  13 +
 .../src/com/cloud/host/dao/HostDaoImpl.java     |  18 +
 .../com/cloud/network/vpc/NetworkACLItemVO.java |  14 +-
 .../cloud/service/ServiceOfferingDetailsVO.java |   4 +
 .../com/cloud/storage/GuestOSHypervisorVO.java  |  62 +-
 .../schema/src/com/cloud/storage/GuestOSVO.java |  25 +-
 .../cloud/storage/dao/GuestOSHypervisorDao.java |   3 +
 .../storage/dao/GuestOSHypervisorDaoImpl.java   |  27 +
 .../cloud/upgrade/dao/DatabaseAccessObject.java |  99 +++
 .../com/cloud/upgrade/dao/DbUpgradeUtils.java   |  76 +--
 .../datastore/db/SnapshotDataStoreVO.java       |  11 +-
 .../datastore/db/TemplateDataStoreVO.java       |  11 +-
 .../storage/datastore/db/VolumeDataStoreVO.java |  11 +-
 .../upgrade/dao/DatabaseAccessObjectTest.java   | 463 +++++++++++++
 .../cloud/upgrade/dao/DbUpgradeUtilsTest.java   | 162 +++++
 .../motion/AncientDataMotionStrategy.java       |  25 +-
 .../storage/motion/DataMotionServiceImpl.java   |   9 +-
 .../storage/image/TemplateServiceImpl.java      |  13 +-
 .../storage/image/store/TemplateObject.java     |  15 +
 .../storage/test/MockStorageMotionStrategy.java |   5 +
 .../storage/datastore/PrimaryDataStoreImpl.java |  20 +-
 .../datastore/provider/DefaultHostListener.java |   2 +-
 .../storage/volume/VolumeServiceImpl.java       | 156 ++++-
 packaging/centos63/cloud-agent.rc               |   2 +-
 packaging/centos63/cloud-ipallocator.rc         |   2 +-
 .../networkservice/BareMetalResourceBase.java   |   3 +-
 .../hypervisor/hyperv/guru/HypervGuru.java      |   9 +-
 .../resource/HypervDirectConnectResource.java   | 218 +++++-
 .../kvm/resource/LibvirtComputingResource.java  | 110 ++-
 .../cloud/ovm/hypervisor/OvmResourceBase.java   |   2 +-
 .../cloud/resource/AgentRoutingResource.java    |   2 +-
 .../motion/SimulatorDataMotionStrategy.java     |   5 +
 .../vmware/resource/VmwareResource.java         |   2 +-
 .../network/element/CiscoNexusVSMElement.java   |   5 +-
 .../motion/VmwareStorageMotionStrategy.java     |   5 +
 .../src/com/cloud/hypervisor/XenServerGuru.java |  33 +-
 .../xen/resource/CitrixResourceBase.java        | 256 +++++--
 .../xen/resource/XenServer610Resource.java      |   8 -
 .../xen/resource/XenServerPoolVms.java          |  41 +-
 .../xen/resource/XenServerStorageProcessor.java | 126 +++-
 .../xenserver/XenServerResourceNewBase.java     |  20 +-
 .../motion/XenServerStorageMotionStrategy.java  |   5 +
 .../api/command/CreateServiceInstanceCmd.java   |   2 +-
 .../contrail/management/MockAccountManager.java |   5 +
 .../driver/CloudStackImageStoreDriverImpl.java  |  12 +-
 .../apache/cloudstack/ldap/LdapUserManager.java |   8 +-
 .../cloudstack/ldap/LdapUserManagerSpec.groovy  | 263 ++++----
 .../SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in |   2 +-
 .../SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in |   2 +-
 .../SYSCONFDIR/init.d/cloud-ipallocator.in      |   2 +-
 .../SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in |   2 +-
 .../sles/SYSCONFDIR/init.d/cloud-ipallocator.in |   2 +-
 .../SYSCONFDIR/init.d/cloud-ipallocator.in      |   2 +-
 .../vm/hypervisor/xenserver/createipAlias.sh    |  25 -
 .../vm/hypervisor/xenserver/deleteipAlias.sh    |  24 -
 scripts/vm/hypervisor/xenserver/vmops           |  16 -
 scripts/vm/hypervisor/xenserver/xcposs/patch    |  12 -
 scripts/vm/hypervisor/xenserver/xcpserver/patch |   9 -
 .../vm/hypervisor/xenserver/xenserver56/patch   |   7 -
 .../hypervisor/xenserver/xenserver56fp1/patch   |   7 -
 .../vm/hypervisor/xenserver/xenserver60/patch   |   7 -
 .../vm/hypervisor/xenserver/xenserver62/patch   |   7 -
 .../core/spring-server-core-misc-context.xml    |  12 +
 .../allocator/impl/FirstFitAllocator.java       |  17 +-
 server/src/com/cloud/api/ApiDBUtils.java        |  30 +
 server/src/com/cloud/api/ApiDispatcher.java     | 481 ++------------
 server/src/com/cloud/api/ApiResponseHelper.java |  26 +-
 server/src/com/cloud/api/ApiServer.java         | 413 ++++++------
 server/src/com/cloud/api/ApiServlet.java        | 133 ++--
 .../api/dispatch/CommandCreationWorker.java     |  56 ++
 .../com/cloud/api/dispatch/DispatchChain.java   |  40 ++
 .../api/dispatch/DispatchChainFactory.java      |  72 ++
 .../com/cloud/api/dispatch/DispatchTask.java    |  58 ++
 .../com/cloud/api/dispatch/DispatchWorker.java  |  30 +
 .../dispatch/ParamGenericValidationWorker.java  | 103 +++
 .../cloud/api/dispatch/ParamProcessWorker.java  | 428 ++++++++++++
 .../cloud/api/dispatch/ParamUnpackWorker.java   | 114 ++++
 .../dispatch/SpecificCmdValidationWorker.java   |  34 +
 .../com/cloud/api/query/QueryManagerImpl.java   |  22 +-
 .../api/query/dao/DiskOfferingJoinDaoImpl.java  |   1 +
 .../cloud/api/query/dao/HostJoinDaoImpl.java    |  25 +
 .../query/dao/ServiceOfferingJoinDaoImpl.java   |   4 +
 .../api/query/dao/TemplateJoinDaoImpl.java      |   3 +-
 .../cloud/api/query/dao/UserVmJoinDaoImpl.java  |   6 +
 .../cloud/api/query/vo/DiskOfferingJoinVO.java  |   7 +-
 .../src/com/cloud/api/query/vo/EventJoinVO.java |   8 +-
 .../api/query/vo/ServiceOfferingJoinVO.java     |  28 +
 server/src/com/cloud/configuration/Config.java  |   4 +-
 .../configuration/ConfigurationManagerImpl.java | 104 ++-
 .../consoleproxy/ConsoleProxyManagerImpl.java   |  11 +-
 .../deploy/DeploymentPlanningManagerImpl.java   |  12 +
 .../src/com/cloud/event/ActionEventUtils.java   |  18 +-
 .../cloud/hypervisor/HypervisorGuruBase.java    |  15 +
 .../com/cloud/network/IpAddressManagerImpl.java |   4 +-
 .../src/com/cloud/network/NetworkModelImpl.java |  14 +-
 .../com/cloud/network/NetworkServiceImpl.java   |   5 +-
 .../cloud/network/NetworkUsageManagerImpl.java  |   4 +
 .../cloud/network/as/AutoScaleManagerImpl.java  |   7 +-
 .../network/element/VirtualRouterElement.java   |  71 +-
 .../element/VpcVirtualRouterElement.java        |  14 +-
 .../router/VirtualNetworkApplianceManager.java  |  16 +-
 .../VirtualNetworkApplianceManagerImpl.java     | 129 ++--
 .../VpcVirtualNetworkApplianceManagerImpl.java  |  76 ++-
 .../com/cloud/network/vpc/VpcManagerImpl.java   |   5 +-
 .../com/cloud/resource/ResourceManagerImpl.java |  97 ++-
 .../src/com/cloud/server/ManagementServer.java  |   3 +
 .../com/cloud/server/ManagementServerImpl.java  | 257 ++++++-
 server/src/com/cloud/server/StatsCollector.java |  21 +
 .../com/cloud/storage/VolumeApiServiceImpl.java |  17 +
 .../storage/snapshot/SnapshotSchedulerImpl.java | 105 +--
 .../src/com/cloud/user/AccountManagerImpl.java  |  46 ++
 server/src/com/cloud/vm/UserVmManagerImpl.java  |  21 +-
 .../test/com/cloud/api/ApiDispatcherTest.java   | 106 ---
 .../api/dispatch/CommandCreationWorkerTest.java |  48 ++
 .../api/dispatch/DispatchChainFactoryTest.java  |  55 ++
 .../ParamGenericValidationWorkerTest.java       | 195 ++++++
 .../api/dispatch/ParamProcessWorkerTest.java    | 107 +++
 .../SpecificCmdValidationWorkerTest.java        |  48 ++
 .../cloud/network/vpc/VpcManagerImplTest.java   |  66 ++
 .../cloud/resource/MockResourceManagerImpl.java |  31 +
 .../com/cloud/user/MockAccountManagerImpl.java  |   5 +
 .../vm/DeploymentPlanningManagerImplTest.java   |  12 +
 .../MockVpcVirtualNetworkApplianceManager.java  |  39 +-
 server/test/resources/createNetworkOffering.xml |   4 +-
 .../SecondaryStorageManagerImpl.java            |   7 +
 setup/db/db/schema-421to430.sql                 |   4 +
 setup/db/db/schema-430to440.sql                 |  37 +-
 systemvm/conf/consoleproxy.properties           |   2 +-
 .../rc.d/init.d/cloud-console-proxy.in          |   2 +-
 .../rc.d/init.d/cloud-console-proxy.in          |   2 +-
 .../rc.d/init.d/cloud-console-proxy.in          |   2 +-
 .../SYSCONFDIR/init.d/cloud-console-proxy.in    |   2 +-
 .../debian/config/etc/init.d/cloud-early-config |  18 +-
 .../debian/config/opt/cloud/bin/vr_cfg.sh       |  96 +++
 .../component/test_cpu_domain_limits.py         |  11 +-
 test/integration/component/test_cpu_limits.py   |  15 +-
 .../component/test_cpu_project_limits.py        |   7 +-
 .../component/test_dynamic_compute_offering.py  | 409 ++++++++++++
 .../integration/component/test_memory_limits.py |  15 +-
 .../component/test_mm_domain_limits.py          |   7 +-
 .../component/test_mm_project_limits.py         |   7 +-
 test/integration/component/test_routers.py      |  28 +-
 .../component/test_vpc_vm_life_cycle.py         | 108 +--
 .../smoke/test_deploy_vgpu_enabled_vm.py        | 227 +++++++
 test/integration/smoke/test_deploy_vm.py        |  52 +-
 tools/marvin/marvin/codes.py                    |   1 +
 tools/marvin/marvin/configGenerator.py          |   5 +-
 tools/marvin/marvin/integration/lib/base.py     |  32 +-
 tools/marvin/marvin/integration/lib/common.py   |  39 +-
 tools/marvin/marvin/integration/lib/utils.py    |   3 +-
 .../marvin/sandbox/advanced/advanced_env.py     |  23 +-
 .../marvin/sandbox/advancedsg/advancedsg_env.py |  18 +-
 tools/marvin/marvin/sandbox/basic/basic_env.py  |  16 +-
 .../sandbox/demo/simulator/simulator_setup.py   |  16 +-
 tools/ngui/static/js/app/accounts/accounts.js   |  16 +-
 tools/ngui/static/js/app/storage/storage.js     |   2 +-
 ui/css/cloudstack3.css                          |  42 +-
 ui/dictionary.jsp                               | 220 +++++-
 ui/images/sprites.png                           | Bin 212515 -> 211543 bytes
 ui/index.jsp                                    |  11 +
 .../vnmcNetworkProvider/vnmcNetworkProvider.js  |  50 +-
 ui/scripts/configuration.js                     | 350 ++++++++--
 ui/scripts/installWizard.js                     |   6 +-
 ui/scripts/instanceWizard.js                    |  16 +-
 ui/scripts/instances.js                         |  24 +-
 ui/scripts/network.js                           |  62 +-
 ui/scripts/sharedFunctions.js                   |  28 +-
 ui/scripts/storage.js                           |   6 +-
 ui/scripts/system.js                            | 662 ++++++++++---------
 ui/scripts/templates.js                         |   6 +-
 ui/scripts/ui-custom/instanceWizard.js          |   8 +
 ui/scripts/ui-custom/zoneChart.js               |  16 +-
 ui/scripts/ui/core.js                           |   2 +-
 ui/scripts/ui/dialog.js                         |   2 +-
 ui/scripts/ui/widgets/multiEdit.js              |   2 +-
 ui/scripts/ui/widgets/tagger.js                 |   4 +-
 ui/scripts/vpc.js                               |  16 +-
 ui/scripts/zoneWizard.js                        |  12 +-
 utils/src/com/cloud/utils/ReflectUtil.java      |  13 +
 306 files changed, 11294 insertions(+), 2990 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/com/cloud/storage/VolumeApiService.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/com/cloud/user/AccountService.java
----------------------------------------------------------------------
diff --cc api/src/com/cloud/user/AccountService.java
index 37f6105,de0b470..85c71ca
--- a/api/src/com/cloud/user/AccountService.java
+++ b/api/src/com/cloud/user/AccountService.java
@@@ -108,9 -103,6 +108,11 @@@ public interface AccountService 
  
      void checkAccess(Account account, AccessType accessType, boolean sameOwner, ControlledEntity... entities) throws PermissionDeniedException;
  
 -    Long finalyzeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly);
 +    void checkAccess(Account account, AccessType accessType, boolean sameOwner, String apiName,
 +            ControlledEntity... entities) throws PermissionDeniedException;
  
 +    //TO be implemented, to check accessibility for an entity owned by domain
 +    void checkAccess(Account account, AccessType accessType, boolean sameOwner, PartOf... entities) throws PermissionDeniedException;
++
++    Long finalyzeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly);
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/ApiConstants.java
index 62191fc,089affb..239b8cd
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@@ -568,8 -583,12 +583,13 @@@ public class ApiConstants 
      public static final String PASSIVE = "passive";
      public static final String VERSION = "version";
      public static final String START = "start";
+     public static final String GPUGROUP = "gpugroup";
+     public static final String GPUGROUPNAME = "gpugroupname";
+     public static final String VGPU = "vgpu";
+     public static final String VGPUTYPE = "vgputype";
+     public static final String REMAININGCAPACITY = "remainingcapacity";
  
 +
      public enum HostDetails {
          all, capacity, events, stats, min;
      }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/BaseCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/BaseCmd.java
index 7c720c9,937ccc2..f6f21ae
--- a/api/src/org/apache/cloudstack/api/BaseCmd.java
+++ b/api/src/org/apache/cloudstack/api/BaseCmd.java
@@@ -26,22 -29,21 +29,22 @@@ import java.util.regex.Pattern
  
  import javax.inject.Inject;
  
++import org.apache.log4j.Logger;
++
+ import org.apache.cloudstack.acl.RoleType;
  import org.apache.cloudstack.affinity.AffinityGroupService;
  import org.apache.cloudstack.alert.AlertService;
+ import org.apache.cloudstack.context.CallContext;
  import org.apache.cloudstack.network.element.InternalLoadBalancerElementService;
  import org.apache.cloudstack.network.lb.ApplicationLoadBalancerService;
  import org.apache.cloudstack.network.lb.InternalLoadBalancerVMService;
  import org.apache.cloudstack.query.QueryService;
  import org.apache.cloudstack.usage.UsageService;
--import org.apache.log4j.Logger;
  
  import com.cloud.configuration.ConfigurationService;
- import com.cloud.domain.Domain;
  import com.cloud.exception.ConcurrentOperationException;
  import com.cloud.exception.InsufficientCapacityException;
- import com.cloud.exception.InvalidParameterValueException;
  import com.cloud.exception.NetworkRuleConflictException;
- import com.cloud.exception.PermissionDeniedException;
  import com.cloud.exception.ResourceAllocationException;
  import com.cloud.exception.ResourceUnavailableException;
  import com.cloud.network.NetworkModel;
@@@ -264,92 -279,68 +280,68 @@@ public abstract class BaseCmd 
          return formattedString;
      }
  
-     // FIXME: move this to a utils method so that maps can be unpacked and integer/long values can be appropriately cast
-     @SuppressWarnings({"unchecked", "rawtypes"})
-     public Map<String, Object> unpackParams(Map<String, String> params) {
-         Map<String, Object> lowercaseParams = new HashMap<String, Object>();
-         for (String key : params.keySet()) {
-             int arrayStartIndex = key.indexOf('[');
-             int arrayStartLastIndex = key.lastIndexOf('[');
-             if (arrayStartIndex != arrayStartLastIndex) {
-                 throw new ServerApiException(ApiErrorCode.MALFORMED_PARAMETER_ERROR, "Unable to decode parameter " + key +
-                     "; if specifying an object array, please use parameter[index].field=XXX, e.g. userGroupList[0].group=httpGroup");
-             }
- 
-             if (arrayStartIndex > 0) {
-                 int arrayEndIndex = key.indexOf(']');
-                 int arrayEndLastIndex = key.lastIndexOf(']');
-                 if ((arrayEndIndex < arrayStartIndex) || (arrayEndIndex != arrayEndLastIndex)) {
-                     // malformed parameter
-                     throw new ServerApiException(ApiErrorCode.MALFORMED_PARAMETER_ERROR, "Unable to decode parameter " + key +
-                         "; if specifying an object array, please use parameter[index].field=XXX, e.g. userGroupList[0].group=httpGroup");
-                 }
+     protected List<Field> getAllFieldsForClass(final Class<?> clazz) {
+         List<Field> filteredFields = fieldsForCmdClass.get(clazz);
  
-                 // Now that we have an array object, check for a field name in the case of a complex object
-                 int fieldIndex = key.indexOf('.');
-                 String fieldName = null;
-                 if (fieldIndex < arrayEndIndex) {
-                     throw new ServerApiException(ApiErrorCode.MALFORMED_PARAMETER_ERROR, "Unable to decode parameter " + key +
-                         "; if specifying an object array, please use parameter[index].field=XXX, e.g. userGroupList[0].group=httpGroup");
-                 } else {
-                     fieldName = key.substring(fieldIndex + 1);
-                 }
+         // If list of fields was not cached yet
+         if (filteredFields == null) {
+             final List<Field> allFields = ReflectUtil.getAllFieldsForClass(this.getClass(), BaseCmd.class);
+             filteredFields = new ArrayList<Field>();
  
-                 // parse the parameter name as the text before the first '[' character
-                 String paramName = key.substring(0, arrayStartIndex);
-                 paramName = paramName.toLowerCase();
- 
-                 Map<Integer, Map> mapArray = null;
-                 Map<String, Object> mapValue = null;
-                 String indexStr = key.substring(arrayStartIndex + 1, arrayEndIndex);
-                 int index = 0;
-                 boolean parsedIndex = false;
-                 try {
-                     if (indexStr != null) {
-                         index = Integer.parseInt(indexStr);
-                         parsedIndex = true;
+             for (final Field field : allFields) {
+                 final Parameter parameterAnnotation = field.getAnnotation(Parameter.class);
+                 if ((parameterAnnotation != null) && parameterAnnotation.expose()) {
+                     filteredFields.add(field);
 +                    }
-                 } catch (NumberFormatException nfe) {
-                     s_logger.warn("Invalid parameter " + key + " received, unable to parse object array, returning an error.");
                  }
 -            }
  
-                 if (!parsedIndex) {
-                     throw new ServerApiException(ApiErrorCode.MALFORMED_PARAMETER_ERROR, "Unable to decode parameter " + key +
-                         "; if specifying an object array, please use parameter[index].field=XXX, e.g. userGroupList[0].group=httpGroup");
+             // Cache the prepared list for future use
+             fieldsForCmdClass.put(clazz, filteredFields);
 -        }
++                    }
+         return filteredFields;
 -    }
 +                }
  
-                 Object value = lowercaseParams.get(paramName);
-                 if (value == null) {
-                     // for now, assume object array with sub fields
-                     mapArray = new HashMap<Integer, Map>();
-                     mapValue = new HashMap<String, Object>();
-                     mapArray.put(Integer.valueOf(index), mapValue);
-                 } else if (value instanceof Map) {
-                     mapArray = (HashMap)value;
-                     mapValue = mapArray.get(Integer.valueOf(index));
-                     if (mapValue == null) {
-                         mapValue = new HashMap<String, Object>();
-                         mapArray.put(Integer.valueOf(index), mapValue);
+     /**
+      * This method doesn't return all the @{link Parameter}, but only the ones exposed
+      * and allowed for current @{link RoleType}. This method will get the fields for a given
+      * Cmd class only once and never again, so in case of a dynamic update the result would
+      * be obsolete (this might be a plugin update. It is agreed upon that we will not do
+      * upgrades dynamically but in case we come back on that decision we need to revisit this)
+      *
+      * @return
+      */
+     public List<Field> getParamFields() {
+         final List<Field> allFields = getAllFieldsForClass(this.getClass());
+         final List<Field> validFields = new ArrayList<Field>();
+         final Account caller = CallContext.current().getCallingAccount();
+ 
+         for (final Field field : allFields) {
+             final Parameter parameterAnnotation = field.getAnnotation(Parameter.class);
+ 
+             //TODO: Annotate @Validate on API Cmd classes, FIXME how to process Validate
+             final RoleType[] allowedRoles = parameterAnnotation.authorized();
+             boolean roleIsAllowed = true;
+             if (allowedRoles.length > 0) {
+                 roleIsAllowed = false;
+                 for (final RoleType allowedRole : allowedRoles) {
+                     if (allowedRole.getValue() == caller.getType()) {
+                         roleIsAllowed = true;
+                         break;
                      }
                  }
+             }
  
-                 // we are ready to store the value for a particular field into the map for this object
-                 mapValue.put(fieldName, params.get(key));
- 
-                 lowercaseParams.put(paramName, mapArray);
+             if (roleIsAllowed) {
+                 validFields.add(field);
              } else {
-                 lowercaseParams.put(key.toLowerCase(), params.get(key));
+                 s_logger.debug("Ignoring paremeter " + parameterAnnotation.name() + " as the caller is not authorized to pass it in");
              }
          }
-         return lowercaseParams;
-     }
  
-     protected long getInstanceIdFromJobSuccessResult(String result) {
-         s_logger.debug("getInstanceIdFromJobSuccessResult not overridden in subclass " + this.getClass().getName());
-         return 0;
+         return validFields;
      }
  
-     public void setFullUrlParams(Map<String, String> map) {
+     public void setFullUrlParams(final Map<String, String> map) {
          fullUrlParams = map;
      }
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/ResponseGenerator.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
index eb9145c,6a6dd25..378a826
--- a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
@@@ -16,12 -16,7 +16,13 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.affinitygroup;
  
++
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
 +import org.apache.cloudstack.acl.SecurityChecker.AccessType;
  import org.apache.cloudstack.affinity.AffinityGroupResponse;
 +import org.apache.cloudstack.api.ACL;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiCommandJobType;
  import org.apache.cloudstack.api.ApiConstants;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateConditionCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/securitygroup/DeleteSecurityGroupCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/ssh/CreateSSHKeyPairCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java
index 19b29bd,92105c1..d0a5234
--- a/api/src/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java
@@@ -16,9 -16,6 +16,10 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.ssh;
  
++
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.IAMEntityType;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiConstants;
  import org.apache.cloudstack.api.BaseCmd;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/ssh/RegisterSSHKeyPairCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/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 b8ac561,e9a5213..4c3a415
--- a/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java
@@@ -18,18 -18,14 +18,18 @@@ package org.apache.cloudstack.api.comma
  
  import java.util.List;
  
+ import org.apache.cloudstack.api.BaseAsyncVMCmd;
  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;
  import org.apache.cloudstack.api.ApiErrorCode;
- import org.apache.cloudstack.api.BaseAsyncCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.UserVmResponse;
  import org.apache.cloudstack.context.CallContext;
@@@ -40,10 -36,12 +40,10 @@@ 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,
 +@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 class DestroyVMCmd extends BaseAsyncVMCmd {
      public static final Logger s_logger = Logger.getLogger(DestroyVMCmd.class.getName());
  
      private static final String s_name = "destroyvirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/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 8f04430,c547d62..0f04114
--- a/api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java
@@@ -16,18 -16,14 +16,18 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.vm;
  
+ import org.apache.cloudstack.api.BaseAsyncVMCmd;
  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;
  import org.apache.cloudstack.api.ApiErrorCode;
- import org.apache.cloudstack.api.BaseAsyncCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.UserVmResponse;
  import org.apache.cloudstack.context.CallContext;
@@@ -38,9 -34,9 +38,9 @@@ 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,
 +@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 class RebootVMCmd extends BaseAsyncVMCmd {
      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/99bdc8d8/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 2fd508b,461ce7f..615ef69
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java
@@@ -16,18 -16,14 +16,18 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.vm;
  
+ import org.apache.cloudstack.api.BaseAsyncVMCmd;
  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;
  import org.apache.cloudstack.api.ApiErrorCode;
- import org.apache.cloudstack.api.BaseAsyncCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.UserVmResponse;
  import org.apache.cloudstack.context.CallContext;
@@@ -38,11 -34,10 +38,11 @@@ 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},
      requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
- public class ResetVMPasswordCmd extends BaseAsyncCmd {
+ public class ResetVMPasswordCmd extends BaseAsyncVMCmd {
      public static final Logger s_logger = Logger.getLogger(ResetVMPasswordCmd.class.getName());
  
      private static final String s_name = "resetpasswordforvirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/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 288eed7,b7ab357..7d43853
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java
@@@ -17,18 -17,14 +17,18 @@@
  
  package org.apache.cloudstack.api.command.user.vm;
  
+ import org.apache.cloudstack.api.BaseAsyncVMCmd;
  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;
  import org.apache.cloudstack.api.ApiErrorCode;
- import org.apache.cloudstack.api.BaseAsyncCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.DomainResponse;
  import org.apache.cloudstack.api.response.ProjectResponse;
@@@ -41,10 -37,10 +41,10 @@@ 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},
      requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
- public class ResetVMSSHKeyCmd extends BaseAsyncCmd {
+ public class ResetVMSSHKeyCmd extends BaseAsyncVMCmd {
  
      public static final Logger s_logger = Logger.getLogger(ResetVMSSHKeyCmd.class.getName());
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/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 9befc67,81c40ec..0d5ef70
--- a/api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
@@@ -16,17 -16,13 +16,17 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.vm;
  
+ import org.apache.cloudstack.api.BaseAsyncVMCmd;
  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.ApiConstants;
  import org.apache.cloudstack.api.ApiErrorCode;
- import org.apache.cloudstack.api.BaseAsyncCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.TemplateResponse;
  import org.apache.cloudstack.api.response.UserVmResponse;
@@@ -40,10 -36,13 +40,10 @@@ 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",
 +@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 class RestoreVMCmd extends BaseAsyncVMCmd {
      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/99bdc8d8/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 cd658cb,07672c0..d668ad4
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
@@@ -30,10 -26,9 +30,10 @@@ import org.apache.cloudstack.api.ACL
  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.BaseAsyncVMCmd;
  import org.apache.cloudstack.api.BaseCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.ServiceOfferingResponse;
  import org.apache.cloudstack.api.response.SuccessResponse;
@@@ -47,10 -43,9 +47,10 @@@ 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},
          requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
- public class ScaleVMCmd extends BaseAsyncCmd {
+ public class ScaleVMCmd extends BaseAsyncVMCmd {
      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/99bdc8d8/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 2e4187d,553b753..4e91c7b
--- a/api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java
@@@ -16,18 -16,14 +16,18 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.vm;
  
+ import org.apache.cloudstack.api.BaseAsyncVMCmd;
  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;
  import org.apache.cloudstack.api.ApiErrorCode;
- import org.apache.cloudstack.api.BaseAsyncCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.HostResponse;
  import org.apache.cloudstack.api.response.UserVmResponse;
@@@ -44,9 -40,9 +44,9 @@@ 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.",
 +@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 class StartVMCmd extends BaseAsyncVMCmd {
      public static final Logger s_logger = Logger.getLogger(StartVMCmd.class.getName());
  
      private static final String s_name = "startvirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/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 fe94964,e9fa97b..6db5d18
--- a/api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java
@@@ -16,18 -16,15 +16,18 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.vm;
  
+ import org.apache.cloudstack.api.BaseAsyncVMCmd;
  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;
  import org.apache.cloudstack.api.ApiErrorCode;
- import org.apache.cloudstack.api.BaseAsyncCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.UserVmResponse;
  import org.apache.cloudstack.context.CallContext;
@@@ -37,9 -34,9 +37,9 @@@ 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.",
 +@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 class StopVMCmd extends BaseAsyncVMCmd {
      public static final Logger s_logger = Logger.getLogger(StopVMCmd.class.getName());
  
      private static final String s_name = "stopvirtualmachineresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/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 553e2e9,7939edf..f9d9081
--- a/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java
@@@ -15,18 -15,15 +15,19 @@@
  // specific language governing permissions and limitations
  // under the License.
  package org.apache.cloudstack.api.command.user.volume;
+ 
 -import org.apache.cloudstack.api.BaseAsyncVolumeCmd;
  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;
  import org.apache.cloudstack.api.ApiErrorCode;
- import org.apache.cloudstack.api.BaseAsyncCmd;
++import org.apache.cloudstack.api.BaseAsyncVolumeCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.UserVmResponse;
  import org.apache.cloudstack.api.response.VolumeResponse;
@@@ -36,9 -33,9 +37,9 @@@ 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,
 +@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 class AttachVolumeCmd extends BaseAsyncVolumeCmd {
      public static final Logger s_logger = Logger.getLogger(AttachVolumeCmd.class.getName());
      private static final String s_name = "attachvolumeresponse";
  
@@@ -67,6 -66,6 +68,7 @@@
          return deviceId;
      }
  
++    @Override
      public Long getId() {
          return id;
      }
@@@ -109,17 -108,8 +111,8 @@@
      }
  
      @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/99bdc8d8/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 ad06bc2,31d75d8..9b83f61
--- a/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
@@@ -221,10 -221,9 +222,9 @@@ public class CreateVolumeCmd extends Ba
      @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/99bdc8d8/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 546a9d5,eff7a35..6ca96b0
--- a/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java
@@@ -81,12 -77,17 +81,17 @@@ public class DeleteVolumeCmd extends Ba
      }
  
      @Override
+     public boolean isDisplayResourceEnabled(){
+         return _volumeService.isDisplayResourceEnabled(getId());
+     }
+ 
+     @Override
      public void execute() throws ConcurrentOperationException {
          CallContext.current().setEventDetails("Volume Id: " + getId());
 -        boolean result = this._volumeService.deleteVolume(id, CallContext.current().getCallingAccount());
 +        boolean result = _volumeService.deleteVolume(id, CallContext.current().getCallingAccount());
          if (result) {
              SuccessResponse response = new SuccessResponse(getCommandName());
 -            this.setResponseObject(response);
 +            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete volume");
          }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/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 1a874e1,b45ad0b..bfd0322
--- a/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java
@@@ -15,18 -15,15 +15,19 @@@
  // specific language governing permissions and limitations
  // under the License.
  package org.apache.cloudstack.api.command.user.volume;
+ 
 -import org.apache.cloudstack.api.BaseAsyncVolumeCmd;
  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;
  import org.apache.cloudstack.api.ApiErrorCode;
- import org.apache.cloudstack.api.BaseAsyncCmd;
++import org.apache.cloudstack.api.BaseAsyncVolumeCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.UserVmResponse;
  import org.apache.cloudstack.api.response.VolumeResponse;
@@@ -37,9 -34,9 +38,9 @@@ 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,
 +@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 class DetachVolumeCmd extends BaseAsyncVolumeCmd {
      public static final Logger s_logger = Logger.getLogger(DetachVolumeCmd.class.getName());
      private static final String s_name = "detachvolumeresponse";
  
@@@ -65,6 -60,6 +66,7 @@@
      /////////////////// Accessors ///////////////////////
      /////////////////////////////////////////////////////
  
++    @Override
      public Long getId() {
          return id;
      }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/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 b9883cc,7f5cd0d..cc7f56c
--- a/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java
@@@ -16,11 -16,9 +16,12 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.volume;
  
+ import org.apache.cloudstack.api.BaseAsyncVolumeCmd;
  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;
@@@ -39,9 -36,9 +39,9 @@@ import com.cloud.storage.Upload
  import com.cloud.storage.Volume;
  import com.cloud.user.Account;
  
 -@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 class ExtractVolumeCmd extends BaseAsyncVolumeCmd {
      public static final Logger s_logger = Logger.getLogger(ExtractVolumeCmd.class.getName());
  
      private static final String s_name = "extractvolumeresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/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 820d73d,126f1f3..d80595a
--- a/api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java
@@@ -20,9 -19,8 +20,9 @@@ import org.apache.cloudstack.acl.IAMEnt
  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.BaseAsyncVolumeCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.StoragePoolResponse;
  import org.apache.cloudstack.api.response.VolumeResponse;
@@@ -31,12 -29,12 +31,12 @@@ 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",
 +@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 {
+ public class MigrateVolumeCmd extends BaseAsyncVolumeCmd {
      private static final String s_name = "migratevolumeresponse";
  
 -    /////////////////////////////////////////////////////
 +     /////////////////////////////////////////////////////
      //////////////// API parameters /////////////////////
      /////////////////////////////////////////////////////
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/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 2f34c75,d51cdc5..d5cd62b
--- a/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java
@@@ -24,9 -20,8 +24,9 @@@ import org.apache.cloudstack.api.APICom
  import org.apache.cloudstack.api.ApiCommandJobType;
  import org.apache.cloudstack.api.ApiConstants;
  import org.apache.cloudstack.api.ApiErrorCode;
- import org.apache.cloudstack.api.BaseAsyncCmd;
+ import org.apache.cloudstack.api.BaseAsyncVolumeCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.DiskOfferingResponse;
  import org.apache.cloudstack.api.response.VolumeResponse;
@@@ -40,10 -36,9 +40,10 @@@ 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},
          requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
- public class ResizeVolumeCmd extends BaseAsyncCmd {
+ public class ResizeVolumeCmd extends BaseAsyncVolumeCmd {
      public static final Logger s_logger = Logger.getLogger(ResizeVolumeCmd.class.getName());
  
      private static final String s_name = "resizevolumeresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/api/src/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
----------------------------------------------------------------------
diff --cc engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index 6e55bd2,e36dc62..6aa1e36
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@@ -16,41 -16,6 +16,43 @@@
  // under the License.
  package org.apache.cloudstack.engine.orchestration;
  
++
 +import java.net.URI;
 +import java.util.ArrayList;
 +import java.util.Arrays;
 +import java.util.Collections;
 +import java.util.Comparator;
 +import java.util.HashMap;
 +import java.util.HashSet;
 +import java.util.LinkedHashMap;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Set;
 +import java.util.UUID;
 +import java.util.concurrent.Executors;
 +import java.util.concurrent.ScheduledExecutorService;
 +import java.util.concurrent.TimeUnit;
 +
 +import javax.ejb.Local;
 +import javax.inject.Inject;
 +import javax.naming.ConfigurationException;
 +
- import org.apache.cloudstack.acl.IAMEntityType;
++import org.apache.log4j.Logger;
++
 +import org.apache.cloudstack.acl.ControlledEntity.ACLType;
++import org.apache.cloudstack.acl.IAMEntityType;
 +import org.apache.cloudstack.api.ApiConstants;
 +import org.apache.cloudstack.context.CallContext;
 +import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
 +import org.apache.cloudstack.framework.config.ConfigDepot;
 +import org.apache.cloudstack.framework.config.ConfigKey;
 +import org.apache.cloudstack.framework.config.Configurable;
 +import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 +import org.apache.cloudstack.framework.messagebus.MessageBus;
 +import org.apache.cloudstack.framework.messagebus.PublishScope;
 +import org.apache.cloudstack.managed.context.ManagedContextRunnable;
 +import org.apache.cloudstack.region.PortableIpDao;
- import org.apache.log4j.Logger;
 +
  import com.cloud.agent.AgentManager;
  import com.cloud.agent.Listener;
  import com.cloud.agent.api.AgentControlAnswer;
@@@ -1082,16 -1067,42 +1085,42 @@@ public class NetworkOrchestrator extend
              }
          }
  
+         for (NetworkElement element : networkElements) {
+             if ((element instanceof AggregatedCommandExecutor) && (providersToImplement.contains(element.getProvider()))) {
+                 ((AggregatedCommandExecutor)element).prepareAggregatedExecution(network, dest);
+             }
+         }
+ 
+         try {
 -            // reapply all the firewall/staticNat/lb rules
 -            s_logger.debug("Reprogramming network " + network + " as a part of network implement");
 -            if (!reprogramNetworkRules(network.getId(), CallContext.current().getCallingAccount(), network)) {
 -                s_logger.warn("Failed to re-program the network as a part of network " + network + " implement");
 -                // see DataCenterVO.java
 -                ResourceUnavailableException ex = new ResourceUnavailableException("Unable to apply network rules as a part of network " + network + " implement", DataCenter.class,
 -                        network.getDataCenterId());
 -                ex.addProxyObject(_entityMgr.findById(DataCenter.class, network.getDataCenterId()).getUuid());
 -                throw ex;
 -            }
 +        // reapply all the firewall/staticNat/lb rules
 +        s_logger.debug("Reprogramming network " + network + " as a part of network implement");
 +        if (!reprogramNetworkRules(network.getId(), CallContext.current().getCallingAccount(), network)) {
 +            s_logger.warn("Failed to re-program the network as a part of network " + network + " implement");
 +            // see DataCenterVO.java
 +            ResourceUnavailableException ex = new ResourceUnavailableException("Unable to apply network rules as a part of network " + network + " implement", DataCenter.class,
 +                    network.getDataCenterId());
 +            ex.addProxyObject(_entityMgr.findById(DataCenter.class, network.getDataCenterId()).getUuid());
 +            throw ex;
 +        }
+             for (NetworkElement element : networkElements) {
+                 if ((element instanceof AggregatedCommandExecutor) && (providersToImplement.contains(element.getProvider()))) {
+                     if (!((AggregatedCommandExecutor)element).completeAggregatedExecution(network, dest)) {
+                         s_logger.warn("Failed to re-program the network as a part of network " + network + " implement due to aggregated commands execution failure!");
+                         // see DataCenterVO.java
+                         ResourceUnavailableException ex = new ResourceUnavailableException("Unable to apply network rules as a part of network " + network + " implement", DataCenter.class,
+                                 network.getDataCenterId());
+                         ex.addProxyObject(_entityMgr.findById(DataCenter.class, network.getDataCenterId()).getUuid());
+                         throw ex;
+                     }
+                 }
+             }
+         } finally {
+             for (NetworkElement element : networkElements) {
+                 if ((element instanceof AggregatedCommandExecutor) && (providersToImplement.contains(element.getProvider()))) {
+                     ((AggregatedCommandExecutor)element).cleanupAggregatedExecution(network, dest);
+                 }
+             }
+         }
      }
  
      // This method re-programs the rules/ips for existing network

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/engine/schema/src/com/cloud/event/EventVO.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
----------------------------------------------------------------------
diff --cc plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
index 6e2d70d,fb08dc6..c0b9ee5
--- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
+++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
@@@ -370,10 -347,9 +370,15 @@@ public class MockAccountManager extend
      }
  
      @Override
 +    public void checkAccess(Account account, AccessType accessType, boolean sameOwner, String apiName,
 +            ControlledEntity... entities) throws PermissionDeniedException {
 +        // TODO Auto-generated method stub
++    }
 +
++    @Override
+     public Long finalyzeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly) {
+         // TODO Auto-generated method stub
+         return null;
      }
  
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bdc8d8/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/api/ApiDBUtils.java
index 859ca01,539eb70..432eb94
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@@ -727,6 -743,9 +743,8 @@@ public class ApiDBUtils 
          s_networkACLDao = networkACLDao;
          s_accountService = accountService;
          s_resourceDetailsService = resourceDetailsService;
+         s_hostGpuGroupsDao = hostGpuGroupsDao;
+         s_vgpuTypesDao = vgpuTypesDao;
 -
      }
  
      // ///////////////////////////////////////////////////////////


Mime
View raw message