cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raf...@apache.org
Subject [08/11] git commit: updated refs/heads/master to d705d85
Date Wed, 24 Feb 2016 20:24:39 GMT
CLOUDSTACK-9252: Little refactor


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

Branch: refs/heads/master
Commit: 64c6debf0046e26dde81e915bb23a85fa3eae250
Parents: c5677cf
Author: nvazquez <nicolas.m.vazquez@gmail.com>
Authored: Fri Feb 5 06:22:23 2016 -0800
Committer: nvazquez <nicolas.m.vazquez@gmail.com>
Committed: Fri Feb 5 06:56:08 2016 -0800

----------------------------------------------------------------------
 .../core/spring-engine-storage-image-core-context.xml  |  2 --
 .../core/spring-engine-storage-core-context.xml        |  2 ++
 .../hypervisor/vmware/manager/VmwareManagerImpl.java   |  4 +---
 .../storage/resource/NfsSecondaryStorageResource.java  | 13 -------------
 4 files changed, 3 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64c6debf/engine/storage/image/resources/META-INF/cloudstack/core/spring-engine-storage-image-core-context.xml
----------------------------------------------------------------------
diff --git a/engine/storage/image/resources/META-INF/cloudstack/core/spring-engine-storage-image-core-context.xml
b/engine/storage/image/resources/META-INF/cloudstack/core/spring-engine-storage-image-core-context.xml
index 2441d1c..51be9d9 100644
--- a/engine/storage/image/resources/META-INF/cloudstack/core/spring-engine-storage-image-core-context.xml
+++ b/engine/storage/image/resources/META-INF/cloudstack/core/spring-engine-storage-image-core-context.xml
@@ -38,8 +38,6 @@
         class="org.apache.cloudstack.storage.image.datastore.ImageStoreHelper" />
     <bean id="imageFormatHelper"
         class="org.apache.cloudstack.storage.image.format.ImageFormatHelper" />
-    <bean id="imageStoreDetailsUtil"
-        class="com.cloud.storage.ImageStoreDetailsUtil" />
 
     <bean id="imageStoreProviderMgr"
         class="org.apache.cloudstack.storage.image.manager.ImageStoreProviderManagerImpl"
/>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64c6debf/engine/storage/resources/META-INF/cloudstack/core/spring-engine-storage-core-context.xml
----------------------------------------------------------------------
diff --git a/engine/storage/resources/META-INF/cloudstack/core/spring-engine-storage-core-context.xml
b/engine/storage/resources/META-INF/cloudstack/core/spring-engine-storage-core-context.xml
index 8040d80..a45e4ee 100644
--- a/engine/storage/resources/META-INF/cloudstack/core/spring-engine-storage-core-context.xml
+++ b/engine/storage/resources/META-INF/cloudstack/core/spring-engine-storage-core-context.xml
@@ -69,5 +69,7 @@
         <property name="snapshotStrategies" value="#{snapshotStrategiesRegistry.registered}"
/>
         <property name="vmSnapshotStrategies" value="#{vmSnapshotStrategiesRegistry.registered}"
/>
     </bean>
+    
+    <bean id="imageStoreDetailsUtil" class="com.cloud.storage.ImageStoreDetailsUtil" />
 
 </beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64c6debf/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index a477437..a938d38 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -201,10 +201,8 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager,
Vmw
 
     private final ScheduledExecutorService _hostScanScheduler = Executors.newScheduledThreadPool(1,
new NamedThreadFactory("Vmware-Host-Scan"));
 
-    private ApplicationContext applicationContext;
-
     public VmwareManagerImpl() {
-        applicationContext = ComponentContext.getApplicationContext();
+        ApplicationContext applicationContext = ComponentContext.getApplicationContext();
         imageStoreDetailsUtil = applicationContext.getBean("imageStoreDetailsUtil", ImageStoreDetailsUtil.class);
         _storageMgr = new VmwareStorageManagerImpl(this);
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64c6debf/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index 25a9878..0fa2b54 100644
--- a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -96,7 +96,6 @@ import org.apache.cloudstack.storage.command.UploadStatusAnswer;
 import org.apache.cloudstack.storage.command.UploadStatusAnswer.UploadStatus;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDao;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao;
-import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
 import org.apache.cloudstack.storage.command.UploadStatusCommand;
 import org.apache.cloudstack.storage.template.DownloadManager;
 import org.apache.cloudstack.storage.template.DownloadManagerImpl;
@@ -229,8 +228,6 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements
S
     @Inject
     ImageStoreDetailsDao detailsStoreDao;
 
-    public static final String IMAGE_STORE_PARAMETER_ID = "imageStoreId";
-
     public void setParentPath(String path) {
         _parent = path;
     }
@@ -1316,16 +1313,6 @@ public class NfsSecondaryStorageResource extends ServerResourceBase
implements S
         }
     }
 
-    private Long getImageStoreId(DataStoreTO dataStore){
-        Long imgStoreId = null;
-        if (dataStore.getRole().equals(DataStoreRole.Image)){
-            String uuid = dataStore.getUuid();
-            ImageStoreVO imageStoreVO = dataStoreDao.findByUuid(uuid);
-            imgStoreId = imageStoreVO.getId();
-        }
-        return imgStoreId;
-    }
-
     private Answer execute(SecStorageSetupCommand cmd) {
         if (!_inSystemVM) {
             return new Answer(cmd, true, null);


Mime
View raw message