Updated Branches: refs/heads/object_store fe3b01ece -> 14b5f0da1
Rename ImageDataFactoryxxx to TemplateDataFactory to have consistent naming conventions for Template data factory class. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/14b5f0da Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/14b5f0da Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/14b5f0da Branch: refs/heads/object_store Commit: 14b5f0da198b4acae79f1ef438b27250ee60b8f2 Parents: fe3b01e Author: Min Chen <[email protected]> Authored: Wed Apr 17 11:45:25 2013 -0700 Committer: Min Chen <[email protected]> Committed: Wed Apr 17 11:45:25 2013 -0700 ---------------------------------------------------------------------- .../subsystem/api/storage/ImageDataFactory.java | 26 ---- .../subsystem/api/storage/TemplateDataFactory.java | 26 ++++ .../storage/image/ImageDataFactoryImpl.java | 99 --------------- .../storage/image/TemplateDataFactoryImpl.java | 99 +++++++++++++++ .../cloudstack/storage/test/volumeServiceTest.java | 4 +- .../datastore/ObjectInDataStoreManagerImpl.java | 4 +- .../storage/datastore/PrimaryDataStoreImpl.java | 4 +- .../volume/TemplateInstallStrategyImpl.java | 4 +- .../src/com/cloud/storage/StorageManagerImpl.java | 4 +- .../src/com/cloud/storage/VolumeManagerImpl.java | 4 +- .../cloud/template/HypervisorTemplateAdapter.java | 4 +- .../com/cloud/template/TemplateManagerImpl.java | 4 +- 12 files changed, 141 insertions(+), 141 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageDataFactory.java ---------------------------------------------------------------------- diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageDataFactory.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageDataFactory.java deleted file mode 100644 index f0d6988..0000000 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageDataFactory.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cloudstack.engine.subsystem.api.storage; - - -public interface ImageDataFactory { - TemplateInfo getTemplate(long templateId, DataStore store); - TemplateInfo getTemplate(DataObject obj, DataStore store); - TemplateInfo getTemplate(long templateId); -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateDataFactory.java ---------------------------------------------------------------------- diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateDataFactory.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateDataFactory.java new file mode 100644 index 0000000..c2775a3 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateDataFactory.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cloudstack.engine.subsystem.api.storage; + + +public interface TemplateDataFactory { + TemplateInfo getTemplate(long templateId, DataStore store); + TemplateInfo getTemplate(DataObject obj, DataStore store); + TemplateInfo getTemplate(long templateId); +} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java deleted file mode 100644 index 2c091cc..0000000 --- a/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cloudstack.storage.image; - -import javax.inject.Inject; - -import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; -import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; -import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; -import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; -import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; -import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; -import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; -import org.apache.cloudstack.storage.image.store.TemplateObject; -import org.apache.log4j.Logger; -import org.springframework.stereotype.Component; - -import com.cloud.storage.DataStoreRole; -import com.cloud.storage.VMTemplateStoragePoolVO; -import com.cloud.storage.VMTemplateVO; -import com.cloud.storage.dao.VMTemplateDao; -import com.cloud.storage.dao.VMTemplatePoolDao; - -@Component -public class ImageDataFactoryImpl implements ImageDataFactory { - private static final Logger s_logger = Logger - .getLogger(ImageDataFactoryImpl.class); - @Inject - VMTemplateDao imageDataDao; - @Inject - DataStoreManager storeMgr; - @Inject - VMTemplatePoolDao templatePoolDao; - @Inject - TemplateDataStoreDao templateStoreDao; - @Override - public TemplateInfo getTemplate(long templateId, DataStore store) { - VMTemplateVO templ = imageDataDao.findById(templateId); - if (store == null) { - TemplateObject tmpl = TemplateObject.getTemplate(templ, null); - return tmpl; - } - // verify if the given input parameters are consistent with our db data. - boolean found = false; - if (store.getRole() == DataStoreRole.Primary) { - VMTemplateStoragePoolVO templatePoolVO = templatePoolDao.findByPoolTemplate(store.getId(), templateId); - if (templatePoolVO != null) { - found = true; - } - } else { - TemplateDataStoreVO templateStoreVO = templateStoreDao.findByStoreTemplate(store.getId(), templateId); - if (templateStoreVO != null) { - found = true; - } - } - - if (!found) { - s_logger.debug("template " + templateId + " is not in store:" + store.getId() + ", type:" + store.getRole()); - } - - TemplateObject tmpl = TemplateObject.getTemplate(templ, store); - return tmpl; - } - - // NOTE that this method can only be used for get template information stored in secondary storage - //TODO: this method is problematic, since one template can be stored in multiple image stores. - // need to see if we can get rid of this method or change to plural format, or restrict to 1:1 mapping - @Override - public TemplateInfo getTemplate(long templateId) { - VMTemplateVO templ = imageDataDao.findById(templateId); - TemplateDataStoreVO tmplStore = templateStoreDao.findByTemplate(templateId); - DataStore store = null; - if ( tmplStore != null ){ - store = this.storeMgr.getDataStore(tmplStore.getDataStoreId(), DataStoreRole.Image); - } - return this.getTemplate(templateId, store); - } - - @Override - public TemplateInfo getTemplate(DataObject obj, DataStore store) { - return this.getTemplate(obj.getId(), store); - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java new file mode 100644 index 0000000..2f65b6b --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java @@ -0,0 +1,99 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cloudstack.storage.image; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; +import org.apache.cloudstack.storage.image.store.TemplateObject; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.storage.DataStoreRole; +import com.cloud.storage.VMTemplateStoragePoolVO; +import com.cloud.storage.VMTemplateVO; +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.storage.dao.VMTemplatePoolDao; + +@Component +public class TemplateDataFactoryImpl implements TemplateDataFactory { + private static final Logger s_logger = Logger + .getLogger(TemplateDataFactoryImpl.class); + @Inject + VMTemplateDao imageDataDao; + @Inject + DataStoreManager storeMgr; + @Inject + VMTemplatePoolDao templatePoolDao; + @Inject + TemplateDataStoreDao templateStoreDao; + @Override + public TemplateInfo getTemplate(long templateId, DataStore store) { + VMTemplateVO templ = imageDataDao.findById(templateId); + if (store == null) { + TemplateObject tmpl = TemplateObject.getTemplate(templ, null); + return tmpl; + } + // verify if the given input parameters are consistent with our db data. + boolean found = false; + if (store.getRole() == DataStoreRole.Primary) { + VMTemplateStoragePoolVO templatePoolVO = templatePoolDao.findByPoolTemplate(store.getId(), templateId); + if (templatePoolVO != null) { + found = true; + } + } else { + TemplateDataStoreVO templateStoreVO = templateStoreDao.findByStoreTemplate(store.getId(), templateId); + if (templateStoreVO != null) { + found = true; + } + } + + if (!found) { + s_logger.debug("template " + templateId + " is not in store:" + store.getId() + ", type:" + store.getRole()); + } + + TemplateObject tmpl = TemplateObject.getTemplate(templ, store); + return tmpl; + } + + // NOTE that this method can only be used for get template information stored in secondary storage + //TODO: this method is problematic, since one template can be stored in multiple image stores. + // need to see if we can get rid of this method or change to plural format, or restrict to 1:1 mapping + @Override + public TemplateInfo getTemplate(long templateId) { + VMTemplateVO templ = imageDataDao.findById(templateId); + TemplateDataStoreVO tmplStore = templateStoreDao.findByTemplate(templateId); + DataStore store = null; + if ( tmplStore != null ){ + store = this.storeMgr.getDataStore(tmplStore.getDataStoreId(), DataStoreRole.Image); + } + return this.getTemplate(templateId, store); + } + + @Override + public TemplateInfo getTemplate(DataObject obj, DataStore store) { + return this.getTemplate(obj.getId(), store); + } +} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java ---------------------------------------------------------------------- diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java index 64d2143..f8aacc0 100644 --- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java @@ -38,7 +38,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager; import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector; -import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService; import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; @@ -110,7 +110,7 @@ public class volumeServiceTest extends CloudStackTestNGBase { @Inject EndPointSelector selector; @Inject - ImageDataFactory imageDataFactory; + TemplateDataFactory imageDataFactory; @Inject VolumeDataFactory volumeFactory; Long dcId; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java index 6e12678..89d6160 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java @@ -23,7 +23,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; -import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State; import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; @@ -58,7 +58,7 @@ public class ObjectInDataStoreManagerImpl implements ObjectInDataStoreManager { private static final Logger s_logger = Logger .getLogger(ObjectInDataStoreManagerImpl.class); @Inject - ImageDataFactory imageFactory; + TemplateDataFactory imageFactory; @Inject DataStoreManager storeMgr; @Inject http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java index 8be1c8a..4c214c1 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java @@ -29,7 +29,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; import org.apache.cloudstack.engine.subsystem.api.storage.HostScope; -import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver; import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle; @@ -72,7 +72,7 @@ public class PrimaryDataStoreImpl implements PrimaryDataStore { @Inject private ObjectInDataStoreManager objectInStoreMgr; @Inject - ImageDataFactory imageDataFactory; + TemplateDataFactory imageDataFactory; @Inject SnapshotDataFactory snapshotFactory; protected DataStoreProvider provider; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java index 69979e5..b57d99d 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java @@ -21,7 +21,7 @@ package org.apache.cloudstack.storage.volume; import javax.inject.Inject; import org.apache.cloudstack.engine.subsystem.api.storage.DataMotionService; -import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; import org.apache.cloudstack.framework.async.AsyncCompletionCallback; import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; @@ -39,7 +39,7 @@ public class TemplateInstallStrategyImpl implements TemplateInstallStrategy { @Inject DataMotionService motionSrv; @Inject - ImageDataFactory imageFactory; + TemplateDataFactory imageFactory; protected long waitingTime = 1800; // half an hour protected long waitingRetries = 10; /* http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/server/src/com/cloud/storage/StorageManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index d46b2c6..fb3d320 100755 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -55,7 +55,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager; import org.apache.cloudstack.engine.subsystem.api.storage.HostScope; import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener; -import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.ImageStoreProvider; import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo; import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; @@ -313,7 +313,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C @Inject VolumeDataFactory volFactory; @Inject - ImageDataFactory tmplFactory; + TemplateDataFactory tmplFactory; @Inject SnapshotDataFactory snapshotFactory; @Inject http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/server/src/com/cloud/storage/VolumeManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java index 4b87080..4a7a140 100644 --- a/server/src/com/cloud/storage/VolumeManagerImpl.java +++ b/server/src/com/cloud/storage/VolumeManagerImpl.java @@ -45,7 +45,7 @@ import org.apache.cloudstack.api.command.user.volume.UploadVolumeCmd; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager; -import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo; import org.apache.cloudstack.engine.subsystem.api.storage.Scope; import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; @@ -305,7 +305,7 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { @Inject VolumeDataFactory volFactory; @Inject - ImageDataFactory tmplFactory; + TemplateDataFactory tmplFactory; @Inject SnapshotDataFactory snapshotFactory; private int _copyvolumewait; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/server/src/com/cloud/template/HypervisorTemplateAdapter.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/template/HypervisorTemplateAdapter.java b/server/src/com/cloud/template/HypervisorTemplateAdapter.java index 3399ca1..8906eaf 100755 --- a/server/src/com/cloud/template/HypervisorTemplateAdapter.java +++ b/server/src/com/cloud/template/HypervisorTemplateAdapter.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.command.user.template.RegisterTemplateCmd; import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; -import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService; import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope; import org.apache.cloudstack.framework.async.AsyncCallFuture; @@ -77,7 +77,7 @@ public class HypervisorTemplateAdapter extends TemplateAdapterBase implements Te @Inject DataStoreManager storeMgr; @Inject TemplateService imageService; - @Inject ImageDataFactory imageFactory; + @Inject TemplateDataFactory imageFactory; @Inject TemplateManager templateMgr; @Override http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b5f0da/server/src/com/cloud/template/TemplateManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java b/server/src/com/cloud/template/TemplateManagerImpl.java index da0b884..7ef658c 100755 --- a/server/src/com/cloud/template/TemplateManagerImpl.java +++ b/server/src/com/cloud/template/TemplateManagerImpl.java @@ -56,7 +56,7 @@ import org.apache.cloudstack.api.command.user.template.UpdateTemplatePermissions import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; -import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService; import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; @@ -248,7 +248,7 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager, @Inject VolumeDataFactory volFactory; @Inject - ImageDataFactory tmplFactory; + TemplateDataFactory tmplFactory; @Inject SnapshotDataFactory snapshotFactory; @Inject
