cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [7/8] git commit: updated refs/heads/object_store_migration to 9da56fe
Date Sat, 26 Oct 2013 04:18:50 GMT
Merge branch 'master' into object_store_migration.



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

Branch: refs/heads/object_store_migration
Commit: 7a1ee002756ea545a849b29268e3cc72f7fcd8b3
Parents: 81686e8 7120c1e
Author: Min Chen <min.chen@citrix.com>
Authored: Wed Oct 23 16:46:28 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Wed Oct 23 16:46:28 2013 -0700

----------------------------------------------------------------------
 agent/pom.xml                                   |    4 +
 agent/src/com/cloud/agent/Agent.java            |    1 -
 agent/src/com/cloud/agent/AgentShell.java       |   61 +-
 agent/test/com/cloud/agent/AgentShellTest.java  |   48 +
 .../cloudstack/api-planner/module.properties    |   18 +
 .../api-planner/spring-api-planner-context.xml  |   34 +
 .../exception/ConcurrentOperationException.java |    3 +-
 .../element/RemoteAccessVPNServiceProvider.java |    5 +-
 api/src/com/cloud/offering/NetworkOffering.java |    2 +
 api/src/com/cloud/vm/VmDetailConstants.java     |    1 +
 .../org/apache/cloudstack/api/ApiConstants.java |    7 +-
 .../admin/network/CreateNetworkOfferingCmd.java |    9 +-
 .../admin/network/UpdateNetworkOfferingCmd.java |    7 +
 .../command/user/network/UpdateNetworkCmd.java  |    4 +-
 .../command/user/ssh/CreateSSHKeyPairCmd.java   |    6 +-
 .../api/command/user/vm/DestroyVMCmd.java       |   27 +-
 .../user/volume/RemoveResourceDetailCmd.java    |   15 +-
 .../command/user/volume/UpdateVolumeCmd.java    |    6 +-
 .../api/response/CreateSSHKeyPairResponse.java  |   41 +
 .../api/response/SSHKeyPairResponse.java        |   16 -
 .../api/response/SnapshotResponse.java          |   25 +-
 .../cloudstack/api/response/UserVmResponse.java |    9 +-
 .../apache/cloudstack/context/CallContext.java  |    4 +-
 .../bridge/persist/dao/BucketPolicyDaoImpl.java |    6 +-
 .../persist/dao/CloudStackAccountDaoImpl.java   |    3 +-
 .../dao/CloudStackConfigurationDaoImpl.java     |    3 +-
 .../dao/CloudStackSvcOfferingDaoImpl.java       |    5 +-
 .../persist/dao/CloudStackUserDaoImpl.java      |    3 +-
 .../cloud/bridge/persist/dao/MHostDaoImpl.java  |    5 +-
 .../bridge/persist/dao/MHostMountDaoImpl.java   |    3 +-
 .../persist/dao/MultiPartPartsDaoImpl.java      |    9 +-
 .../persist/dao/MultiPartUploadsDaoImpl.java    |   15 +-
 .../bridge/persist/dao/MultipartLoadDao.java    |    9 +-
 .../persist/dao/MultipartMetaDaoImpl.java       |    3 +-
 .../bridge/persist/dao/OfferingDaoImpl.java     |   11 +-
 .../cloud/bridge/persist/dao/SAclDaoImpl.java   |    7 +-
 .../bridge/persist/dao/SBucketDaoImpl.java      |    5 +-
 .../cloud/bridge/persist/dao/SHostDaoImpl.java  |    5 +-
 .../cloud/bridge/persist/dao/SMetaDaoImpl.java  |    5 +-
 .../bridge/persist/dao/SObjectDaoImpl.java      |    7 +-
 .../bridge/persist/dao/SObjectItemDaoImpl.java  |    5 +-
 .../persist/dao/UserCredentialsDaoImpl.java     |    5 +-
 .../cloud/bridge/service/EC2RestServlet.java    |   13 +-
 .../com/cloud/bridge/service/S3RestServlet.java |    5 +-
 .../service/controller/s3/S3BucketAction.java   |    3 +-
 .../service/controller/s3/ServiceProvider.java  |    7 +-
 .../cloud/bridge/service/core/s3/S3Engine.java  |   23 +-
 .../classes/resources/messages.properties       |    2 +
 client/WEB-INF/web.xml                          |    6 +-
 client/pom.xml                                  |   56 +-
 .../cloudstack/webApplicationContext.xml        |   32 +
 client/tomcatconf/applicationContext.xml.in     |  956 ------
 client/tomcatconf/commands.properties.in        |    2 +-
 client/tomcatconf/componentContext.xml.in       |  324 --
 client/tomcatconf/log4j-cloud.xml.in            |    8 +
 client/tomcatconf/nonossComponentContext.xml.in |  421 ---
 .../tomcatconf/simulatorComponentContext.xml.in |  284 --
 client/tomcatconf/tomcat6-nonssl.conf.in        |    2 +-
 client/tomcatconf/tomcat6-ssl.conf.in           |    2 +-
 .../cloudstack/allocator/module.properties      |   18 +
 .../allocator/spring-core-allocator-context.xml |   32 +
 ...-lifecycle-allocator-context-inheritable.xml |   42 +
 .../META-INF/cloudstack/api/module.properties   |   18 +
 ...g-core-lifecycle-api-context-inheritable.xml |   53 +
 .../cloudstack/backend/module.properties        |   18 +
 .../cloudstack/bootstrap/module.properties      |   17 +
 .../spring-bootstrap-context-inheritable.xml    |   39 +
 .../bootstrap/spring-bootstrap-context.xml      |   32 +
 .../cloudstack/compute/module.properties        |   18 +
 ...re-lifecycle-compute-context-inheritable.xml |   45 +
 .../META-INF/cloudstack/core/module.properties  |   18 +
 .../cloudstack/core/spring-core-context.xml     |   36 +
 ...-core-lifecycle-core-context-inheritable.xml |   41 +
 .../core/spring-core-registry-core-context.xml  |  197 ++
 .../cloudstack/discoverer/module.properties     |   18 +
 ...lifecycle-discoverer-context-inheritable.xml |   35 +
 .../cloudstack/network/module.properties        |   18 +
 ...re-lifecycle-network-context-inheritable.xml |   58 +
 .../cloudstack/planner/module.properties        |   18 +
 ...re-lifecycle-planner-context-inheritable.xml |   41 +
 .../cloudstack/storage/module.properties        |   18 +
 ...ng-lifecycle-storage-context-inheritable.xml |   74 +
 .../cloudstack/system/module.properties         |   18 +
 .../spring-core-system-context-inheritable.xml  |   54 +
 .../system/spring-core-system-context.xml       |   50 +
 .../com/cloud/agent/api/ClusterSyncAnswer.java  |    8 +-
 .../cloud/agent/api/StartupRoutingCommand.java  |    8 +-
 core/src/com/cloud/agent/api/StopAnswer.java    |   23 +-
 .../api/routing/LoadBalancerConfigCommand.java  |    4 +-
 .../virtualnetwork/VirtualRoutingResource.java  |   25 +-
 .../com/cloud/network/HAProxyConfigurator.java  |   54 +-
 .../StorageSubsystemCommandHandlerBase.java     |    5 +-
 .../cloud/network/HAProxyConfiguratorTest.java  |   97 +
 .../core/spring-engine-api-core-context.xml     |   44 +
 .../api/storage/DataMotionStrategy.java         |    4 +-
 .../subsystem/api/storage/SnapshotInfo.java     |    2 +
 .../subsystem/api/storage/SnapshotStrategy.java |    9 +-
 .../api/storage/StorageStrategyFactory.java     |   45 +
 .../subsystem/api/storage/StrategyPriority.java |   86 +-
 .../api/storage/StrategyPriorityTest.java       |  116 -
 ...pring-engine-components-api-core-context.xml |   30 +
 .../configuration/ConfigurationManager.java     |    2 +-
 ...spring-engine-orchestration-core-context.xml |   71 +
 .../cloud/agent/manager/AgentManagerImpl.java   |    5 +-
 .../manager/ClusteredAgentManagerImpl.java      |    4 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java |  390 ++-
 .../entity/api/db/dao/DcDetailsDaoImpl.java     |    4 +-
 .../entity/api/db/dao/EngineClusterDaoImpl.java |    6 +-
 .../api/db/dao/EngineDataCenterDaoImpl.java     |    6 +-
 .../entity/api/db/dao/EngineHostDaoImpl.java    |   14 +-
 .../entity/api/db/dao/EngineHostPodDaoImpl.java |    6 +-
 .../entity/api/db/dao/HostDetailsDaoImpl.java   |    4 +-
 .../entity/api/db/dao/HostTagsDaoImpl.java      |    4 +-
 .../orchestration/NetworkOrchestrator.java      |  916 ++---
 .../orchestration/VolumeOrchestrator.java       |   88 +-
 .../spring-engine-schema-core-daos-context.xml  |  322 ++
 ...ng-engine-schema-system-checkers-context.xml |   34 +
 .../src/com/cloud/alert/dao/AlertDaoImpl.java   |    4 +-
 .../com/cloud/capacity/dao/CapacityDaoImpl.java |   26 +-
 .../configuration/dao/ResourceCountDaoImpl.java |    4 +-
 .../src/com/cloud/dc/ClusterDetailsDaoImpl.java |    6 +-
 .../src/com/cloud/dc/dao/ClusterDaoImpl.java    |    6 +-
 .../com/cloud/dc/dao/ClusterVSMMapDaoImpl.java  |    4 +-
 .../src/com/cloud/dc/dao/DataCenterDaoImpl.java |    6 +-
 .../dc/dao/DataCenterIpAddressDaoImpl.java      |    8 +-
 .../DataCenterLinkLocalIpAddressDaoImpl.java    |    6 +-
 .../src/com/cloud/dc/dao/DataCenterVnetDao.java |    3 +-
 .../com/cloud/dc/dao/DataCenterVnetDaoImpl.java |    8 +-
 .../src/com/cloud/dc/dao/DcDetailsDaoImpl.java  |    4 +-
 .../src/com/cloud/dc/dao/HostPodDaoImpl.java    |    6 +-
 .../src/com/cloud/dc/dao/PodVlanDaoImpl.java    |    8 +-
 .../dc/dao/StorageNetworkIpAddressDaoImpl.java  |    6 +-
 .../src/com/cloud/dc/dao/VlanDaoImpl.java       |    4 +-
 .../src/com/cloud/domain/dao/DomainDaoImpl.java |    8 +-
 .../src/com/cloud/event/dao/EventDaoImpl.java   |    4 +-
 .../com/cloud/event/dao/UsageEventDaoImpl.java  |   10 +-
 .../src/com/cloud/host/dao/HostDaoImpl.java     |   14 +-
 .../com/cloud/host/dao/HostDetailsDaoImpl.java  |    4 +-
 .../src/com/cloud/host/dao/HostTagsDaoImpl.java |    4 +-
 .../src/com/cloud/keystore/KeystoreDaoImpl.java |    4 +-
 .../network/dao/FirewallRulesCidrsDaoImpl.java  |    4 +-
 .../cloud/network/dao/FirewallRulesDaoImpl.java |    6 +-
 .../com/cloud/network/dao/IPAddressDaoImpl.java |    6 +-
 .../com/cloud/network/dao/NetworkDaoImpl.java   |   10 +-
 .../cloud/network/dao/PortProfileDaoImpl.java   |    4 +-
 .../security/dao/SecurityGroupDaoImpl.java      |    6 +-
 .../security/dao/SecurityGroupWorkDaoImpl.java  |    8 +-
 .../security/dao/VmRulesetLogDaoImpl.java       |    8 +-
 .../cloud/network/vpc/dao/PrivateIpDaoImpl.java |    4 +-
 .../network/vpc/dao/StaticRouteDaoImpl.java     |    4 +-
 .../com/cloud/network/vpc/dao/VpcDaoImpl.java   |    8 +-
 .../network/vpc/dao/VpcOfferingDaoImpl.java     |    4 +-
 .../com/cloud/offerings/NetworkOfferingVO.java  |   12 +
 .../offerings/dao/NetworkOfferingDaoImpl.java   |    6 +-
 .../com/cloud/projects/dao/ProjectDaoImpl.java  |    4 +-
 .../dao/ServiceOfferingDetailsDaoImpl.java      |    4 +-
 .../storage/dao/LaunchPermissionDaoImpl.java    |    6 +-
 .../com/cloud/storage/dao/SnapshotDaoImpl.java  |   14 +-
 .../storage/dao/StoragePoolDetailsDaoImpl.java  |    4 +-
 .../storage/dao/StoragePoolHostDaoImpl.java     |   10 +-
 .../storage/dao/StoragePoolWorkDaoImpl.java     |    4 +-
 .../com/cloud/storage/dao/VMTemplateDao.java    |    3 +
 .../cloud/storage/dao/VMTemplateDaoImpl.java    |   31 +-
 .../cloud/storage/dao/VMTemplateDetailsDao.java |    2 +
 .../storage/dao/VMTemplateDetailsDaoImpl.java   |   16 +-
 .../storage/dao/VMTemplateHostDaoImpl.java      |    8 +-
 .../storage/dao/VMTemplatePoolDaoImpl.java      |    8 +-
 .../storage/dao/VMTemplateZoneDaoImpl.java      |    4 +-
 .../com/cloud/storage/dao/VolumeDaoImpl.java    |   12 +-
 .../cloud/storage/dao/VolumeDetailsDaoImpl.java |    4 +-
 .../src/com/cloud/upgrade/DatabaseCreator.java  |    8 +-
 .../cloud/upgrade/DatabaseIntegrityChecker.java |    7 +-
 .../cloud/upgrade/DatabaseUpgradeChecker.java   |    9 +-
 .../com/cloud/upgrade/dao/Upgrade307to410.java  |    1 -
 .../com/cloud/upgrade/dao/VersionDaoImpl.java   |    4 +-
 .../src/com/cloud/usage/dao/UsageDaoImpl.java   |   26 +-
 .../cloud/usage/dao/UsageIPAddressDaoImpl.java  |    6 +-
 .../com/cloud/usage/dao/UsageJobDaoImpl.java    |    8 +-
 .../dao/UsageLoadBalancerPolicyDaoImpl.java     |    8 +-
 .../cloud/usage/dao/UsageNetworkDaoImpl.java    |    8 +-
 .../usage/dao/UsageNetworkOfferingDaoImpl.java  |    6 +-
 .../dao/UsagePortForwardingRuleDaoImpl.java     |    8 +-
 .../usage/dao/UsageSecurityGroupDaoImpl.java    |    6 +-
 .../cloud/usage/dao/UsageStorageDaoImpl.java    |    8 +-
 .../cloud/usage/dao/UsageVMInstanceDaoImpl.java |    8 +-
 .../cloud/usage/dao/UsageVMSnapshotDaoImpl.java |    8 +-
 .../cloud/usage/dao/UsageVPNUserDaoImpl.java    |    6 +-
 .../com/cloud/usage/dao/UsageVmDiskDaoImpl.java |    8 +-
 .../com/cloud/usage/dao/UsageVolumeDaoImpl.java |    8 +-
 .../com/cloud/user/AccountDetailsDaoImpl.java   |    4 +-
 .../src/com/cloud/user/dao/AccountDaoImpl.java  |    4 +-
 .../cloud/user/dao/UserStatisticsDaoImpl.java   |    6 +-
 .../cloud/user/dao/VmDiskStatisticsDaoImpl.java |    6 +-
 .../com/cloud/vm/dao/ConsoleProxyDaoImpl.java   |   16 +-
 .../com/cloud/vm/dao/DomainRouterDaoImpl.java   |    8 +-
 .../src/com/cloud/vm/dao/NicDetailDaoImpl.java  |    4 +-
 .../cloud/vm/dao/SecondaryStorageVmDaoImpl.java |    8 +-
 .../src/com/cloud/vm/dao/UserVmDaoImpl.java     |    8 +-
 .../src/com/cloud/vm/dao/UserVmDetailsDao.java  |    3 +-
 .../com/cloud/vm/dao/UserVmDetailsDaoImpl.java  |   17 +-
 .../src/com/cloud/vm/dao/VMInstanceDaoImpl.java |   12 +-
 .../affinity/dao/AffinityGroupVMMapDaoImpl.java |    4 +-
 .../entity/api/db/dao/VMComputeTagDaoImpl.java  |    4 +-
 .../entity/api/db/dao/VMEntityDaoImpl.java      |    4 +-
 .../entity/api/db/dao/VMNetworkMapDaoImpl.java  |    4 +-
 .../entity/api/db/dao/VMReservationDaoImpl.java |    4 +-
 .../entity/api/db/dao/VMRootDiskTagDaoImpl.java |    4 +-
 .../datastore/db/PrimaryDataStoreDaoImpl.java   |   10 +-
 ...spring-engine-storage-cache-core-context.xml |   38 +
 ...g-engine-storage-datamotion-core-context.xml |   34 +
 ...ngine-storage-datamotion-storage-context.xml |   34 +
 .../motion/AncientDataMotionStrategy.java       |   10 +-
 .../storage/motion/DataMotionServiceImpl.java   |   42 +-
 ...spring-engine-storage-image-core-context.xml |   45 +
 .../cloudstack/storage/test/AopTestAdvice.java  |    3 +-
 .../storage/test/CloudStackTestNGBase.java      |    5 +-
 .../test/FakePrimaryDataStoreDriver.java        |    7 +-
 .../storage/test/MockStorageMotionStrategy.java |   10 +-
 .../cloudstack/storage/test/SnapshotTest.java   |   58 +-
 .../cloudstack/storage/test/TestNGAop.java      |    4 +-
 .../test/resources/storageContext.xml           |    1 +
 .../core/spring-engine-storage-core-context.xml |   68 +
 .../storage-allocator/module.properties         |   18 +
 ...engine-storage-storage-allocator-context.xml |   49 +
 ...ing-engine-storage-snapshot-core-context.xml |   41 +
 ...-engine-storage-snapshot-storage-context.xml |   33 +
 .../storage/snapshot/SnapshotObject.java        |   40 +-
 .../snapshot/XenserverSnapshotStrategy.java     |    8 +-
 .../ClusterScopeStoragePoolAllocator.java       |   19 +-
 .../allocator/LocalStoragePoolAllocator.java    |   19 +-
 .../allocator/ZoneWideStoragePoolAllocator.java |   31 +-
 .../provider/DataStoreProviderManagerImpl.java  |  112 +-
 .../endpoint/DefaultEndPointSelector.java       |    3 +-
 .../helper/StorageStrategyFactoryImpl.java      |  139 +
 .../image/db/ImageStoreDetailsDaoImpl.java      |    4 +-
 .../image/db/SnapshotDataStoreDaoImpl.java      |    8 +-
 .../image/db/TemplateDataStoreDaoImpl.java      |    6 +-
 .../image/db/VolumeDataStoreDaoImpl.java        |    5 +-
 .../datastore/PrimaryDataStoreHelper.java       |    4 +-
 .../db/PrimaryDataStoreDetailsDaoImpl.java      |    4 +-
 .../api/storage/StrategyPriorityTest.java       |  122 +
 ...pring-engine-storage-volume-core-context.xml |   49 +
 .../storage/volume/VolumeServiceImpl.java       |    2 +-
 .../spring-framework-cluster-core-context.xml   |   36 +
 .../com/cloud/cluster/ClusterManagerImpl.java   |  102 +-
 .../dao/ManagementServerHostDaoImpl.java        |   16 +-
 .../dao/ManagementServerHostPeerDaoImpl.java    |    4 +-
 ...mework-config-system-context-inheritable.xml |   38 +
 .../spring-framework-config-system-context.xml  |   51 +
 .../framework/config/ConfigDepotAdmin.java      |    2 +
 .../framework/config/dao/ConfigurationDao.java  |    2 +
 .../config/dao/ConfigurationDaoImpl.java        |   24 +-
 .../framework/config/impl/ConfigDepotImpl.java  |   98 +-
 .../config/impl/ConfigDepotAdminTest.java       |    1 +
 .../spring-framework-db-system-context.xml      |   32 +
 .../utils/crypt/EncryptionSecretKeyChanger.java |    3 +-
 .../com/cloud/utils/db/ConnectionConcierge.java |    2 +-
 framework/db/src/com/cloud/utils/db/DbUtil.java |    2 +-
 .../src/com/cloud/utils/db/GenericDaoBase.java  |   36 +-
 .../db/src/com/cloud/utils/db/Merovingian2.java |    2 +-
 .../src/com/cloud/utils/db/SequenceFetcher.java |    2 +-
 .../db/src/com/cloud/utils/db/Transaction.java  | 1165 +------
 .../com/cloud/utils/db/TransactionCallback.java |   25 +
 .../utils/db/TransactionCallbackNoReturn.java   |   31 +
 .../db/TransactionCallbackWithException.java    |   25 +
 ...ransactionCallbackWithExceptionNoReturn.java |   32 +
 .../utils/db/TransactionContextBuilder.java     |    6 +-
 .../utils/db/TransactionContextInterceptor.java |   39 +
 .../utils/db/TransactionContextListener.java    |   41 +
 .../com/cloud/utils/db/TransactionLegacy.java   | 1194 +++++++
 .../cloud/utils/db/TransactionMBeanImpl.java    |   18 +-
 .../com/cloud/utils/db/TransactionStatus.java   |   25 +
 .../db/test/com/cloud/utils/db/DbTestDao.java   |    4 +-
 .../db/test/com/cloud/utils/db/DbTestUtils.java |    4 +-
 .../com/cloud/utils/db/TestTransaction.java     |  154 +
 .../com/cloud/utils/db/TransactionTest.java     |   26 +-
 framework/db/test/db.properties                 |   18 +
 .../core/spring-framework-ipc-core-context.xml  |   59 +
 .../core/spring-framework-jobs-core-context.xml |   48 +
 .../framework/jobs/dao/AsyncJobDaoImpl.java     |    4 +-
 .../jobs/dao/AsyncJobJoinMapDaoImpl.java        |   10 +-
 .../framework/jobs/dao/SyncQueueDaoImpl.java    |    4 +-
 .../jobs/dao/SyncQueueItemDaoImpl.java          |    4 +-
 .../jobs/impl/AsyncJobManagerImpl.java          |  286 +-
 .../jobs/impl/SyncQueueManagerImpl.java         |  271 +-
 framework/pom.xml                               |    2 +
 framework/spring/lifecycle/pom.xml              |   34 +
 .../spring/lifecycle/AbstractBeanCollector.java |  113 +
 .../lifecycle/AbstractSmartLifeCycle.java       |   53 +
 .../lifecycle/CloudStackExtendedLifeCycle.java  |  169 +
 .../CloudStackExtendedLifeCycleStart.java       |   49 +
 .../spring/lifecycle/CloudStackLog4jSetup.java  |   56 +
 .../spring/lifecycle/ConfigDepotLifeCycle.java  |   47 +
 .../spring/lifecycle/registry/DumpRegistry.java |   77 +
 .../lifecycle/registry/ExtensionRegistry.java   |  245 ++
 .../registry/PluggableServiceLifecycle.java     |   53 +
 .../lifecycle/registry/RegistryLifecycle.java   |  144 +
 framework/spring/module/pom.xml                 |   50 +
 .../context/ResourceApplicationContext.java     |   55 +
 .../module/factory/CloudStackSpringContext.java |  137 +
 .../factory/ModuleBasedContextFactory.java      |   84 +
 .../module/locator/ModuleDefinitionLocator.java |   36 +
 .../impl/ClasspathModuleDefinitionLocator.java  |   62 +
 .../spring/module/model/ModuleDefinition.java   |   48 +
 .../module/model/ModuleDefinitionSet.java       |   32 +
 .../model/impl/DefaultModuleDefinition.java     |  167 +
 .../model/impl/DefaultModuleDefinitionSet.java  |  243 ++
 .../cloudstack/spring/module/util/Main.java     |   58 +
 .../spring/module/util/ModuleLocationUtils.java |   53 +
 .../web/CloudStackContextLoaderListener.java    |   75 +
 .../module/model/impl/defaults-context.xml      |   28 +
 .../spring/module/factory/InitTest.java         |   39 +
 .../factory/ModuleBasedContextFactoryTest.java  |  121 +
 ...ClasspathModuleDefinitionSetLocatorTest.java |   40 +
 .../model/impl/DefaultModuleDefinitionTest.java |  131 +
 .../resources/testfiles/all/defaults.properties |   18 +
 .../testfiles/all/empty-context-inheritable.xml |   26 +
 .../resources/testfiles/all/empty-context.xml   |   26 +
 .../all/empty2-context-inheritable.xml          |   26 +
 .../resources/testfiles/all/empty2-context.xml  |   26 +
 .../resources/testfiles/all/module.properties   |   17 +
 .../testfiles/all/test2-defaults.properties     |   17 +
 .../testfiles/badname/module.properties         |   17 +
 .../testfiles/blankname/module.properties       |   18 +
 .../resources/testfiles/good/empty-context.xml  |   26 +
 .../resources/testfiles/good/module.properties  |   17 +
 .../testfiles/missingname/module.properties     |   17 +
 .../testfiles/wrongname/module.properties       |   17 +
 .../testhierarchy/base/module.properties        |   17 +
 .../base/test-context-inheritable.xml           |   28 +
 .../testhierarchy/base/test-context.xml         |   34 +
 .../testhierarchy/child1-1/module.properties    |   18 +
 .../testhierarchy/child1-1/test-context.xml     |   34 +
 .../testhierarchy/child1/module.properties      |   18 +
 .../child1/test-context-override.xml            |   30 +
 .../testhierarchy/child1/test-context.xml       |   38 +
 .../testhierarchy/child2/module.properties      |   18 +
 .../testhierarchy/child2/test-context.xml       |   33 +
 .../testhierarchy/orphan1/module.properties     |   18 +
 .../testhierarchy/orphan1/test-context.xml      |   30 +
 packaging/centos63/cloud-management.rc          |    4 +-
 packaging/centos63/cloud.spec                   |   18 +-
 packaging/centos63/cloudstack-sccs              |   20 +
 .../debian/config/opt/cloud/bin/savepassword.sh |   62 +
 .../acl-static-role-based/module.properties     |   18 +
 .../spring-acl-static-role-based-context.xml    |   34 +
 .../explicit-dedication/module.properties       |   18 +
 .../spring-explicit-dedication-context.xml      |   36 +
 .../affinity/ExplicitDedicationProcessor.java   |   32 +-
 .../host-anti-affinity/module.properties        |   18 +
 .../spring-host-anti-affinity-context.xml       |   37 +
 .../discovery/ApiDiscoveryServiceImpl.java      |   65 +-
 .../cloudstack/discovery/ApiDiscoveryTest.java  |    2 +-
 .../cloudstack/rate-limit/module.properties     |   18 +
 .../rate-limit/spring-rate-limit-context.xml    |   32 +
 .../spring-dedicated-resources-core-context.xml |   33 +
 .../dedicated/DedicatedResourceManagerImpl.java |  273 +-
 .../implicit-dedication/module.properties       |   18 +
 .../spring-implicit-dedication-context.xml      |   25 +
 .../user-concentrated-pod/module.properties     |   18 +
 .../spring-user-concentrated-pod-context.xml    |   35 +
 .../src/com/cloud/netapp/NetappManagerImpl.java |   10 +-
 .../host-allocator-random/module.properties     |   18 +
 .../spring-host-allocator-random-context.xml    |   34 +
 .../baremetal-compute/module.properties         |   18 +
 .../spring-baremetal-compute-context.xml        |   35 +
 .../baremetal-discoverer/module.properties      |   18 +
 .../spring-baremetal-discoverer-context.xml     |   34 +
 .../baremetal-network/module.properties         |   18 +
 .../spring-baremetal-network-context.xml        |   46 +
 .../baremetal-planner/module.properties         |   18 +
 .../spring-baremetal-planner-context.xml        |   34 +
 .../baremetal-storage/module.properties         |   18 +
 .../spring-baremetal-storage-context.xml        |   32 +
 .../core/spring-baremetal-core-context.xml      |   42 +
 .../BareMetalPingServiceImpl.java               |    3 -
 .../networkservice/BareMetalResourceBase.java   |    2 +-
 .../networkservice/BaremetaNetworkGuru.java     |   21 +-
 .../networkservice/BaremetalDhcpElement.java    |    4 -
 .../BaremetalDhcpManagerImpl.java               |    4 -
 .../BaremetalKickStartServiceImpl.java          |    7 +-
 .../networkservice/BaremetalPxeElement.java     |    4 -
 .../cloudstack/kvm-compute/module.properties    |   18 +
 .../kvm-compute/spring-kvm-compute-context.xml  |   34 +
 .../kvm/resource/LibvirtComputingResource.java  |    2 +-
 .../cloudstack/ovm-compute/module.properties    |   18 +
 .../ovm-compute/spring-ovm-compute-context.xml  |   39 +
 .../cloudstack/ovm-discoverer/module.properties |   18 +
 .../spring-ovm-discoverer-context.xml           |   34 +
 .../cloud/ovm/hypervisor/OvmResourceBase.java   |    4 +-
 .../core/spring-simulator-core-context.xml      |   45 +
 .../simulator-compute/module.properties         |   18 +
 .../spring-simulator-compute-context.xml        |   34 +
 .../simulator-discoverer/module.properties      |   18 +
 .../spring-simulator-discover-context.xml       |   36 +
 .../simulator-planner/module.properties         |   18 +
 .../simulator-planner/spring-context.xml        |   34 +
 .../simulator-storage/module.properties         |   18 +
 .../spring-simulator-storage-context.xml        |   33 +
 .../agent/manager/MockAgentManagerImpl.java     |   95 +-
 .../agent/manager/MockStorageManagerImpl.java   |  170 +-
 .../cloud/agent/manager/MockVmManagerImpl.java  |   48 +-
 .../agent/manager/SimulatorManagerImpl.java     |   10 +-
 .../cloud/resource/AgentRoutingResource.java    |    2 +-
 .../simulator/dao/MockConfigurationDaoImpl.java |    4 +-
 .../motion/SimulatorDataMotionStrategy.java     |   10 +-
 .../cloudstack/core/spring-ucs-core-context.xml |   35 +
 .../com/cloud/ucs/manager/UcsManagerImpl.java   |    3 -
 .../core/spring-vmware-core-context.xml         |   43 +
 .../cloudstack/vmware-compute/module.properties |   18 +
 .../spring-vmware-compute-context.xml           |   43 +
 .../vmware-compute/vmware-defaults.properties   |   17 +
 .../vmware-discoverer/module.properties         |   18 +
 .../spring-vmware-discoverer-context.xml        |   35 +
 .../cloudstack/vmware-network/module.properties |   18 +
 .../spring-vmware-network-context.xml           |   34 +
 .../cloudstack/vmware-storage/module.properties |   18 +
 .../spring-vmware-storage-context.xml           |   33 +
 .../vmware/VmwareServerDiscoverer.java          |   33 +-
 .../vmware/manager/VmwareManagerImpl.java       |   53 +-
 .../vmware/resource/VmwareResource.java         |   12 +-
 .../network/CiscoNexusVSMDeviceManagerImpl.java |   68 +-
 .../network/element/CiscoNexusVSMElement.java   |   50 +-
 .../motion/VmwareStorageMotionStrategy.java     |   12 +-
 .../motion/VmwareStorageMotionStrategyTest.java |   10 +-
 .../xenserver-compute/module.properties         |   18 +
 .../spring-xenserver-compute-context.xml        |   28 +
 .../xenserver-discoverer/module.properties      |   18 +
 .../spring-xenserver-discoverer-context.xml     |   25 +
 .../xen/resource/CitrixResourceBase.java        |  117 +-
 .../xen/resource/XenServer56FP1Resource.java    |   26 +-
 .../xen/resource/XenServer610Resource.java      |   22 +
 .../xen/resource/XenServerPoolVms.java          |   39 +-
 .../motion/XenServerStorageMotionStrategy.java  |   12 +-
 .../META-INF/cloudstack/vns/module.properties   |   18 +
 .../cloudstack/vns/spring-vns-context.xml       |   36 +
 .../network/element/BigSwitchVnsElement.java    |   45 +-
 .../cloud/network/element/CiscoVnmcElement.java |  263 +-
 .../META-INF/cloudstack/elb/module.properties   |   18 +
 .../cloudstack/elb/spring-elb-context.xml       |   34 +
 .../lb/ElasticLoadBalancerManagerImpl.java      |   34 +-
 .../core/spring-internallb-core-context.xml     |   37 +
 .../lb/InternalLoadBalancerVMManagerImpl.java   |    2 +-
 .../JuniperSRXExternalFirewallElement.java      |   38 +-
 .../cloudstack/midonet/module.properties        |   18 +
 .../midonet/spring-midonet-context.xml          |   37 +
 .../network/guru/MidoNetPublicNetworkGuru.java  |   19 +-
 .../cloud/network/element/NetscalerElement.java |   52 +-
 .../META-INF/cloudstack/nvp/module.properties   |   18 +
 .../cloudstack/nvp/spring-nvp-context.xml       |   40 +
 .../cloud/network/element/NiciraNvpElement.java |   45 +-
 .../META-INF/cloudstack/ovs/module.properties   |   18 +
 .../cloudstack/ovs/spring-ovs-context.xml       |   40 +
 .../META-INF/cloudstack/ssp/module.properties   |   18 +
 .../cloudstack/ssp/spring-ssp-context.xml       |   42 +
 .../META-INF/cloudstack/vxlan/module.properties |   18 +
 .../cloudstack/vxlan/spring-vxlan-context.xml   |   34 +
 .../storage-image-default/module.properties     |   18 +
 .../spring-storage-image-default-context.xml    |   33 +
 .../storage-image-s3/module.properties          |   18 +
 .../spring-storage-image-s3-context.xml         |   34 +
 .../storage-image-swift/module.properties       |   18 +
 .../spring-storage-image-swift-context.xml      |   33 +
 .../storage-volume-default/module.properties    |   18 +
 .../spring-storage-volume-default-context.xml   |   35 +
 .../CloudStackPrimaryDataStoreDriverImpl.java   |   49 +-
 .../SamplePrimaryDataStoreDriverImpl.java       |   22 +-
 .../storage-volume-solidfire/module.properties  |   18 +
 .../spring-storage-volume-solidfire-context.xml |   33 +
 .../driver/SolidfirePrimaryDataStoreDriver.java |   73 +-
 .../cloudstack/storage/test/AopTestAdvice.java  |    4 +-
 .../META-INF/cloudstack/ldap/module.properties  |   18 +
 .../cloudstack/ldap/spring-ldap-context.xml     |   39 +
 .../META-INF/cloudstack/md5/module.properties   |   18 +
 .../cloudstack/md5/spring-md5-context.xml       |   34 +
 .../cloudstack/plaintext/module.properties      |   18 +
 .../plaintext/spring-plaintext-context.xml      |   35 +
 .../cloudstack/sha256salted/module.properties   |   18 +
 .../spring-sha256salted-context.xml             |   34 +
 pom.xml                                         |   15 +-
 python/lib/cloudutils/serviceConfig.py          |    2 +-
 quickcloud/pom.xml                              |   30 +
 .../spring-quickcloud-core-context-override.xml |   32 +
 .../vm/hypervisor/xenserver/setupxenserver.sh   |    2 +-
 scripts/vm/hypervisor/xenserver/vmops           |    2 +-
 server/conf/cloudstack-sudoers.in               |    2 +-
 server/pom.xml                                  |   15 +-
 .../spring-server-core-managers-context.xml     |  214 ++
 .../core/spring-server-core-misc-context.xml    |   68 +
 .../module.properties                           |   18 +
 ...ing-server-alert-adapter-backend-context.xml |   32 +
 .../module.properties                           |   18 +
 ...ing-server-alert-adapter-compute-context.xml |   32 +
 .../module.properties                           |   18 +
 ...ing-server-alert-adapter-storage-context.xml |   32 +
 .../server-allocator/module.properties          |   18 +
 .../spring-server-allocator-context.xml         |   48 +
 .../cloudstack/server-api/module.properties     |   18 +
 .../server-api/spring-server-api-context.xml    |   33 +
 .../cloudstack/server-compute/module.properties |   18 +
 .../spring-server-compute-context.xml           |   38 +
 .../server-discoverer/module.properties         |   18 +
 .../spring-server-discoverer-context.xml        |   45 +
 .../cloudstack/server-fencer/module.properties  |   18 +
 .../spring-server-fencer-context.xml            |   37 +
 .../server-investigator/module.properties       |   18 +
 .../spring-server-investigator-context.xml      |   46 +
 .../cloudstack/server-network/module.properties |   18 +
 .../spring-server-network-context.xml           |   64 +
 .../cloudstack/server-planner/module.properties |   18 +
 .../spring-server-planner-context.xml           |   34 +
 .../cloudstack/server-storage/module.properties |   18 +
 .../spring-server-storage-context.xml           |   34 +
 .../server-template-adapter/module.properties   |   18 +
 .../spring-server-template-adapter-context.xml  |   32 +
 server/src/com/cloud/api/ApiResponseHelper.java |   22 +-
 server/src/com/cloud/api/ApiServer.java         |   72 +-
 .../com/cloud/api/query/QueryManagerImpl.java   |   59 +-
 .../cloud/api/query/dao/UserVmJoinDaoImpl.java  |   13 +-
 .../com/cloud/api/query/vo/UserVmJoinVO.java    |   15 +
 .../com/cloud/capacity/CapacityManagerImpl.java |  321 +-
 server/src/com/cloud/configuration/Config.java  |    4 +-
 .../configuration/ConfigurationManagerImpl.java |  925 ++---
 .../consoleproxy/ConsoleProxyManagerImpl.java   |   34 +-
 .../consoleproxy/StaticConsoleProxyManager.java |    3 +
 .../cloud/dc/dao/DedicatedResourceDaoImpl.java  |    3 +-
 .../deploy/DeploymentPlanningManagerImpl.java   |  190 +-
 .../com/cloud/event/ActionEventInterceptor.java |   33 +-
 .../ha/HighAvailabilityManagerExtImpl.java      |    7 +-
 .../cloud/ha/dao/HighAvailabilityDaoImpl.java   |    3 +-
 .../cloud/hypervisor/HypervisorGuruBase.java    |    6 +-
 .../metadata/ResourceMetaDataManagerImpl.java   |  116 +-
 .../network/ExternalDeviceUsageManagerImpl.java |  155 +-
 .../ExternalFirewallDeviceManagerImpl.java      |   46 +-
 .../ExternalLoadBalancerDeviceManagerImpl.java  |  171 +-
 .../com/cloud/network/IpAddressManagerImpl.java |  988 +++---
 .../com/cloud/network/NetworkServiceImpl.java   |  605 ++--
 .../cloud/network/NetworkUsageManagerImpl.java  |   50 +-
 .../cloud/network/PortProfileManagerImpl.java   |   39 +-
 .../network/StorageNetworkManagerImpl.java      |  169 +-
 .../cloud/network/as/AutoScaleManagerImpl.java  |  191 +-
 .../network/element/VirtualRouterElement.java   |    8 +-
 .../network/firewall/FirewallManagerImpl.java   |   93 +-
 .../cloud/network/guru/DirectNetworkGuru.java   |  121 +-
 .../network/guru/DirectPodBasedNetworkGuru.java |  113 +-
 .../cloud/network/guru/GuestNetworkGuru.java    |   17 +-
 .../cloud/network/guru/PublicNetworkGuru.java   |   20 +-
 .../lb/LoadBalancingRulesManagerImpl.java       |  395 ++-
 .../VirtualNetworkApplianceManagerImpl.java     |  456 ++-
 .../cloud/network/rules/RulesManagerImpl.java   |  227 +-
 .../security/SecurityGroupManagerImpl.java      |  526 +--
 .../network/vpc/NetworkACLManagerImpl.java      |   40 +-
 .../com/cloud/network/vpc/VpcManagerImpl.java   |  639 ++--
 .../network/vpn/RemoteAccessVpnManagerImpl.java |  228 +-
 .../com/cloud/projects/ProjectManagerImpl.java  |  365 +-
 .../com/cloud/resource/ResourceManagerImpl.java |  305 +-
 .../resourcelimit/ResourceLimitManagerImpl.java |  333 +-
 .../cloud/server/ConfigurationServerImpl.java   |  637 ++--
 .../com/cloud/server/ManagementServerImpl.java  |   47 +-
 server/src/com/cloud/server/StatsCollector.java |  247 +-
 .../com/cloud/servlet/CloudStartupServlet.java  |    3 +-
 .../com/cloud/servlet/ConsoleProxyServlet.java  |    3 +-
 .../com/cloud/storage/StorageManagerImpl.java   |   30 +-
 .../com/cloud/storage/VolumeApiServiceImpl.java |   32 +-
 .../storage/snapshot/SnapshotManagerImpl.java   |   68 +-
 .../cloud/tags/TaggedResourceManagerImpl.java   |  110 +-
 .../com/cloud/template/TemplateAdapterBase.java |   17 +
 .../com/cloud/template/TemplateManagerImpl.java |   42 +-
 server/src/com/cloud/test/DatabaseConfig.java   |   67 +-
 server/src/com/cloud/test/IPRangeConfig.java    |   15 +-
 server/src/com/cloud/test/PodZoneConfig.java    |    7 +-
 .../src/com/cloud/usage/UsageServiceImpl.java   |   28 +-
 .../src/com/cloud/user/AccountManagerImpl.java  |  192 +-
 .../src/com/cloud/user/DomainManagerImpl.java   |   70 +-
 .../cloud/uuididentity/dao/IdentityDaoImpl.java |   13 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java  |  714 ++--
 .../vm/snapshot/VMSnapshotManagerImpl.java      |   45 +-
 .../affinity/AffinityGroupServiceImpl.java      |  107 +-
 .../lb/ApplicationLoadBalancerManagerImpl.java  |   52 +-
 .../cloudstack/region/RegionManagerImpl.java    |    2 +-
 .../GlobalLoadBalancingRulesServiceImpl.java    |  219 +-
 .../configuration/ConfigurationManagerTest.java |   20 +-
 .../cloud/network/CreatePrivateNetworkTest.java |    6 +-
 .../network/DedicateGuestVlanRangesTest.java    |   18 +-
 .../network/UpdatePhysicalNetworkTest.java      |    5 +-
 .../vpn/MockRemoteAccessVPNServiceProvider.java |    5 +-
 .../cloud/vpc/MockConfigurationManagerImpl.java |    2 +-
 .../cloud/vpc/dao/MockConfigurationDaoImpl.java |   11 +-
 .../CreateNetworkOfferingTest.java              |   20 +-
 .../cloudstack/region/RegionManagerTest.java    |   29 +-
 ...GlobalLoadBalancingRulesServiceImplTest.java |   28 +-
 .../module.properties                           |   18 +
 ...ing-secondary-storage-discoverer-context.xml |   36 +
 setup/db/db/schema-420to421.sql                 |  190 +-
 setup/db/db/schema-421to430.sql                 |    2 +
 setup/dev/advanced.cfg                          |    6 +-
 .../debian/config/etc/init.d/cloud-early-config |    1 +
 .../debian/config/opt/cloud/bin/savepassword.sh |   65 +
 .../redundant_router/check_heartbeat.sh.templ   |    5 +-
 .../config/root/redundant_router/fault.sh.templ |    4 +
 .../patches/debian/config/root/savepassword.sh  |   58 -
 .../component/test_egress_fw_rules.py           |  108 +-
 .../component/test_persistent_networks.py       |  290 ++
 tools/appliance/definitions/devcloud/base.sh    |    2 +-
 .../definitions/systemvm64template/base.sh      |    2 +-
 .../systemvm64template/postinstall.sh           |    2 +-
 .../definitions/systemvmtemplate/base.sh        |    2 +-
 .../definitions/systemvmtemplate/postinstall.sh |    2 +-
 .../src/deps/boxes/basebox-build/postinstall.sh |    2 +-
 tools/marvin/marvin/cloudstackConnection.py     |  120 +-
 tools/marvin/marvin/cloudstackTestClient.py     |   55 +-
 tools/marvin/marvin/codegenerator.py            |    2 +-
 tools/marvin/marvin/codes.py                    |   35 +
 tools/marvin/marvin/configGenerator.py          |    9 +-
 tools/marvin/marvin/deployDataCenter.py         |   54 +-
 ui/css/cloudstack3.css                          |   23 +-
 ui/dictionary.jsp                               |    2 +
 ui/index.jsp                                    | 3229 +++++++++---------
 ui/scripts/accounts.js                          |   30 +
 ui/scripts/instanceWizard.js                    |    3 +
 ui/scripts/instances.js                         |   51 +-
 ui/scripts/network.js                           |    4 +-
 ui/scripts/sharedFunctions.js                   |    1 +
 ui/scripts/storage.js                           |    2 +-
 ui/scripts/system.js                            |   38 +-
 ui/scripts/templates.js                         |  105 +-
 ui/scripts/ui-custom/instanceWizard.js          |   67 +-
 ui/scripts/ui/dialog.js                         |   10 +-
 ui/scripts/ui/widgets/detailView.js             |    7 +
 usage/src/com/cloud/usage/UsageManagerImpl.java |   16 +-
 .../src/com/cloud/usage/UsageSanityChecker.java |    4 +-
 utils/pom.xml                                   |   29 +
 utils/src/com/cloud/utils/DateUtil.java         |   41 +-
 utils/src/com/cloud/utils/PropertiesUtil.java   |   16 +
 .../cloud/utils/component/ComponentContext.java |   27 +-
 .../cloud/utils/exception/ExceptionUtil.java    |   12 +
 utils/src/com/cloud/utils/net/NetUtils.java     |   12 +
 utils/src/com/cloud/utils/ssh/SshHelper.java    |   10 +-
 .../com/cloud/utils/PropertiesUtilsTest.java    |   41 +
 .../utils/exception/ExceptionUtilTest.java      |   48 +
 640 files changed, 23160 insertions(+), 13139 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1ee002/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1ee002/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1ee002/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --cc engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
index 913112c,48416a2..d566b31
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
@@@ -40,8 -40,8 +40,8 @@@ import com.cloud.utils.db.DB
  import com.cloud.utils.db.GenericDaoBase;
  import com.cloud.utils.db.SearchBuilder;
  import com.cloud.utils.db.SearchCriteria;
 -import com.cloud.utils.db.TransactionLegacy;
  import com.cloud.utils.db.SearchCriteria.Op;
- import com.cloud.utils.db.Transaction;
++import com.cloud.utils.db.TransactionLegacy;
  import com.cloud.utils.db.UpdateBuilder;
  
  @Component
@@@ -171,16 -171,6 +171,16 @@@ public class SnapshotDataStoreDaoImpl e
      }
  
      @Override
 +    public void deleteSnapshotRecordsOnPrimary() {
 +        SearchCriteria<SnapshotDataStoreVO> sc = storeSearch.create();
 +        sc.setParameters("store_role", DataStoreRole.Primary);
-         Transaction txn = Transaction.currentTxn();
++        TransactionLegacy txn = TransactionLegacy.currentTxn();
 +        txn.start();
 +        remove(sc);
 +        txn.commit();
 +    }
 +
 +    @Override
      public SnapshotDataStoreVO findByStoreSnapshot(DataStoreRole role, long storeId, long snapshotId) {
          SearchCriteria<SnapshotDataStoreVO> sc = storeSnapshotSearch.create();
          sc.setParameters("store_id", storeId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1ee002/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --cc engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
index 5c1ec33,4509e23..b7c70cc
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
@@@ -47,9 -43,8 +47,9 @@@ import com.cloud.utils.db.GenericDaoBas
  import com.cloud.utils.db.SearchBuilder;
  import com.cloud.utils.db.SearchCriteria;
  import com.cloud.utils.db.SearchCriteria.Op;
- import com.cloud.utils.db.Transaction;
+ import com.cloud.utils.db.TransactionLegacy;
  import com.cloud.utils.db.UpdateBuilder;
 +import com.cloud.utils.exception.CloudRuntimeException;
  
  @Component
  public class TemplateDataStoreDaoImpl extends GenericDaoBase<TemplateDataStoreVO, Long> implements TemplateDataStoreDao {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1ee002/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --cc engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
index 4118079,2bacd03..ef0a8c5
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
@@@ -34,8 -33,8 +34,8 @@@ import org.apache.cloudstack.storage.da
  import com.cloud.utils.db.GenericDaoBase;
  import com.cloud.utils.db.SearchBuilder;
  import com.cloud.utils.db.SearchCriteria;
 -import com.cloud.utils.db.TransactionLegacy;
  import com.cloud.utils.db.SearchCriteria.Op;
- import com.cloud.utils.db.Transaction;
++import com.cloud.utils.db.TransactionLegacy;
  import com.cloud.utils.db.UpdateBuilder;
  
  @Component

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1ee002/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/server/ManagementServerImpl.java
index e3d4137,bce6b45..5273203
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@@ -2214,27 -2215,26 +2217,26 @@@ public class ManagementServerImpl exten
              }
          }
  
-         Transaction txn = Transaction.currentTxn();
- 
-         txn.start();
- 
+         Transaction.execute(new TransactionCallbackNoReturn() {
+             @Override
+             public void doInTransactionWithoutResult(TransactionStatus status) {
 -                if (domainName != null) {
 -                    String updatedDomainPath = getUpdatedDomainPath(domain.getPath(), domainName);
 -                    updateDomainChildren(domain, updatedDomainPath);
 -                    domain.setName(domainName);
 -                    domain.setPath(updatedDomainPath);
 -                }
 -        
 -                if (networkDomain != null) {
 -                    if (networkDomain.isEmpty()) {
 -                        domain.setNetworkDomain(null);
 -                    } else {
 -                        domain.setNetworkDomain(networkDomain);
 -                    }
 -                }
 -                _domainDao.update(domainId, domain);
 +        if (domainName != null) {
 +            String updatedDomainPath = getUpdatedDomainPath(domain.getPath(), domainName);
 +            updateDomainChildren(domain, updatedDomainPath);
 +            domain.setName(domainName);
 +            domain.setPath(updatedDomainPath);
 +        }
 +
 +        if (networkDomain != null) {
 +            if (networkDomain.isEmpty()) {
 +                domain.setNetworkDomain(null);
 +            } else {
 +                domain.setNetworkDomain(networkDomain);
 +            }
 +        }
 +        _domainDao.update(domainId, domain);
- 
-         txn.commit();
+             }
+         });
  
          return _domainDao.findById(domainId);
  
@@@ -3671,35 -3670,30 +3673,30 @@@
                  throw new InvalidParameterValueException("This operation is not supported for this hypervisor type");
              }
              // get all the hosts in this cluster
-             List<HostVO> hosts = _resourceMgr.listAllHostsInCluster(cmd.getClusterId());
-             Transaction txn = Transaction.currentTxn();
-             try {
-                 txn.start();
+             final List<HostVO> hosts = _resourceMgr.listAllHostsInCluster(cmd.getClusterId());
+ 
+             Transaction.execute(new TransactionCallbackNoReturn() {
+                 @Override
+                 public void doInTransactionWithoutResult(TransactionStatus status) {
 -                    for (HostVO h : hosts) {
 -                        if (s_logger.isDebugEnabled()) {
 -                            s_logger.debug("Changing password for host name = " + h.getName());
 -                        }
 -                        // update password for this host
 -                        DetailVO nv = _detailsDao.findDetail(h.getId(), ApiConstants.USERNAME);
 -                        if (nv.getValue().equals(cmd.getUsername())) {
 -                            DetailVO nvp = _detailsDao.findDetail(h.getId(), ApiConstants.PASSWORD);
 -                            nvp.setValue(DBEncryptionUtil.encrypt(cmd.getPassword()));
 -                            _detailsDao.persist(nvp);
 -                        } else {
 -                            // if one host in the cluster has diff username then
 -                            // rollback to maintain consistency
 -                            throw new InvalidParameterValueException(
 -                                    "The username is not same for all hosts, please modify passwords for individual hosts.");
 -                        }
 +                for (HostVO h : hosts) {
 +                    if (s_logger.isDebugEnabled()) {
 +                        s_logger.debug("Changing password for host name = " + h.getName());
 +                    }
 +                    // update password for this host
 +                    DetailVO nv = _detailsDao.findDetail(h.getId(), ApiConstants.USERNAME);
 +                    if (nv.getValue().equals(cmd.getUsername())) {
 +                        DetailVO nvp = _detailsDao.findDetail(h.getId(), ApiConstants.PASSWORD);
 +                        nvp.setValue(DBEncryptionUtil.encrypt(cmd.getPassword()));
 +                        _detailsDao.persist(nvp);
 +                    } else {
 +                        // if one host in the cluster has diff username then
 +                        // rollback to maintain consistency
-                         txn.rollback();
 +                        throw new InvalidParameterValueException(
 +                                "The username is not same for all hosts, please modify passwords for individual hosts.");
                      }
                  }
-                 txn.commit();
-                 // if hypervisor is xenserver then we update it in
-                 // CitrixResourceBase
-             } catch (Exception e) {
-                 txn.rollback();
-                 throw new CloudRuntimeException("Failed to update password " + e.getMessage());
 +            }
+             });
          }
  
          return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1ee002/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/storage/StorageManagerImpl.java
index eaefcb2,75cedd0..8e199ee
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@@ -1810,17 -1782,20 +1814,20 @@@ public class StorageManagerImpl extend
          }
  
          // ready to delete
-         Transaction txn = Transaction.currentTxn();
-         txn.start();
+         Transaction.execute(new TransactionCallbackNoReturn() {
+             @Override
+             public void doInTransactionWithoutResult(TransactionStatus status) {
 -                // first delete from image_store_details table, we need to do that since
 -                // we are not actually deleting record from main
 -                // image_data_store table, so delete cascade will not work
 -                _imageStoreDetailsDao.deleteDetails(storeId);
 -                _snapshotStoreDao.deletePrimaryRecordsForStore(storeId, DataStoreRole.Image);
 -                _volumeStoreDao.deletePrimaryRecordsForStore(storeId);
 -                _templateStoreDao.deletePrimaryRecordsForStore(storeId);
 -                _imageStoreDao.remove(storeId);
 +        // first delete from image_store_details table, we need to do that since
 +        // we are not actually deleting record from main
 +        // image_data_store table, so delete cascade will not work
 +        _imageStoreDetailsDao.deleteDetails(storeId);
 +        _snapshotStoreDao.deletePrimaryRecordsForStore(storeId, DataStoreRole.Image);
 +        _volumeStoreDao.deletePrimaryRecordsForStore(storeId);
 +        _templateStoreDao.deletePrimaryRecordsForStore(storeId);
 +        _imageStoreDao.remove(storeId);
-         txn.commit();
+             }
+         });
+ 
          return true;
      }
  
@@@ -1919,17 -1894,20 +1926,20 @@@
          }
  
          // ready to delete
-         Transaction txn = Transaction.currentTxn();
-         txn.start();
+         Transaction.execute(new TransactionCallbackNoReturn() {
+             @Override
+             public void doInTransactionWithoutResult(TransactionStatus status) {
 -                // first delete from image_store_details table, we need to do that since
 -                // we are not actually deleting record from main
 -                // image_data_store table, so delete cascade will not work
 -                _imageStoreDetailsDao.deleteDetails(storeId);
 -                _snapshotStoreDao.deletePrimaryRecordsForStore(storeId, DataStoreRole.ImageCache);
 -                _volumeStoreDao.deletePrimaryRecordsForStore(storeId);
 -                _templateStoreDao.deletePrimaryRecordsForStore(storeId);
 -                _imageStoreDao.remove(storeId);
 +        // first delete from image_store_details table, we need to do that since
 +        // we are not actually deleting record from main
 +        // image_data_store table, so delete cascade will not work
 +        _imageStoreDetailsDao.deleteDetails(storeId);
 +        _snapshotStoreDao.deletePrimaryRecordsForStore(storeId, DataStoreRole.ImageCache);
 +        _volumeStoreDao.deletePrimaryRecordsForStore(storeId);
 +        _templateStoreDao.deletePrimaryRecordsForStore(storeId);
 +        _imageStoreDao.remove(storeId);
-         txn.commit();
+             }
+         });
+ 
          return true;
      }
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1ee002/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 12f0102,071281c..cfb54f0
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@@ -404,35 -405,35 +406,35 @@@ public class VolumeApiServiceImpl exten
      }
  
      @DB
-     protected VolumeVO persistVolume(Account owner, Long zoneId, String volumeName, String url, String format) {
- 
-         Transaction txn = Transaction.currentTxn();
-         txn.start();
- 
+     protected VolumeVO persistVolume(final Account owner, final Long zoneId, final String volumeName, final String url, final String format) {
+         return Transaction.execute(new TransactionCallback<VolumeVO>() {
+             @Override
+             public VolumeVO doInTransaction(TransactionStatus status) {
 -                VolumeVO volume = new VolumeVO(volumeName, zoneId, -1, -1, -1, new Long(-1), null, null, 0, Volume.Type.DATADISK);
 -                volume.setPoolId(null);
 -                volume.setDataCenterId(zoneId);
 -                volume.setPodId(null);
 -                volume.setAccountId(owner.getAccountId());
 -                volume.setDomainId(owner.getDomainId());
 -                long diskOfferingId = _diskOfferingDao.findByUniqueName("Cloud.com-Custom").getId();
 -                volume.setDiskOfferingId(diskOfferingId);
 -                // volume.setSize(size);
 -                volume.setInstanceId(null);
 -                volume.setUpdated(new Date());
 -                volume.setDomainId((owner == null) ? Domain.ROOT_DOMAIN : owner.getDomainId());
 -                volume.setFormat(ImageFormat.valueOf(format));
 -                volume = _volsDao.persist(volume);
 -                CallContext.current().setEventDetails("Volume Id: " + volume.getId());
 -        
 -                // Increment resource count during allocation; if actual creation fails,
 -                // decrement it
 -                _resourceLimitMgr.incrementResourceCount(volume.getAccountId(), ResourceType.volume);
 -                _resourceLimitMgr.incrementResourceCount(volume.getAccountId(), ResourceType.secondary_storage, UriUtils.getRemoteSize(url));
 -                
 -                return volume;
 -            }
 +        VolumeVO volume = new VolumeVO(volumeName, zoneId, -1, -1, -1, new Long(-1), null, null, 0, Volume.Type.DATADISK);
 +        volume.setPoolId(null);
 +        volume.setDataCenterId(zoneId);
 +        volume.setPodId(null);
 +        volume.setAccountId(owner.getAccountId());
 +        volume.setDomainId(owner.getDomainId());
 +        long diskOfferingId = _diskOfferingDao.findByUniqueName("Cloud.com-Custom").getId();
 +        volume.setDiskOfferingId(diskOfferingId);
 +        // volume.setSize(size);
 +        volume.setInstanceId(null);
 +        volume.setUpdated(new Date());
 +        volume.setDomainId((owner == null) ? Domain.ROOT_DOMAIN : owner.getDomainId());
 +        volume.setFormat(ImageFormat.valueOf(format));
 +        volume = _volsDao.persist(volume);
 +        CallContext.current().setEventDetails("Volume Id: " + volume.getId());
 +
 +        // Increment resource count during allocation; if actual creation fails,
 +        // decrement it
 +        _resourceLimitMgr.incrementResourceCount(volume.getAccountId(), ResourceType.volume);
 +        _resourceLimitMgr.incrementResourceCount(volume.getAccountId(), ResourceType.secondary_storage, UriUtils.getRemoteSize(url));
 +
-         txn.commit();
 +        return volume;
 +    }
+         });
+     }
  
      /*
       * Just allocate a volume in the database, don't send the createvolume cmd
@@@ -600,48 -601,56 +602,56 @@@
              userSpecifiedName = getRandomVolumeName();
          }
  
-         Transaction txn = Transaction.currentTxn();
-         txn.start();
+         VolumeVO volume = commitVolume(cmd, caller, ownerId, displayVolumeEnabled, zoneId, diskOfferingId, size,
+                 minIops, maxIops, parentVolume, userSpecifiedName);
  
+         return volume;
+     }
+ 
+     private VolumeVO commitVolume(final CreateVolumeCmd cmd, final Account caller, final long ownerId, final Boolean displayVolumeEnabled,
+             final Long zoneId, final Long diskOfferingId, final Long size, final Long minIops, final Long maxIops, final VolumeVO parentVolume,
+             final String userSpecifiedName) {
+         return Transaction.execute(new TransactionCallback<VolumeVO>() {
+             @Override
+             public VolumeVO doInTransaction(TransactionStatus status) {
 -                VolumeVO volume = new VolumeVO(userSpecifiedName, -1, -1, -1, -1, new Long(-1), null, null, 0, Volume.Type.DATADISK);
 -                volume.setPoolId(null);
 -                volume.setDataCenterId(zoneId);
 -                volume.setPodId(null);
 -                volume.setAccountId(ownerId);
 -                volume.setDomainId(((caller == null) ? Domain.ROOT_DOMAIN : caller.getDomainId()));
 -                volume.setDiskOfferingId(diskOfferingId);
 -                volume.setSize(size);
 -                volume.setMinIops(minIops);
 -                volume.setMaxIops(maxIops);
 -                volume.setInstanceId(null);
 -                volume.setUpdated(new Date());
 -                volume.setDomainId((caller == null) ? Domain.ROOT_DOMAIN : caller.getDomainId());
 -                volume.setDisplayVolume(displayVolumeEnabled);
 -                if (parentVolume != null) {
 -                    volume.setTemplateId(parentVolume.getTemplateId());
 -                    volume.setFormat(parentVolume.getFormat());
 -                } else {
 -                    volume.setTemplateId(null);
 -                }
 -        
 -                volume = _volsDao.persist(volume);
 -                if (cmd.getSnapshotId() == null) {
 -                    // for volume created from snapshot, create usage event after volume creation
 -                    UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VOLUME_CREATE, volume.getAccountId(), volume.getDataCenterId(), volume.getId(), volume.getName(), diskOfferingId,
 -                            null, size, Volume.class.getName(), volume.getUuid());
 -                }
 -        
 -                CallContext.current().setEventDetails("Volume Id: " + volume.getId());
 -        
 -                // Increment resource count during allocation; if actual creation fails,
 -                // decrement it
 -                _resourceLimitMgr.incrementResourceCount(volume.getAccountId(), ResourceType.volume);
 -                _resourceLimitMgr.incrementResourceCount(volume.getAccountId(), ResourceType.primary_storage, new Long(volume.getSize()));
 -                return volume;
 -            }
 +        VolumeVO volume = new VolumeVO(userSpecifiedName, -1, -1, -1, -1, new Long(-1), null, null, 0, Volume.Type.DATADISK);
 +        volume.setPoolId(null);
 +        volume.setDataCenterId(zoneId);
 +        volume.setPodId(null);
 +        volume.setAccountId(ownerId);
 +        volume.setDomainId(((caller == null) ? Domain.ROOT_DOMAIN : caller.getDomainId()));
 +        volume.setDiskOfferingId(diskOfferingId);
 +        volume.setSize(size);
 +        volume.setMinIops(minIops);
 +        volume.setMaxIops(maxIops);
 +        volume.setInstanceId(null);
 +        volume.setUpdated(new Date());
 +        volume.setDomainId((caller == null) ? Domain.ROOT_DOMAIN : caller.getDomainId());
 +        volume.setDisplayVolume(displayVolumeEnabled);
 +        if (parentVolume != null) {
 +            volume.setTemplateId(parentVolume.getTemplateId());
 +            volume.setFormat(parentVolume.getFormat());
 +        } else {
 +            volume.setTemplateId(null);
 +        }
 +
 +        volume = _volsDao.persist(volume);
 +        if (cmd.getSnapshotId() == null) {
 +            // for volume created from snapshot, create usage event after volume creation
 +            UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VOLUME_CREATE, volume.getAccountId(), volume.getDataCenterId(), volume.getId(), volume.getName(), diskOfferingId,
 +                    null, size, Volume.class.getName(), volume.getUuid());
 +        }
 +
 +        CallContext.current().setEventDetails("Volume Id: " + volume.getId());
 +
 +        // Increment resource count during allocation; if actual creation fails,
 +        // decrement it
 +        _resourceLimitMgr.incrementResourceCount(volume.getAccountId(), ResourceType.volume);
 +        _resourceLimitMgr.incrementResourceCount(volume.getAccountId(), ResourceType.primary_storage, new Long(volume.getSize()));
- 
-         txn.commit();
- 
 +        return volume;
 +    }
+         });
+     }
  
      public boolean validateVolumeSizeRange(long size) {
          if (size < 0 || (size > 0 && size < (1024 * 1024 * 1024))) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a1ee002/server/src/com/cloud/template/TemplateManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/template/TemplateManagerImpl.java
index 3b2ec58,fb1bb27..aa4473d
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@@ -1290,28 -1284,31 +1290,31 @@@ public class TemplateManagerImpl extend
  
          //Derive the domain id from the template owner as updateTemplatePermissions is not cross domain operation
          Account owner = _accountMgr.getAccount(ownerId);
-         Domain domain = _domainDao.findById(owner.getDomainId());
+         final Domain domain = _domainDao.findById(owner.getDomainId());
          if ("add".equalsIgnoreCase(operation)) {
-             txn.start();
-             for (String accountName : accountNames) {
+             final List<String> accountNamesFinal = accountNames; 
+             Transaction.execute(new TransactionCallbackNoReturn() {
+                 @Override
+                 public void doInTransactionWithoutResult(TransactionStatus status) {
+                     for (String accountName : accountNamesFinal) {
 -                        Account permittedAccount = _accountDao.findActiveAccount(accountName, domain.getId());
 -                        if (permittedAccount != null) {
 -                            if (permittedAccount.getId() == caller.getId()) {
 -                                continue; // don't grant permission to the template
 -                                // owner, they implicitly have permission
 -                            }
 -                            LaunchPermissionVO existingPermission = _launchPermissionDao.findByTemplateAndAccount(id, permittedAccount.getId());
 -                            if (existingPermission == null) {
 -                                LaunchPermissionVO launchPermission = new LaunchPermissionVO(id, permittedAccount.getId());
 -                                _launchPermissionDao.persist(launchPermission);
 -                            }
 -                        } else {
 -                            throw new InvalidParameterValueException("Unable to grant a launch permission to account " + accountName + " in domain id=" + domain.getUuid()
 -                                    + ", account not found.  " + "No permissions updated, please verify the account names and retry.");
 -                        }
 +                Account permittedAccount = _accountDao.findActiveAccount(accountName, domain.getId());
 +                if (permittedAccount != null) {
 +                    if (permittedAccount.getId() == caller.getId()) {
 +                        continue; // don't grant permission to the template
 +                        // owner, they implicitly have permission
                      }
 +                    LaunchPermissionVO existingPermission = _launchPermissionDao.findByTemplateAndAccount(id, permittedAccount.getId());
 +                    if (existingPermission == null) {
 +                        LaunchPermissionVO launchPermission = new LaunchPermissionVO(id, permittedAccount.getId());
 +                        _launchPermissionDao.persist(launchPermission);
 +                    }
 +                } else {
-                     txn.rollback();
 +                    throw new InvalidParameterValueException("Unable to grant a launch permission to account " + accountName + " in domain id=" + domain.getUuid()
 +                            + ", account not found.  " + "No permissions updated, please verify the account names and retry.");
 +                }
 +            }
-             txn.commit();
+                 }
+             });
          } else if ("remove".equalsIgnoreCase(operation)) {
              List<Long> accountIds = new ArrayList<Long>();
              for (String accountName : accountNames) {
@@@ -1434,26 -1431,31 +1437,31 @@@
                          zoneId, accountId, volumeId);
              }*/
              if (privateTemplate == null) {
-                 Transaction txn = Transaction.currentTxn();
-                 txn.start();
+                 final VolumeVO volumeFinal = volume;
+                 final SnapshotVO snapshotFinal = snapshot;
+                 Transaction.execute(new TransactionCallbackNoReturn() {
+                     @Override
+                     public void doInTransactionWithoutResult(TransactionStatus status) {
 -                        // template_store_ref entries should have been removed using our
 -                        // DataObject.processEvent command in case of failure, but clean
 -                        // it up here to avoid
 -                        // some leftovers which will cause removing template from
 -                        // vm_template table fail.
 -                        _tmplStoreDao.deletePrimaryRecordsForTemplate(templateId);
 -                        // Remove the template_zone_ref record
 -                        _tmpltZoneDao.deletePrimaryRecordsForTemplate(templateId);
 -                        // Remove the template record
 -                        _tmpltDao.expunge(templateId);
 -        
 -                        // decrement resource count
 -                        if (accountId != null) {
 -                            _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.template);
 +                // template_store_ref entries should have been removed using our
 +                // DataObject.processEvent command in case of failure, but clean
 +                // it up here to avoid
 +                // some leftovers which will cause removing template from
 +                // vm_template table fail.
 +                _tmplStoreDao.deletePrimaryRecordsForTemplate(templateId);
 +                // Remove the template_zone_ref record
 +                _tmpltZoneDao.deletePrimaryRecordsForTemplate(templateId);
 +                // Remove the template record
 +                _tmpltDao.expunge(templateId);
 +
 +                // decrement resource count
 +                if (accountId != null) {
 +                    _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.template);
-                     _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.secondary_storage, new Long(volume != null ? volume.getSize()
-                             : snapshot.getSize()));
+                             _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.secondary_storage, new Long(volumeFinal != null ? volumeFinal.getSize()
+                                     : snapshotFinal.getSize()));
 -                        }
 +                }
-                 txn.commit();
+                     }
+                 });
+ 
              }
          }
  


Mime
View raw message