cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [50/50] [abbrv] git commit: updated refs/heads/master to 97f8c52
Date Thu, 20 Jun 2013 07:20:23 GMT
merge object_store


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

Branch: refs/heads/master
Commit: 97f8c524b8b23715eec44ec8e2f5e00bcd4ddf6e
Parents: 4a26067 5f28dcc
Author: Edison Su <edison.su@citrix.com>
Authored: Thu Jun 20 00:18:00 2013 -0700
Committer: Edison Su <edison.su@citrix.com>
Committed: Thu Jun 20 00:18:00 2013 -0700

----------------------------------------------------------------------
 agent/src/com/cloud/agent/AgentShell.java       |    1 +
 api/src/com/cloud/agent/api/Answer.java         |    1 +
 .../CopyTemplateToPrimaryStorageAnswer.java     |   17 +
 .../cloud/agent/api/storage/PasswordAuth.java   |   39 +
 api/src/com/cloud/agent/api/storage/Proxy.java  |   72 +
 .../com/cloud/agent/api/to/DataObjectType.java  |   25 +
 api/src/com/cloud/agent/api/to/DataStoreTO.java |   26 +
 api/src/com/cloud/agent/api/to/DataTO.java      |   30 +
 api/src/com/cloud/agent/api/to/DiskTO.java      |   60 +
 api/src/com/cloud/agent/api/to/NfsTO.java       |   60 +
 api/src/com/cloud/agent/api/to/S3TO.java        |   27 +-
 api/src/com/cloud/agent/api/to/SwiftTO.java     |   10 +-
 .../cloud/agent/api/to/VirtualMachineTO.java    |    6 +-
 api/src/com/cloud/server/ManagementService.java |   47 +-
 api/src/com/cloud/storage/DataStoreRole.java    |   54 +
 .../com/cloud/storage/GuestOSHypervisor.java    |   28 +
 api/src/com/cloud/storage/ImageStore.java       |   47 +
 api/src/com/cloud/storage/ScopeType.java        |   27 +
 api/src/com/cloud/storage/Snapshot.java         |   12 +-
 api/src/com/cloud/storage/Storage.java          |   13 +-
 api/src/com/cloud/storage/StoragePool.java      |    2 +-
 api/src/com/cloud/storage/StorageService.java   |   12 +
 api/src/com/cloud/storage/Upload.java           |    2 +-
 api/src/com/cloud/storage/Volume.java           |   10 +-
 api/src/com/cloud/storage/VolumeApiService.java |   28 +-
 .../storage/snapshot/SnapshotApiService.java    |  109 +
 .../cloud/storage/snapshot/SnapshotService.java |  109 -
 .../cloud/storage/template/TemplateInfo.java    |   81 -
 .../cloud/storage/template/TemplateProp.java    |   81 +
 .../com/cloud/template/TemplateApiService.java  |  106 +
 api/src/com/cloud/template/TemplateService.java |  100 -
 api/src/com/cloud/vm/VirtualMachineProfile.java |    8 +-
 api/src/org/apache/cloudstack/api/BaseCmd.java  |    8 +-
 .../cloudstack/api/ResponseGenerator.java       |   24 +-
 .../admin/host/AddSecondaryStorageCmd.java      |   36 +-
 .../command/admin/storage/AddImageStoreCmd.java |  154 ++
 .../api/command/admin/storage/AddS3Cmd.java     |   55 +-
 .../admin/storage/CreateCacheStoreCmd.java      |  123 ++
 .../admin/storage/DeleteImageStoreCmd.java      |   80 +
 .../admin/storage/ListImageStoresCmd.java       |  109 +
 .../api/command/admin/storage/ListS3sCmd.java   |   34 +-
 .../api/command/admin/swift/AddSwiftCmd.java    |   43 +-
 .../api/command/admin/swift/ListSwiftsCmd.java  |   26 +-
 .../admin/template/PrepareTemplateCmd.java      |    2 +-
 .../api/command/user/iso/ExtractIsoCmd.java     |    7 +-
 .../api/command/user/iso/ListIsosCmd.java       |   10 +-
 .../api/command/user/iso/RegisterIsoCmd.java    |    6 +-
 .../api/command/user/iso/UpdateIsoCmd.java      |    4 +-
 .../user/snapshot/CreateSnapshotCmd.java        |   20 +-
 .../command/user/template/CopyTemplateCmd.java  |    2 +-
 .../user/template/ExtractTemplateCmd.java       |    7 +-
 .../command/user/template/ListTemplatesCmd.java |   15 +-
 .../user/template/RegisterTemplateCmd.java      |   13 +-
 .../user/template/UpdateTemplateCmd.java        |    4 +-
 .../command/user/volume/CreateVolumeCmd.java    |    2 +-
 .../command/user/volume/ExtractVolumeCmd.java   |   47 +-
 .../command/user/volume/MigrateVolumeCmd.java   |   21 +-
 .../api/response/ImageStoreDetailResponse.java  |   86 +
 .../api/response/ImageStoreResponse.java        |  149 ++
 .../api/response/TemplateResponse.java          |   34 +-
 .../api/response/TemplateZoneResponse.java      |   90 +
 .../apache/cloudstack/query/QueryService.java   |   29 +
 .../test/AddSecondaryStorageCmdTest.java        |   67 +-
 .../api/command/test/AddSwiftCmdTest.java       |   97 -
 client/pom.xml                                  |   21 +-
 client/tomcatconf/applicationContext.xml.in     |   43 +-
 client/tomcatconf/commands.properties.in        |    6 +
 client/tomcatconf/log4j-cloud.xml.in            |    4 +
 core/src/com/cloud/agent/Listener.java          |   38 +-
 .../agent/api/CleanupSnapshotBackupCommand.java |   75 -
 .../cloud/agent/api/ComputeChecksumCommand.java |   16 +-
 .../agent/api/DeleteObjectFromSwiftCommand.java |   61 -
 .../agent/api/DeleteSnapshotBackupAnswer.java   |   32 -
 .../agent/api/DeleteSnapshotBackupCommand.java  |   96 -
 .../agent/api/DeleteSnapshotsDirCommand.java    |   34 +-
 .../agent/api/DeleteTemplateFromS3Command.java  |  106 -
 .../agent/api/MigrateWithStorageAnswer.java     |   10 +-
 .../api/MigrateWithStorageCompleteAnswer.java   |    9 +-
 .../agent/api/ModifyStoragePoolAnswer.java      |   10 +-
 .../cloud/agent/api/SecStorageSetupCommand.java |   15 +-
 .../com/cloud/agent/api/SnapshotCommand.java    |    4 +-
 .../cloud/agent/api/StartupStorageCommand.java  |   12 +-
 .../api/storage/AbstractDownloadCommand.java    |    2 +-
 .../agent/api/storage/CopyVolumeAnswer.java     |    1 +
 .../cloud/agent/api/storage/CreateAnswer.java   |    1 +
 .../storage/CreatePrivateTemplateAnswer.java    |    4 +-
 .../api/storage/DeleteTemplateCommand.java      |   40 -
 .../agent/api/storage/DeleteVolumeCommand.java  |   38 -
 .../agent/api/storage/DownloadCommand.java      |  219 --
 .../api/storage/DownloadProgressCommand.java    |   48 -
 .../agent/api/storage/ListTemplateAnswer.java   |   12 +-
 .../agent/api/storage/ListTemplateCommand.java  |   31 +-
 .../agent/api/storage/ListVolumeAnswer.java     |   12 +-
 .../agent/api/storage/ListVolumeCommand.java    |    9 +-
 .../storage/ManageVolumeAvailabilityAnswer.java |    1 +
 .../storage/PrimaryStorageDownloadAnswer.java   |    1 +
 .../storage/PrimaryStorageDownloadCommand.java  |    9 +
 .../agent/api/storage/ResizeVolumeAnswer.java   |    2 +-
 .../agent/api/storage/UpgradeDiskAnswer.java    |    4 +-
 .../cloud/agent/api/storage/UploadCommand.java  |    1 -
 .../cloud/agent/transport/ArrayTypeAdaptor.java |    6 +-
 .../agent/transport/InterfaceTypeAdaptor.java   |   66 +
 .../hyperv/resource/HypervResource.java         |    4 +-
 core/src/com/cloud/serializer/GsonHelper.java   |    9 +
 .../com/cloud/storage/GuestOSHypervisorVO.java  |   73 +
 .../storage/resource/StorageProcessor.java      |   45 +
 .../StorageSubsystemCommandHandler.java         |   27 +
 .../StorageSubsystemCommandHandlerBase.java     |  139 ++
 .../template/HttpTemplateDownloader.java        |   94 +-
 .../storage/template/S3TemplateDownloader.java  |  418 ++++
 .../storage/template/TemplateConstants.java     |   11 +-
 .../storage/template/TemplateLocation.java      |   76 +-
 .../storage/command/DownloadCommand.java        |  184 ++
 .../command/DownloadProgressCommand.java        |   49 +
 .../com/cloud/agent/transport/RequestTest.java  |   58 +-
 .../agent/test/BackupSnapshotCommandTest.java   |   38 +-
 .../api/agent/test/CheckNetworkAnswerTest.java  |  205 ++
 .../api/agent/test/SnapshotCommandTest.java     |    8 +-
 .../agent/api/test/ResizeVolumeCommandTest.java |  229 --
 developer/pom.xml                               |    3 +-
 .../subsystem/api/storage/ClusterScope.java     |   10 +-
 .../subsystem/api/storage/CommandResult.java    |   52 -
 .../api/storage/CopyCommandResult.java          |    9 +-
 .../subsystem/api/storage/CreateCmdResult.java  |   24 +-
 .../api/storage/DataMigrationSubSystem.java     |   29 -
 .../api/storage/DataMotionService.java          |   34 +
 .../api/storage/DataMotionStrategy.java         |   38 +
 .../subsystem/api/storage/DataObject.java       |   37 +-
 .../api/storage/DataObjectInStore.java          |   12 +-
 .../subsystem/api/storage/DataObjectType.java   |   25 -
 .../engine/subsystem/api/storage/DataStore.java |   14 +
 .../subsystem/api/storage/DataStoreDriver.java  |   26 +-
 .../api/storage/DataStoreLifeCycle.java         |   17 +-
 .../subsystem/api/storage/DataStoreManager.java |   19 +-
 .../api/storage/DataStoreProvider.java          |   33 +-
 .../api/storage/DataStoreProviderManager.java   |    9 +-
 .../subsystem/api/storage/DataStoreRole.java    |   54 -
 .../engine/subsystem/api/storage/EndPoint.java  |   12 +-
 .../subsystem/api/storage/EndPointSelector.java |   31 +
 .../engine/subsystem/api/storage/HostScope.java |   16 +-
 .../api/storage/HypervisorHostListener.java     |    1 +
 .../subsystem/api/storage/ImageDataFactory.java |   26 -
 .../api/storage/ImageDataStoreProvider.java     |   24 -
 .../subsystem/api/storage/ImageService.java     |   29 -
 .../api/storage/ImageStoreProvider.java         |   28 +
 .../storage/ObjectInDataStoreStateMachine.java  |   29 +-
 .../api/storage/PrimaryDataStoreDriver.java     |    6 +-
 .../api/storage/PrimaryDataStoreInfo.java       |   16 +-
 .../api/storage/PrimaryDataStoreLifeCycle.java  |    1 -
 .../api/storage/PrimaryDataStoreParameters.java |   40 +-
 .../engine/subsystem/api/storage/Scope.java     |   10 +-
 .../engine/subsystem/api/storage/ScopeType.java |   27 -
 .../api/storage/SnapshotDataFactory.java        |    9 +-
 .../subsystem/api/storage/SnapshotInfo.java     |   17 +-
 .../subsystem/api/storage/SnapshotProfile.java  |    9 +-
 .../subsystem/api/storage/SnapshotResult.java   |   48 +
 .../subsystem/api/storage/SnapshotService.java  |   28 +
 .../subsystem/api/storage/SnapshotStrategy.java |   16 +-
 .../api/storage/StorageCacheManager.java        |   40 +
 .../subsystem/api/storage/StorageEvent.java     |    4 +-
 .../api/storage/StorageOrchestrator.java        |   68 -
 .../api/storage/StoragePoolAllocator.java       |   32 +-
 .../subsystem/api/storage/StorageSubSystem.java |   29 -
 .../api/storage/TemplateDataFactory.java        |   31 +
 .../subsystem/api/storage/TemplateEvent.java    |    5 +-
 .../subsystem/api/storage/TemplateInfo.java     |    7 +-
 .../subsystem/api/storage/TemplateProfile.java  |  287 ---
 .../subsystem/api/storage/TemplateService.java  |   64 +
 .../subsystem/api/storage/TemplateState.java    |    6 +-
 .../api/storage/VolumeDataFactory.java          |    3 +-
 .../subsystem/api/storage/VolumeInfo.java       |   28 +-
 .../subsystem/api/storage/VolumeProfile.java    |   34 -
 .../subsystem/api/storage/VolumeService.java    |   32 +-
 .../engine/subsystem/api/storage/ZoneScope.java |    6 +-
 .../api/storage/disktype/DiskFormat.java        |    5 +-
 .../subsystem/api/storage/type/BaseImage.java   |    6 +-
 .../subsystem/api/storage/type/DataDisk.java    |    6 +-
 .../engine/subsystem/api/storage/type/Iso.java  |    6 +-
 .../subsystem/api/storage/type/RootDisk.java    |    6 +-
 .../subsystem/api/storage/type/Unknown.java     |    6 +-
 .../api/storage/type/VolumeTypeBase.java        |   54 +-
 .../api/storage/type/VolumeTypeHelper.java      |   34 +-
 .../storage/command/AttachAnswer.java           |   47 +
 .../storage/command/AttachCommand.java          |   55 +
 .../command/AttachPrimaryDataStoreAnswer.java   |   56 +
 .../command/AttachPrimaryDataStoreCmd.java      |   39 +
 .../storage/command/CommandResult.java          |   52 +
 .../storage/command/CopyCmdAnswer.java          |   37 +
 .../cloudstack/storage/command/CopyCommand.java |   55 +
 .../storage/command/CreateObjectAnswer.java     |   43 +
 .../storage/command/CreateObjectCommand.java    |   45 +
 .../command/CreatePrimaryDataStoreCmd.java      |   38 +
 .../storage/command/DeleteCommand.java          |   45 +
 .../storage/command/DettachAnswer.java          |   47 +
 .../storage/command/DettachCommand.java         |   55 +
 .../command/DownloadSystemTemplateCommand.java  |  129 ++
 .../command/StorageSubSystemCommand.java        |   23 +
 .../datastore/db/DataStoreProviderDao.java      |   25 -
 .../datastore/db/DataStoreProviderDaoImpl.java  |   38 -
 .../datastore/db/DataStoreProviderVO.java       |   60 -
 .../storage/datastore/db/ImageStoreDao.java     |   37 +
 .../datastore/db/ImageStoreDetailVO.java        |   82 +
 .../datastore/db/ImageStoreDetailsDao.java      |   30 +
 .../storage/datastore/db/ImageStoreVO.java      |  193 ++
 .../datastore/db/PrimaryDataStoreDao.java       |  112 +-
 .../datastore/db/PrimaryDataStoreDaoImpl.java   |  554 +++--
 .../datastore/db/PrimaryDataStoreDetailVO.java  |   22 +-
 .../db/PrimaryDataStoreDetailsDao.java          |    3 +-
 .../db/PrimaryDataStoreDetailsDaoImpl.java      |   71 -
 .../datastore/db/SnapshotDataStoreDao.java      |   40 +
 .../datastore/db/SnapshotDataStoreVO.java       |  260 +++
 .../datastore/db/StoragePoolDetailVO.java       |   22 +-
 .../datastore/db/StoragePoolDetailsDao.java     |    5 +-
 .../storage/datastore/db/StoragePoolVO.java     |   40 +-
 .../datastore/db/TemplateDataStoreDao.java      |   63 +
 .../datastore/db/TemplateDataStoreVO.java       |  372 ++++
 .../datastore/db/VolumeDataStoreDao.java        |   41 +
 .../storage/datastore/db/VolumeDataStoreVO.java |  348 +++
 .../image/datastore/ImageStoreEntity.java       |   46 +
 .../storage/image/datastore/ImageStoreInfo.java |   27 +
 .../cloudstack/storage/to/ImageStoreTO.java     |   79 +
 .../storage/to/PrimaryDataStoreTO.java          |  103 +
 .../cloudstack/storage/to/SnapshotObjectTO.java |  126 ++
 .../cloudstack/storage/to/TemplateObjectTO.java |  199 ++
 .../cloudstack/storage/to/VolumeObjectTO.java   |  215 ++
 .../engine/subsystem/api/storage/ScopeTest.java |   18 +-
 engine/pom.xml                                  |   18 +-
 .../src/com/cloud/storage/DiskOfferingVO.java   |  108 +-
 .../com/cloud/storage/GuestOSCategoryVO.java    |   23 +-
 .../schema/src/com/cloud/storage/GuestOSVO.java |   35 +-
 .../com/cloud/storage/LaunchPermissionVO.java   |   11 +-
 engine/schema/src/com/cloud/storage/S3VO.java   |   24 +-
 .../src/com/cloud/storage/SnapshotPolicyVO.java |   40 +-
 .../com/cloud/storage/SnapshotScheduleVO.java   |   80 +-
 .../src/com/cloud/storage/SnapshotVO.java       |  129 +-
 .../com/cloud/storage/StoragePoolHostAssoc.java |   16 +-
 .../com/cloud/storage/StoragePoolHostVO.java    |   94 +-
 .../com/cloud/storage/StoragePoolWorkVO.java    |   38 +-
 .../schema/src/com/cloud/storage/SwiftVO.java   |   31 +-
 .../schema/src/com/cloud/storage/UploadVO.java  |  288 ++-
 .../com/cloud/storage/VMTemplateDetailVO.java   |   79 +-
 .../src/com/cloud/storage/VMTemplateHostVO.java |  393 ++--
 .../src/com/cloud/storage/VMTemplateS3VO.java   |   34 +-
 .../cloud/storage/VMTemplateStoragePoolVO.java  |  379 ++--
 .../com/cloud/storage/VMTemplateSwiftVO.java    |    3 +-
 .../src/com/cloud/storage/VMTemplateVO.java     |  266 +--
 .../src/com/cloud/storage/VMTemplateZoneVO.java |  128 +-
 .../src/com/cloud/storage/VolumeHostVO.java     |  415 ++--
 .../schema/src/com/cloud/storage/VolumeVO.java  |   80 +-
 .../com/cloud/storage/dao/DiskOfferingDao.java  |    8 +-
 .../cloud/storage/dao/DiskOfferingDaoImpl.java  |   57 +-
 .../cloud/storage/dao/GuestOSCategoryDao.java   |    2 +-
 .../storage/dao/GuestOSCategoryDaoImpl.java     |   10 +-
 .../src/com/cloud/storage/dao/GuestOSDao.java   |    2 +-
 .../com/cloud/storage/dao/GuestOSDaoImpl.java   |   18 +-
 .../cloud/storage/dao/LaunchPermissionDao.java  |   28 +-
 .../storage/dao/LaunchPermissionDaoImpl.java    |   31 +-
 .../src/com/cloud/storage/dao/S3DaoImpl.java    |    3 +-
 .../src/com/cloud/storage/dao/SnapshotDao.java  |   31 +-
 .../com/cloud/storage/dao/SnapshotDaoImpl.java  |  152 +-
 .../cloud/storage/dao/SnapshotPolicyDao.java    |   12 +-
 .../storage/dao/SnapshotPolicyDaoImpl.java      |   45 +-
 .../cloud/storage/dao/SnapshotScheduleDao.java  |    5 +-
 .../storage/dao/SnapshotScheduleDaoImpl.java    |   87 +-
 .../storage/dao/StoragePoolDetailsDaoImpl.java  |   35 +-
 .../storage/dao/StoragePoolHostDaoImpl.java     |   18 +-
 .../cloud/storage/dao/StoragePoolWorkDao.java   |    3 +-
 .../storage/dao/StoragePoolWorkDaoImpl.java     |   62 +-
 .../src/com/cloud/storage/dao/SwiftDaoImpl.java |    2 +-
 .../src/com/cloud/storage/dao/UploadDao.java    |   11 +-
 .../com/cloud/storage/dao/UploadDaoImpl.java    |  111 +-
 .../com/cloud/storage/dao/VMTemplateDao.java    |   79 +-
 .../cloud/storage/dao/VMTemplateDaoImpl.java    | 1493 ++++++-------
 .../cloud/storage/dao/VMTemplateDetailsDao.java |   10 +-
 .../storage/dao/VMTemplateDetailsDaoImpl.java   |   60 +-
 .../cloud/storage/dao/VMTemplateHostDao.java    |   15 +-
 .../storage/dao/VMTemplateHostDaoImpl.java      |  550 ++---
 .../cloud/storage/dao/VMTemplatePoolDao.java    |   36 +-
 .../storage/dao/VMTemplatePoolDaoImpl.java      |  433 ++--
 .../cloud/storage/dao/VMTemplateS3DaoImpl.java  |   25 +-
 .../cloud/storage/dao/VMTemplateZoneDao.java    |   14 +-
 .../storage/dao/VMTemplateZoneDaoImpl.java      |  112 +-
 .../src/com/cloud/storage/dao/VolumeDao.java    |    9 +-
 .../com/cloud/storage/dao/VolumeDaoImpl.java    |  358 +--
 .../com/cloud/storage/dao/VolumeHostDao.java    |   13 +-
 .../cloud/storage/dao/VolumeHostDaoImpl.java    |   37 +-
 .../src/com/cloud/upgrade/DatabaseCreator.java  |    7 +
 .../com/cloud/upgrade/dao/Upgrade410to420.java  |  326 ++-
 engine/storage/backup/pom.xml                   |   50 -
 .../storage/backup/BackupMotionService.java     |   23 -
 .../storage/backup/BackupService.java           |   26 -
 engine/storage/cache/pom.xml                    |   50 +
 .../cache/allocator/StorageCacheAllocator.java  |   26 +
 .../allocator/StorageCacheRandomAllocator.java  |   56 +
 .../cache/manager/StorageCacheManagerImpl.java  |  254 +++
 .../StorageCacheReplacementAlgorithm.java       |   26 +
 .../StorageCacheReplacementAlgorithmLRU.java    |  106 +
 engine/storage/datamotion/pom.xml               |   62 +
 .../motion/AncientDataMotionStrategy.java       |  414 ++++
 .../storage/motion/DataMotionServiceImpl.java   |   75 +
 .../storage/image/ImageDataFactoryImpl.java     |   93 -
 .../storage/image/ImageOrchestrator.java        |   29 -
 .../storage/image/ImageServiceImpl.java         |  235 --
 .../storage/image/TemplateDataFactoryImpl.java  |  105 +
 .../storage/image/TemplateServiceImpl.java      |  610 ++++++
 .../image/downloader/ImageDownloader.java       |   25 -
 .../driver/AncientImageDataStoreDriverImpl.java |  254 ---
 .../driver/DefaultImageDataStoreDriverImpl.java |  126 --
 .../storage/image/manager/ImageDataManager.java |   30 -
 .../image/manager/ImageDataManagerImpl.java     |   50 -
 .../manager/ImageDataStoreManagerImpl.java      |   94 -
 .../manager/ImageStoreProviderManagerImpl.java  |  130 ++
 .../store/AncientImageDataStoreProvider.java    |  101 -
 .../image/store/DefaultImageDataStoreImpl.java  |  145 --
 .../store/DefaultImageDataStoreProvider.java    |   82 -
 .../storage/image/store/ImageStoreImpl.java     |  198 ++
 .../storage/image/store/TemplateObject.java     |  395 +++-
 .../DefaultImageDataStoreLifeCycle.java         |  108 -
 .../lifecycle/ImageDataStoreLifeCycle.java      |   24 -
 .../store/lifecycle/ImageStoreLifeCycle.java    |   24 +
 engine/storage/imagemotion/pom.xml              |   62 -
 .../motion/DefaultImageMotionStrategy.java      |  158 --
 .../image/motion/ImageMotionServiceImpl.java    |   70 -
 .../image/motion/ImageMotionStrategy.java       |   24 -
 engine/storage/integration-test/pom.xml         |   50 +-
 .../MockLocalNfsSecondaryStorageResource.java   |  135 ++
 .../storage/allocator/StorageAllocatorTest.java |  737 +++----
 .../StorageAllocatorTestConfiguration.java      |   47 +-
 ...StorageCacheReplacementAlgorithmLRUTest.java |  226 ++
 .../apache/cloudstack/storage/test/AopTest.java |    2 +-
 .../cloudstack/storage/test/AopTestAdvice.java  |   20 +-
 .../storage/test/ChildTestConfiguration.java    |  157 +-
 .../storage/test/CloudStackTestNGBase.java      |  132 +-
 .../test/DirectAgentManagerSimpleImpl.java      |  115 +-
 .../storage/test/DirectAgentTest.java           |   66 +-
 ...HostEndpointRpcServerDirectCallResource.java |   70 -
 .../MockHypervisorHostEndPointRpcServer.java    |   72 -
 .../storage/test/MockLocalHostEndPoint.java     |   39 +
 .../storage/test/MockRpcCallBack.java           |   12 +-
 .../storage/test/MockStorageMotionStrategy.java |    5 +-
 .../cloudstack/storage/test/S3TemplateTest.java |  180 ++
 .../cloudstack/storage/test/SnapshotTest.java   |  500 +++++
 .../storage/test/StorageFactoryBean.java        |   11 +-
 .../cloudstack/storage/test/StorageTest.java    |   11 +-
 .../cloudstack/storage/test/TemplateTest.java   |  167 ++
 .../cloudstack/storage/test/TestHttp.java       |   17 +-
 .../apache/cloudstack/storage/test/TestNG.java  |    5 +-
 .../cloudstack/storage/test/TestNGAop.java      |    6 +-
 .../cloudstack/storage/test/VolumeTest.java     |  433 ++++
 .../storage/test/VolumeTestVmware.java          |  444 ++++
 .../storage/test/volumeServiceTest.java         |  618 +++---
 .../test/resource/s3_testng.xml                 |   47 +
 .../test/resource/storageContext.xml            |   77 +-
 .../integration-test/test/resource/testng.xml   |   19 +-
 engine/storage/pom.xml                          |    7 +-
 engine/storage/snapshot/pom.xml                 |    5 +
 .../snapshot/SnapshotDataFactoryImpl.java       |   51 +-
 .../storage/snapshot/SnapshotObject.java        |  353 +--
 .../storage/snapshot/SnapshotServiceImpl.java   |  390 +++-
 .../snapshot/SnapshotStateMachineManager.java   |    2 +-
 .../SnapshotStateMachineManagerImpl.java        |   47 +-
 .../storage/snapshot/SnapshotStrategyBase.java  |   38 +
 .../snapshot/XenserverSnapshotStrategy.java     |  204 ++
 .../storage/snapshot/db/SnapshotDao2.java       |   25 -
 .../storage/snapshot/db/SnapshotDao2Impl.java   |   28 -
 .../storage/snapshot/db/SnapshotVO.java         |  296 ---
 .../strategy/AncientSnapshotStrategy.java       |  613 ------
 .../test/src/SnapshotDataFactoryTest.java       |   23 +-
 .../org/apache/cloudstack/storage/BaseType.java |    1 +
 .../storage/HostEndpointRpcServer.java          |   29 -
 .../storage/HypervisorHostEndPoint.java         |   75 -
 .../HypervisorHostEndPointRpcServer.java        |  119 -
 .../cloudstack/storage/LocalHostEndpoint.java   |  101 +
 .../cloudstack/storage/RemoteHostEndPoint.java  |  178 ++
 .../allocator/AbstractStoragePoolAllocator.java |  174 +-
 .../ClusterScopeStoragePoolAllocator.java       |   45 +-
 .../GarbageCollectingStoragePoolAllocator.java  |   17 +-
 .../allocator/LocalStoragePoolAllocator.java    |   32 +-
 .../allocator/UseLocalForRootAllocator.java     |   10 +-
 .../allocator/ZoneWideStoragePoolAllocator.java |   16 +-
 .../backup/SnapshotOnBackupStoreInfo.java       |    5 +-
 .../backup/datastore/BackupStoreInfo.java       |    5 +-
 .../command/AttachPrimaryDataStoreAnswer.java   |   55 -
 .../command/AttachPrimaryDataStoreCmd.java      |   38 -
 .../cloudstack/storage/command/CopyCmd.java     |   45 -
 .../storage/command/CopyCmdAnswer.java          |   33 -
 .../CopyTemplateToPrimaryStorageAnswer.java     |   16 -
 .../storage/command/CreateObjectAnswer.java     |   48 -
 .../storage/command/CreateObjectCommand.java    |   45 -
 .../command/CreatePrimaryDataStoreCmd.java      |   37 -
 .../CreateVolumeFromBaseImageCommand.java       |   49 -
 .../storage/command/DeleteCommand.java          |   44 -
 .../command/StorageSubSystemCommand.java        |   23 -
 .../storage/datastore/DataObjectManager.java    |   11 +-
 .../datastore/DataObjectManagerImpl.java        |  174 +-
 .../storage/datastore/DataStoreManagerImpl.java |   47 +-
 .../datastore/ObjectInDataStoreManager.java     |   18 +-
 .../datastore/ObjectInDataStoreManagerImpl.java |  334 ++-
 .../storage/datastore/PrimaryDataStore.java     |    3 +-
 .../datastore/PrimaryDataStoreEntityImpl.java   |   22 +-
 .../PrimaryDataStoreProviderManager.java        |    3 +-
 .../datastore/protocol/DataStoreProtocol.java   |    8 +-
 .../provider/DataStoreProviderManagerImpl.java  |   75 +-
 .../storage/db/ObjectInDataStoreDao.java        |    3 +-
 .../storage/db/ObjectInDataStoreDaoImpl.java    |   29 +-
 .../storage/db/ObjectInDataStoreVO.java         |  100 +-
 .../endpoint/DefaultEndPointSelector.java       |  128 +-
 .../storage/endpoint/EndPointSelector.java      |   40 -
 .../storage/image/BaseImageStoreDriverImpl.java |  216 ++
 .../storage/image/ImageDataStoreDriver.java     |   24 -
 .../storage/image/ImageStoreDriver.java         |   28 +
 .../storage/image/TemplateEntityImpl.java       |   14 +-
 .../storage/image/datastore/ImageDataStore.java |   35 -
 .../image/datastore/ImageDataStoreHelper.java   |   60 -
 .../image/datastore/ImageDataStoreInfo.java     |   26 -
 .../image/datastore/ImageDataStoreManager.java  |   31 -
 .../image/datastore/ImageStoreHelper.java       |  118 +
 .../datastore/ImageStoreProviderManager.java    |   42 +
 .../storage/image/db/ImageDaoStoreDaoImpl.java  |   38 -
 .../storage/image/db/ImageDataStoreDao.java     |   25 -
 .../image/db/ImageDataStoreProviderDao.java     |   25 -
 .../image/db/ImageDataStoreProviderDaoImpl.java |   40 -
 .../image/db/ImageDataStoreProviderVO.java      |   49 -
 .../storage/image/db/ImageDataStoreVO.java      |  110 -
 .../storage/image/db/ImageStoreDaoImpl.java     |  107 +
 .../image/db/ImageStoreDetailsDaoImpl.java      |   88 +
 .../image/db/SnapshotDataStoreDaoImpl.java      |  168 ++
 .../image/db/TemplateDataStoreDaoImpl.java      |  325 +++
 .../image/db/VolumeDataStoreDaoImpl.java        |  172 ++
 .../image/motion/ImageMotionService.java        |    8 +-
 .../motion/AncientDataMotionStrategy.java       |  812 -------
 .../storage/motion/DataMotionDriver.java        |   25 -
 .../storage/motion/DataMotionService.java       |   37 -
 .../storage/motion/DataMotionServiceImpl.java   |   77 -
 .../storage/motion/DataMotionStrategy.java      |   40 -
 .../storage/snapshot/SnapshotEntityImpl.java    |  316 ++-
 .../storage/snapshot/SnapshotService.java       |   27 -
 .../cloudstack/storage/to/ImageDataStoreTO.java |   36 -
 .../storage/to/ImageOnPrimaryDataStoreTO.java   |   44 -
 .../storage/to/NfsPrimaryDataStoreTO.java       |   44 -
 .../storage/to/PrimaryDataStoreTO.java          |   48 -
 .../cloudstack/storage/to/TemplateTO.java       |   51 -
 .../apache/cloudstack/storage/to/VolumeTO.java  |   77 -
 .../datastore/PrimaryDataStoreHelper.java       |   32 +-
 .../db/PrimaryDataStoreDetailsDaoImpl.java      |   74 +
 .../volume/db/TemplatePrimaryDataStoreDao.java  |    4 +-
 .../db/TemplatePrimaryDataStoreDaoImpl.java     |   43 +-
 .../volume/db/TemplatePrimaryDataStoreVO.java   |   18 +-
 .../storage/volume/db/VolumeDao2.java           |   82 -
 .../storage/volume/db/VolumeDao2Impl.java       |  440 ----
 .../cloudstack/storage/volume/db/VolumeVO.java  |  418 ----
 .../datastore/DefaultPrimaryDataStore.java      |  343 ---
 .../storage/datastore/PrimaryDataStoreImpl.java |  349 +++
 .../DefaultPrimaryDataStoreDriverImpl.java      |  249 ---
 .../driver/PrimaryDataStoreDriver.java          |   16 -
 .../DefaultPrimaryDataStoreLifeCycleImpl.java   |  147 --
 ...aultPrimaryDataStoreProviderManagerImpl.java |   85 -
 .../PrimaryDataStoreProviderManagerImpl.java    |   84 +
 .../datastore/provider/DefaultHostListener.java |   36 +-
 .../DefaultPrimaryDatastoreProviderImpl.java    |   83 -
 .../PrimaryDataStoreProviderManager.java        |   16 -
 .../storage/volume/TemplateInstallStrategy.java |   28 -
 .../volume/TemplateInstallStrategyImpl.java     |  289 ---
 .../storage/volume/VolumeDataFactoryImpl.java   |   25 +-
 .../storage/volume/VolumeEntityImpl.java        |  204 --
 .../storage/volume/VolumeMotionService.java     |   23 -
 .../cloudstack/storage/volume/VolumeObject.java |  361 +++-
 .../storage/volume/VolumeServiceImpl.java       |  881 +++++---
 .../storage/volume/test/ConfiguratorTest.java   |   64 +-
 .../cloudstack/storage/volume/test/Server.java  |   17 +-
 .../storage/volume/test/TestConfiguration.java  |    2 +-
 .../storage/volume/test/TestInProcessAsync.java |    7 +-
 .../async/AsyncCallbackDispatcher.java          |   51 +-
 .../manager/BareMetalTemplateAdapter.java       |  122 +-
 .../kvm/resource/LibvirtComputingResource.java  |  329 +--
 .../kvm/resource/LibvirtConnection.java         |   23 +-
 .../hypervisor/kvm/resource/LibvirtVMDef.java   |    6 +-
 .../kvm/storage/KVMStorageProcessor.java        |  862 ++++++++
 .../kvm/storage/KVMStorageResource.java         |   87 +
 .../cloud/ovm/hypervisor/OvmResourceBase.java   |   31 +-
 .../cloud/agent/manager/MockStorageManager.java |   13 +-
 .../agent/manager/MockStorageManagerImpl.java   |   69 +-
 .../agent/manager/SimulatorManagerImpl.java     |   32 +-
 .../cloud/resource/AgentRoutingResource.java    |    4 +-
 .../cloud/resource/AgentStorageResource.java    |    2 +-
 .../com/cloud/resource/SimulatorDiscoverer.java |    6 +-
 .../resource/SimulatorSecondaryDiscoverer.java  |   15 +-
 .../com/cloud/hypervisor/guru/VMwareGuru.java   |   26 +-
 .../vmware/VmwareServerDiscoverer.java          |    8 +-
 .../vmware/manager/VmwareManagerImpl.java       |   23 +-
 .../vmware/resource/VmwareResource.java         |  257 ++-
 .../VmwareSecondaryStorageResourceHandler.java  |  126 +-
 .../resource/VmwareStorageProcessor.java        | 1288 +++++++++++
 .../motion/VmwareStorageMotionStrategy.java     |    9 +-
 .../vmware/VmwareDatacenterApiUnitTest.java     |    5 +
 .../motion/VmwareStorageMotionStrategyTest.java |    2 +-
 .../xen/discoverer/XcpServerDiscoverer.java     |  156 +-
 .../xen/resource/CitrixResourceBase.java        |  138 +-
 .../hypervisor/xen/resource/XcpOssResource.java |   42 +-
 .../xen/resource/XenServer56FP1Resource.java    |   58 +-
 .../xen/resource/XenServer610Resource.java      |   23 +-
 .../xen/resource/XenServerStorageProcessor.java | 1516 +++++++++++++
 .../xen/resource/XenServerStorageResource.java  |  662 ------
 .../motion/XenServerStorageMotionStrategy.java  |   11 +-
 plugins/pom.xml                                 |    6 +-
 .../allocator/RandomStoragePoolAllocator.java   |   51 +-
 plugins/storage/image/default/pom.xml           |   71 +
 .../driver/CloudStackImageStoreDriverImpl.java  |   95 +
 .../CloudStackImageStoreLifeCycleImpl.java      |  155 ++
 .../CloudStackImageStoreProviderImpl.java       |  103 +
 plugins/storage/image/s3/pom.xml                |   15 +
 .../driver/S3ImageStoreDriverImpl.java          |   92 +
 .../lifecycle/S3ImageStoreLifeCycleImpl.java    |  135 ++
 .../provider/S3ImageStoreProviderImpl.java      |  100 +
 plugins/storage/image/sample/pom.xml            |   71 +
 .../driver/SampleImageStoreDriverImpl.java      |   53 +
 .../SampleImageStoreLifeCycleImpl.java          |   82 +
 .../provider/SampleImageStoreProviderImpl.java  |   96 +
 plugins/storage/image/swift/pom.xml             |   71 +
 .../driver/SwiftImageStoreDriverImpl.java       |   55 +
 .../lifecycle/SwiftImageStoreLifeCycleImpl.java |  116 +
 .../provider/SwiftImageStoreProviderImpl.java   |  102 +
 .../CloudStackPrimaryDataStoreDriverImpl.java   |  487 ++---
 ...CloudStackPrimaryDataStoreLifeCycleImpl.java |  152 +-
 .../CloudStackPrimaryDataStoreProviderImpl.java |   14 +-
 plugins/storage/volume/sample/pom.xml           |   56 +
 .../SamplePrimaryDataStoreDriverImpl.java       |  181 ++
 .../SamplePrimaryDataStoreLifeCycleImpl.java    |  122 ++
 .../SamplePrimaryDatastoreProviderImpl.java     |   79 +
 .../driver/SolidfirePrimaryDataStoreDriver.java |   54 +-
 .../SolidfirePrimaryDataStoreProvider.java      |   57 +-
 .../cloudstack/storage/test/AopTestAdvice.java  |   20 +-
 .../storage/test/ChildTestConfiguration.java    |   47 +-
 .../storage/test/TestConfiguration.java         |   17 +-
 .../cloudstack/storage/test/VolumeTest.java     |  169 +-
 scripts/storage/qcow2/createtmplt.sh            |    4 +-
 scripts/storage/qcow2/managesnapshot.sh         |    2 +-
 .../create_privatetemplate_from_snapshot_xen.sh |   98 +
 server/src/com/cloud/agent/AgentManager.java    |   31 +-
 .../cloud/agent/manager/AgentManagerImpl.java   |   29 +-
 .../com/cloud/agent/manager/AgentMonitor.java   |    2 +-
 .../agent/manager/SynchronousListener.java      |    4 +-
 .../impl/UserConcentratedAllocator.java         |   58 +-
 server/src/com/cloud/api/ApiDBUtils.java        |   90 +-
 server/src/com/cloud/api/ApiResponseHelper.java | 1055 +++++----
 .../com/cloud/api/query/QueryManagerImpl.java   |  983 ++++++---
 .../com/cloud/api/query/ViewResponseHelper.java |   75 +
 .../cloud/api/query/dao/ImageStoreJoinDao.java  |   36 +
 .../api/query/dao/ImageStoreJoinDaoImpl.java    |  162 ++
 .../api/query/dao/StoragePoolJoinDaoImpl.java   |   55 +-
 .../cloud/api/query/dao/TemplateJoinDao.java    |   44 +
 .../api/query/dao/TemplateJoinDaoImpl.java      |  455 ++++
 .../com/cloud/api/query/dao/UserVmJoinDao.java  |    2 +
 .../cloud/api/query/dao/UserVmJoinDaoImpl.java  |   18 +
 .../cloud/api/query/vo/ImageStoreJoinVO.java    |  207 ++
 .../cloud/api/query/vo/StoragePoolJoinVO.java   |   11 +-
 .../com/cloud/api/query/vo/TemplateJoinVO.java  | 1030 +++++++++
 .../src/com/cloud/capacity/CapacityManager.java |    3 +-
 .../com/cloud/capacity/CapacityManagerImpl.java |    6 +-
 .../cloud/capacity/ComputeCapacityListener.java |    4 +-
 .../cloud/capacity/StorageCapacityListener.java |    4 +-
 server/src/com/cloud/configuration/Config.java  |   13 +-
 .../configuration/ConfigurationManagerImpl.java | 1549 +++++++------
 .../src/com/cloud/consoleproxy/AgentHook.java   |    9 +-
 .../com/cloud/consoleproxy/AgentHookBase.java   |   21 +-
 .../consoleproxy/ConsoleProxyListener.java      |    4 +-
 .../cloud/consoleproxy/ConsoleProxyManager.java |    1 -
 .../consoleproxy/ConsoleProxyManagerImpl.java   |   49 +-
 .../deploy/DeploymentPlanningManagerImpl.java   |    2 +-
 .../cloud/hypervisor/HypervisorGuruBase.java    |    8 +-
 .../kvm/discoverer/LibvirtServerDiscoverer.java |   99 +-
 .../com/cloud/network/NetworkManagerImpl.java   |  138 +-
 .../cloud/network/NetworkUsageManagerImpl.java  |    2 +-
 .../com/cloud/network/SshKeysDistriMonitor.java |    4 +-
 .../VirtualNetworkApplianceManagerImpl.java     |   51 +-
 .../network/security/SecurityGroupListener.java |    4 +-
 .../com/cloud/resource/ResourceManagerImpl.java | 1347 +++++-------
 .../resourcelimit/ResourceLimitManagerImpl.java |   13 +-
 .../cloud/server/ConfigurationServerImpl.java   |   15 +-
 .../com/cloud/server/ManagementServerImpl.java  |  469 +---
 server/src/com/cloud/server/StatsCollector.java |  202 +-
 .../cloud/storage/CreateSnapshotPayload.java    |   50 +
 .../cloud/storage/LocalStoragePoolListener.java |    4 +-
 .../com/cloud/storage/StorageManagerImpl.java   | 1224 ++++++-----
 .../storage/StoragePoolAutomationImpl.java      |    1 -
 .../src/com/cloud/storage/TemplateProfile.java  |   69 +-
 server/src/com/cloud/storage/VolumeManager.java |   11 +-
 .../com/cloud/storage/VolumeManagerImpl.java    |  716 +++---
 .../cloud/storage/dao/GuestOSHypervisorDao.java |   27 +
 .../storage/dao/GuestOSHypervisorDaoImpl.java   |   49 +
 .../download/DownloadAbandonedState.java        |    7 +-
 .../storage/download/DownloadActiveState.java   |    4 +-
 .../storage/download/DownloadCompleteState.java |    3 +-
 .../storage/download/DownloadErrorState.java    |    8 +-
 .../storage/download/DownloadListener.java      |  430 ++--
 .../cloud/storage/download/DownloadMonitor.java |   29 +-
 .../storage/download/DownloadMonitorImpl.java   | 1132 ++--------
 .../cloud/storage/download/DownloadState.java   |    2 +-
 .../storage/download/NotDownloadedState.java    |    3 +-
 .../storage/listener/StoragePoolMonitor.java    |    6 +-
 .../storage/listener/StorageSyncListener.java   |    4 +-
 .../resource/DummySecondaryStorageResource.java |   14 +-
 server/src/com/cloud/storage/s3/S3Manager.java  |    5 +-
 .../src/com/cloud/storage/s3/S3ManagerImpl.java |  106 +-
 .../secondary/SecondaryStorageListener.java     |    4 +-
 .../secondary/SecondaryStorageManagerImpl.java  |  273 +--
 .../secondary/SecondaryStorageVmManager.java    |   14 +-
 .../cloud/storage/snapshot/SnapshotManager.java |   18 +-
 .../storage/snapshot/SnapshotManagerImpl.java   |  509 ++---
 .../storage/snapshot/SnapshotSchedulerImpl.java |    4 +-
 .../cloud/storage/swift/SwiftManagerImpl.java   |   15 +-
 .../cloud/storage/upload/UploadListener.java    |  814 +++----
 .../com/cloud/storage/upload/UploadMonitor.java |   16 +-
 .../cloud/storage/upload/UploadMonitorImpl.java |  271 +--
 .../template/HypervisorTemplateAdapter.java     |  458 ++--
 .../src/com/cloud/template/TemplateAdapter.java |   13 +-
 .../com/cloud/template/TemplateAdapterBase.java |  117 +-
 .../src/com/cloud/template/TemplateManager.java |   41 +-
 .../com/cloud/template/TemplateManagerImpl.java | 2032 +++++++-----------
 server/src/com/cloud/vm/UserVmManagerImpl.java  |  107 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java |   17 +-
 .../com/cloud/vm/VirtualMachineProfileImpl.java |   86 +-
 .../com/cloud/agent/MockAgentManagerImpl.java   |   12 +-
 .../cloud/resource/MockResourceManagerImpl.java |    1 +
 .../networkoffering/ChildTestConfiguration.java |   10 +-
 .../resource/CifsSecondaryStorageResource.java  |  755 -------
 .../LocalNfsSecondaryStorageResource.java       |  233 ++
 .../resource/LocalSecondaryStorageResource.java |   24 +-
 .../resource/NfsSecondaryStorageResource.java   | 1632 ++++++++------
 .../resource/SecondaryStorageDiscoverer.java    |   79 +-
 .../resource/SecondaryStorageResource.java      |    3 +-
 .../storage/template/DownloadManager.java       |   37 +-
 .../storage/template/DownloadManagerImpl.java   |  287 ++-
 setup/db/db/schema-410to420.sql                 |  276 ++-
 test/integration/smoke/test_volumes.py          |    3 +-
 test/pom.xml                                    |    2 +-
 tools/apidoc/gen_toc.py                         |    4 +
 tools/devcloud/devcloud.cfg                     |    8 +-
 tools/devcloud/devcloud_s3.cfg                  |  141 ++
 tools/marvin/marvin/configGenerator.py          |   10 +
 tools/marvin/marvin/deployDataCenter.py         |   27 +-
 ui/scripts/cloudStack.js                        |   32 +-
 ui/scripts/system.js                            | 1478 ++++++++++---
 ui/scripts/ui-custom/physicalResources.js       |    3 +-
 ui/scripts/ui-custom/zoneChart.js               |    9 +-
 ui/scripts/zoneWizard.js                        |  386 +++-
 utils/src/com/cloud/utils/S3Utils.java          |  102 +-
 utils/src/com/cloud/utils/UriUtils.java         |   82 +
 utils/src/com/cloud/utils/script/Script.java    |   10 +-
 649 files changed, 41522 insertions(+), 29217 deletions(-)
----------------------------------------------------------------------


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

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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/response/TemplateResponse.java
index 2089c4b,225edd5..e6221f7
--- a/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
@@@ -139,9 -146,11 +146,15 @@@ public class TemplateResponse extends B
      @SerializedName(ApiConstants.SSHKEY_ENABLED) @Param(description="true if template is sshkey enabled, false otherwise")
      private Boolean sshKeyEnabled;
  
 +    @SerializedName(ApiConstants.IS_DYNAMICALLY_SCALABLE) @Param(description="true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory")
 +    private Boolean isDynamicallyScalable;
 +
+     public TemplateResponse(){
+         zones = new LinkedHashSet<TemplateZoneResponse>();
+         tags = new LinkedHashSet<ResourceTagResponse>();
+     }
+ 
++
      @Override
      public String getObjectId() {
          return this.getId();
@@@ -299,8 -320,9 +324,11 @@@
          this.sshKeyEnabled = sshKeyEnabled;
      }
  
 +    public void setDynamicallyScalable(boolean isDynamicallyScalable) {
 +        this.isDynamicallyScalable = isDynamicallyScalable;
 +    }
 +
+     public String getZoneId() {
+         return zoneId;
+     }
 -
 -
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/engine/schema/src/com/cloud/storage/VMTemplateVO.java
----------------------------------------------------------------------
diff --cc engine/schema/src/com/cloud/storage/VMTemplateVO.java
index 3bf83c0,ac5f021..45eed23
--- a/engine/schema/src/com/cloud/storage/VMTemplateVO.java
+++ b/engine/schema/src/com/cloud/storage/VMTemplateVO.java
@@@ -168,22 -159,40 +162,44 @@@ public class VMTemplateVO implements Vi
      /**
       * Proper constructor for a new vm template.
       */
-     public VMTemplateVO(long id, String name, ImageFormat format, boolean isPublic, boolean featured, boolean isExtractable, TemplateType type, String url, boolean requiresHvm, int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hyperType, Map details) {
-         this(id, generateUniqueName(id, accountId, name), name, format, isPublic, featured, isExtractable, type, url, null, requiresHvm, bits, accountId, cksum, displayText, enablePassword, guestOSId, bootable, hyperType, details);
-     	this.uuid = UUID.randomUUID().toString();
-     	this.state = TemplateState.Allocated;
+     public VMTemplateVO(long id, String name, ImageFormat format, boolean isPublic, boolean featured,
+             boolean isExtractable, TemplateType type, String url, boolean requiresHvm, int bits, long accountId,
+             String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable,
+             HypervisorType hyperType, Map details) {
+         this(id, generateUniqueName(id, accountId, name), name, format, isPublic, featured, isExtractable, type, url,
+                 null, requiresHvm, bits, accountId, cksum, displayText, enablePassword, guestOSId, bootable, hyperType,
+                 details);
+         this.uuid = UUID.randomUUID().toString();
+     }
+ 
+     public VMTemplateVO(long id, String name, ImageFormat format, boolean isPublic, boolean featured,
+             boolean isExtractable, TemplateType type, String url, boolean requiresHvm, int bits, long accountId,
+             String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable,
+             HypervisorType hyperType, String templateTag, Map details, boolean sshKeyEnabled) {
+         this(id, name, format, isPublic, featured, isExtractable, type, url, requiresHvm, bits, accountId, cksum,
+                 displayText, enablePassword, guestOSId, bootable, hyperType, details);
+         this.templateTag = templateTag;
+         this.uuid = UUID.randomUUID().toString();
+         this.enableSshKey = sshKeyEnabled;
      }
  
-     public VMTemplateVO(long id, String name, ImageFormat format, boolean isPublic, boolean featured, boolean isExtractable, TemplateType type, String url, boolean requiresHvm, int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hyperType, String templateTag, Map details, boolean sshKeyEnabled, boolean isDynamicallyScalable) {
-         this(id, name, format, isPublic, featured, isExtractable, type, url, requiresHvm, bits, accountId, cksum, displayText, enablePassword, guestOSId, bootable, hyperType, details);
-         this.templateTag = templateTag;
-     	this.uuid = UUID.randomUUID().toString();
-     	this.state = TemplateState.Allocated;
-     	this.enableSshKey = sshKeyEnabled;
-         this.dynamicallyScalable = isDynamicallyScalable;
++
+     public static VMTemplateVO createPreHostIso(Long id, String uniqueName, String name, ImageFormat format,
+             boolean isPublic, boolean featured, TemplateType type, String url, Date created, boolean requiresHvm,
+             int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId,
 -            boolean bootable, HypervisorType hyperType) {
++            boolean bootable, HypervisorType hyperType, String templateTag, Map details, boolean sshKeyEnabled, boolean isDynamicallyScalable) {
+         VMTemplateVO template = new VMTemplateVO(id, uniqueName, name, format, isPublic, featured, type, url, created,
+                 requiresHvm, bits, accountId, cksum, displayText, enablePassword, guestOSId, bootable, hyperType);
++        template.templateTag = templateTag;
++        template.enableSshKey = sshKeyEnabled;
++        template.dynamicallyScalable = isDynamicallyScalable;
+         return template;
      }
  
-     public VMTemplateVO(Long id, String uniqueName, String name, ImageFormat format, boolean isPublic, boolean featured, TemplateType type, String url, Date created, boolean requiresHvm, int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hyperType) {
+     public VMTemplateVO(Long id, String uniqueName, String name, ImageFormat format, boolean isPublic,
+             boolean featured, TemplateType type, String url, Date created, boolean requiresHvm, int bits,
+             long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable,
+             HypervisorType hyperType) {
          this.id = id;
          this.name = name;
          this.publicTemplate = isPublic;
@@@ -482,65 -504,44 +511,52 @@@
      }
  
      public int getSortKey() {
-     	return sortKey;
-     }
- 
- 	@Override
- 	public boolean getEnableSshKey() {
- 		return enableSshKey;
- 	}
- 
- 	public void setEnableSshKey(boolean enable) {
- 		enableSshKey = enable;
- 	}
- 	
- 	 public Long getImageDataStoreId() {
- 	        return this.imageDataStoreId;
- 	    }
- 
- 	    public void setImageDataStoreId(long dataStoreId) {
- 	        this.imageDataStoreId = dataStoreId;
- 	    }
- 	    
- 	    public void setSize(Long size) {
- 	        this.size = size;
- 	    }
- 	    
- 	    public Long getSize() {
- 	        return this.size;
- 	    }
- 	    
- 	    public TemplateState getState() {
- 	        return this.state;
- 	    }
- 	    
- 	    public long getUpdatedCount() {
- 	        return this.updatedCount;
- 	    }
- 	    
- 	    public void incrUpdatedCount() {
- 	        this.updatedCount++;
- 	    }
- 
- 	    public void decrUpdatedCount() {
- 	        this.updatedCount--;
- 	    }
- 	    
- 	    public Date getUpdated() {
- 	        return updated;
- 	    }
- 	    
- 	    public void setUpdated(Date updated) {
- 	        this.updated = updated;
- 	    }
+         return sortKey;
+     }
  
 +        public void setDynamicallyScalable(boolean dynamicallyScalable) {
 +            this.dynamicallyScalable = dynamicallyScalable;
 +        }
 +
 +        public Boolean isDynamicallyScalable() {
 +            return this.dynamicallyScalable;
 +        }
 +
+     @Override
+     public boolean getEnableSshKey() {
+         return enableSshKey;
+     }
+ 
+     public void setEnableSshKey(boolean enable) {
+         enableSshKey = enable;
+     }
+ 
+     public void setSize(Long size) {
+         this.size = size;
+     }
+ 
+     public Long getSize() {
+         return this.size;
+     }
+ 
+     public long getUpdatedCount() {
+         return this.updatedCount;
+     }
+ 
+     public void incrUpdatedCount() {
+         this.updatedCount++;
+     }
+ 
+     public void decrUpdatedCount() {
+         this.updatedCount--;
+     }
+ 
+     public Date getUpdated() {
+         return updated;
+     }
+ 
+     public void setUpdated(Date updated) {
+         this.updated = updated;
+     }
  
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
----------------------------------------------------------------------
diff --cc engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
index cbf3a1f,a8d9472..138f57c
--- a/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
@@@ -102,13 -102,6 +102,11 @@@ public class TemplateEntityImpl impleme
      }
  
      @Override
 +    public Boolean isDynamicallyScalable() {
-         // TODO Auto-generated method stub
-         return false;
++        return null;  //To change body of implemented methods use File | Settings | File Templates.
 +    }
 +
- 
 +    @Override
      public void addDetail(String name, String value) {
          // TODO Auto-generated method stub
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/server/src/com/cloud/hypervisor/HypervisorGuruBase.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/hypervisor/HypervisorGuruBase.java
index be36b8d,ec932db..50bfb30
--- a/server/src/com/cloud/hypervisor/HypervisorGuruBase.java
+++ b/server/src/com/cloud/hypervisor/HypervisorGuruBase.java
@@@ -132,8 -126,11 +134,8 @@@ public abstract class HypervisorGuruBas
          // Workaround to make sure the TO has the UUID we need for Niciri integration
          VMInstanceVO vmInstance = _virtualMachineDao.findById(to.getId());
          to.setUuid(vmInstance.getUuid());
- 
+         
          //
 -        to.setEnableDynamicallyScaleVm(Boolean.parseBoolean(_configServer.getConfigValue(Config.EnableDynamicallyScaleVm.key(), Config.ConfigurationParameterScope.zone.toString(), vm.getDataCenterId())));
 -
          return to;
      }
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/server/src/com/cloud/storage/TemplateProfile.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/storage/TemplateProfile.java
index ca23d00,65c29f0..00aab4d
--- a/server/src/com/cloud/storage/TemplateProfile.java
+++ b/server/src/com/cloud/storage/TemplateProfile.java
@@@ -45,10 -45,9 +45,10 @@@ public class TemplateProfile 
  	Long templateId;
  	VMTemplateVO template;
  	String templateTag;
- 	Long imageStoreId;
  	Map details;
 +    Boolean isDynamicallyScalable;
  	
+ 
  	public TemplateProfile(Long templateId, Long userId, String name, String displayText, Integer bits, Boolean passwordEnabled, Boolean requiresHvm,
  			String url, Boolean isPublic, Boolean featured, Boolean isExtractable, ImageFormat format, Long guestOsId, Long zoneId,
  			HypervisorType hypervisorType, String accountName, Long domainId, Long accountId, String chksum, Boolean bootable, Map details, Boolean sshKeyEnabled) {
@@@ -81,18 -80,15 +81,18 @@@
  		this.template = template;
  		this.zoneId = zoneId;
  	}
- 	
+ 
      public TemplateProfile(Long templateId, Long userId, String name, String displayText, Integer bits, Boolean passwordEnabled, Boolean requiresHvm,
              String url, Boolean isPublic, Boolean featured, Boolean isExtractable, ImageFormat format, Long guestOsId, Long zoneId,
 -            HypervisorType hypervisorType, String accountName, Long domainId, Long accountId, String chksum, Boolean bootable, String templateTag, Map details, Boolean sshKeyEnabled) {
++
 +            HypervisorType hypervisorType, String accountName, Long domainId, Long accountId, String chksum, Boolean bootable, String templateTag, Map details, Boolean sshKeyEnabled,
 +            Long imageStoreId, Boolean isDynamicallyScalable) {
          this(templateId, userId, name, displayText, bits, passwordEnabled, requiresHvm, url, isPublic, featured, isExtractable, format, guestOsId, zoneId,
                  hypervisorType, accountName, domainId, accountId, chksum, bootable, details, sshKeyEnabled);
          this.templateTag = templateTag;
-         this.imageStoreId = imageStoreId;
 -    }
 +        this.isDynamicallyScalable = isDynamicallyScalable;
 +    }	
- 	
+ 
  	public Long getTemplateId() {
  		return templateId;
  	}
@@@ -256,16 -252,6 +256,13 @@@
      public Boolean getSshKeyEnabled() {
      	return this.sshKeyEnbaled;
      }
-     
-     public Long getImageStoreId() {
-         return this.imageStoreId;
-     }
  
 +    public Boolean IsDynamicallyScalable() {
 +        return this.isDynamicallyScalable;
 +    }
 +
 +    public void setScalabe(Boolean isDynamicallyScalabe) {
 +        this.isDynamicallyScalable = isDynamicallyScalabe;
 +    }
+ 
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/server/src/com/cloud/template/TemplateAdapter.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/template/TemplateAdapter.java
index bb7cd23,54096fc..d50d45b
--- a/server/src/com/cloud/template/TemplateAdapter.java
+++ b/server/src/com/cloud/template/TemplateAdapter.java
@@@ -69,5 -69,5 +69,6 @@@ public interface TemplateAdapter extend
      public TemplateProfile prepare(boolean isIso, long userId, String name, String displayText, Integer bits,
              Boolean passwordEnabled, Boolean requiresHVM, String url, Boolean isPublic, Boolean featured,
              Boolean isExtractable, String format, Long guestOSId, Long zoneId, HypervisorType hypervisorType,
 -            String chksum, Boolean bootable, String templateTag, Account templateOwner, Map details, Boolean sshKeyEnabled) throws ResourceAllocationException;
 +            String chksum, Boolean bootable, String templateTag, Account templateOwner, Map details, Boolean sshKeyEnabled, String imageStoreUuid, Boolean isDynamicallyScalable) throws ResourceAllocationException;
++
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/server/src/com/cloud/template/TemplateAdapterBase.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/template/TemplateAdapterBase.java
index c57697b,fd8b60c..898ed24
--- a/server/src/com/cloud/template/TemplateAdapterBase.java
+++ b/server/src/com/cloud/template/TemplateAdapterBase.java
@@@ -104,26 -106,17 +106,22 @@@ public abstract class TemplateAdapterBa
              Boolean isExtractable, String format, Long guestOSId, Long zoneId, HypervisorType hypervisorType,
              String accountName, Long domainId, String chksum, Boolean bootable, Map details) throws ResourceAllocationException {
  	    return prepare(isIso, userId, name, displayText, bits, passwordEnabled, requiresHVM, url, isPublic, featured, isExtractable, format, guestOSId, zoneId, hypervisorType,
++<<<<<<< HEAD
 +	            chksum, bootable, null, null, details, false, null, false);
++=======
+ 	            chksum, bootable, null, null, details, false);
++>>>>>>> object_store
  	}
- 	
- 	public TemplateProfile prepare(boolean isIso, long userId, String name, String displayText, Integer bits,
+ 
+ 	@Override
+     public TemplateProfile prepare(boolean isIso, long userId, String name, String displayText, Integer bits,
  			Boolean passwordEnabled, Boolean requiresHVM, String url, Boolean isPublic, Boolean featured,
  			Boolean isExtractable, String format, Long guestOSId, Long zoneId, HypervisorType hypervisorType,
 -			String chksum, Boolean bootable, String templateTag, Account templateOwner, Map details, Boolean sshkeyEnabled) throws ResourceAllocationException {
 -
 +			String chksum, Boolean bootable, String templateTag, Account templateOwner, Map details, Boolean sshkeyEnabled,
 +			String imageStoreUuid, Boolean isDynamicallyScalable) throws ResourceAllocationException {
 +		//Long accountId = null;
  		// parameters verification
- 		
- 	    String storeUuid = imageStoreUuid;
-         if (storeUuid != null) {
-             DataStore store = this.storeMgr.getDataStore(storeUuid, DataStoreRole.Image);
-             if (store == null) {
-                 throw new InvalidParameterValueException("invalide image store uuid" + storeUuid);
-             }
-             
-         }
-         
+ 
  		if (isPublic == null) {
  			isPublic = Boolean.FALSE;
  		}
@@@ -226,9 -214,9 +219,10 @@@
          Long id = _tmpltDao.getNextInSequence(Long.class, "id");
          UserContext.current().setEventDetails("Id: " +id+ " name: " + name);
  		return new TemplateProfile(id, userId, name, displayText, bits, passwordEnabled, requiresHVM, url, isPublic,
- 				featured, isExtractable, imgfmt, guestOSId, zoneId, hypervisorType, templateOwner.getAccountName(), templateOwner.getDomainId(), templateOwner.getAccountId(), chksum, bootable, templateTag, details, sshkeyEnabled, imageStoreId, isDynamicallyScalable);
 -				featured, isExtractable, imgfmt, guestOSId, zoneId, hypervisorType, templateOwner.getAccountName(), templateOwner.getDomainId(), templateOwner.getAccountId(), chksum, bootable, templateTag, details, sshkeyEnabled);
++				featured, isExtractable, imgfmt, guestOSId, zoneId, hypervisorType, templateOwner.getAccountName(), templateOwner.getDomainId(), templateOwner.getAccountId(), chksum, bootable, templateTag, details, sshkeyEnabled, null, isDynamicallyScalable);
++
  	}
- 	
+ 
  	@Override
  	public TemplateProfile prepare(RegisterTemplateCmd cmd) throws ResourceAllocationException {
  	    //check if the caller can operate with the template owner
@@@ -241,32 -229,32 +235,34 @@@
  		return prepare(false, UserContext.current().getCallerUserId(), cmd.getTemplateName(), cmd.getDisplayText(),
  				cmd.getBits(), cmd.isPasswordEnabled(), cmd.getRequiresHvm(), cmd.getUrl(), cmd.isPublic(), cmd.isFeatured(),
  				cmd.isExtractable(), cmd.getFormat(), cmd.getOsTypeId(), cmd.getZoneId(), HypervisorType.getType(cmd.getHypervisor()),
- 				cmd.getChecksum(), true, cmd.getTemplateTag(), owner, cmd.getDetails(), cmd.isSshKeyEnabled(), cmd.getImageStoreUuid(), cmd.isDynamicallyScalable());
 -				cmd.getChecksum(), true, cmd.getTemplateTag(), owner, cmd.getDetails(), cmd.isSshKeyEnabled());
++				cmd.getChecksum(), true, cmd.getTemplateTag(), owner, cmd.getDetails(), cmd.isSshKeyEnabled(), null, cmd.isDynamicallyScalable());
++
  	}
  
- 	public TemplateProfile prepare(RegisterIsoCmd cmd) throws ResourceAllocationException {
+ 	@Override
+     public TemplateProfile prepare(RegisterIsoCmd cmd) throws ResourceAllocationException {
  	    //check if the caller can operate with the template owner
  	    Account caller = UserContext.current().getCaller();
  	    Account owner = _accountMgr.getAccount(cmd.getEntityOwnerId());
  	    _accountMgr.checkAccess(caller, null, true, owner);
- 	   
+ 
  		return prepare(true, UserContext.current().getCallerUserId(), cmd.getIsoName(), cmd.getDisplayText(), 64, false,
  					true, cmd.getUrl(), cmd.isPublic(), cmd.isFeatured(), cmd.isExtractable(), ImageFormat.ISO.toString(), cmd.getOsTypeId(),
 -					cmd.getZoneId(), HypervisorType.None, cmd.getChecksum(), cmd.isBootable(), null, owner, null, false);
 +					cmd.getZoneId(), HypervisorType.None, cmd.getChecksum(), cmd.isBootable(), null, owner, null, false, cmd.getImageStoreUuid(), cmd.isDynamicallyScalable());
  	}
- 	
+ 
  	protected VMTemplateVO persistTemplate(TemplateProfile profile) {
  		Long zoneId = profile.getZoneId();
  		VMTemplateVO template = new VMTemplateVO(profile.getTemplateId(), profile.getName(), profile.getFormat(), profile.getIsPublic(),
  				profile.getFeatured(), profile.getIsExtractable(), TemplateType.USER, profile.getUrl(), profile.getRequiresHVM(),
  				profile.getBits(), profile.getAccountId(), profile.getCheckSum(), profile.getDisplayText(),
- 				profile.getPasswordEnabled(), profile.getGuestOsId(), profile.getBootable(), profile.getHypervisorType(), profile.getTemplateTag(), 
- 				profile.getDetails(), profile.getSshKeyEnabled(), profile.IsDynamicallyScalable());
+ 				profile.getPasswordEnabled(), profile.getGuestOsId(), profile.getBootable(), profile.getHypervisorType(), profile.getTemplateTag(),
+ 				profile.getDetails(), profile.getSshKeyEnabled());
+ 
 +
- 		template.setImageDataStoreId(profile.getImageStoreId());
  		if (zoneId == null || zoneId.longValue() == -1) {
              List<DataCenterVO> dcs = _dcDao.listAll();
-             
+ 
              if (dcs.isEmpty()) {
              	throw new CloudRuntimeException("No zones are present in the system, can't add template");
              }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f8c524/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------


Mime
View raw message