Skip to content

Commit 64c6deb

Browse files
committed
CLOUDSTACK-9252: Little refactor
1 parent c5677cf commit 64c6deb

File tree

4 files changed

+3
-18
lines changed

4 files changed

+3
-18
lines changed

engine/storage/image/resources/META-INF/cloudstack/core/spring-engine-storage-image-core-context.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
class="org.apache.cloudstack.storage.image.datastore.ImageStoreHelper" />
3939
<bean id="imageFormatHelper"
4040
class="org.apache.cloudstack.storage.image.format.ImageFormatHelper" />
41-
<bean id="imageStoreDetailsUtil"
42-
class="com.cloud.storage.ImageStoreDetailsUtil" />
4341

4442
<bean id="imageStoreProviderMgr"
4543
class="org.apache.cloudstack.storage.image.manager.ImageStoreProviderManagerImpl" />

engine/storage/resources/META-INF/cloudstack/core/spring-engine-storage-core-context.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,7 @@
6969
<property name="snapshotStrategies" value="#{snapshotStrategiesRegistry.registered}" />
7070
<property name="vmSnapshotStrategies" value="#{vmSnapshotStrategiesRegistry.registered}" />
7171
</bean>
72+
73+
<bean id="imageStoreDetailsUtil" class="com.cloud.storage.ImageStoreDetailsUtil" />
7274

7375
</beans>

plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,8 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
201201

202202
private final ScheduledExecutorService _hostScanScheduler = Executors.newScheduledThreadPool(1, new NamedThreadFactory("Vmware-Host-Scan"));
203203

204-
private ApplicationContext applicationContext;
205-
206204
public VmwareManagerImpl() {
207-
applicationContext = ComponentContext.getApplicationContext();
205+
ApplicationContext applicationContext = ComponentContext.getApplicationContext();
208206
imageStoreDetailsUtil = applicationContext.getBean("imageStoreDetailsUtil", ImageStoreDetailsUtil.class);
209207
_storageMgr = new VmwareStorageManagerImpl(this);
210208
}

services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
import org.apache.cloudstack.storage.command.UploadStatusAnswer.UploadStatus;
9797
import org.apache.cloudstack.storage.datastore.db.ImageStoreDao;
9898
import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao;
99-
import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
10099
import org.apache.cloudstack.storage.command.UploadStatusCommand;
101100
import org.apache.cloudstack.storage.template.DownloadManager;
102101
import org.apache.cloudstack.storage.template.DownloadManagerImpl;
@@ -229,8 +228,6 @@ public void setTimeout(int timeout) {
229228
@Inject
230229
ImageStoreDetailsDao detailsStoreDao;
231230

232-
public static final String IMAGE_STORE_PARAMETER_ID = "imageStoreId";
233-
234231
public void setParentPath(String path) {
235232
_parent = path;
236233
}
@@ -1316,16 +1313,6 @@ private void configCerts(KeystoreManager.Certificates certs) {
13161313
}
13171314
}
13181315

1319-
private Long getImageStoreId(DataStoreTO dataStore){
1320-
Long imgStoreId = null;
1321-
if (dataStore.getRole().equals(DataStoreRole.Image)){
1322-
String uuid = dataStore.getUuid();
1323-
ImageStoreVO imageStoreVO = dataStoreDao.findByUuid(uuid);
1324-
imgStoreId = imageStoreVO.getId();
1325-
}
1326-
return imgStoreId;
1327-
}
1328-
13291316
private Answer execute(SecStorageSetupCommand cmd) {
13301317
if (!_inSystemVM) {
13311318
return new Answer(cmd, true, null);

0 commit comments

Comments
 (0)