Naming changes

This commit is contained in:
Harikrishna Patnala 2021-10-01 11:53:27 +05:30
parent 9aadf0aaeb
commit 1ab5e7b5e8
2 changed files with 7 additions and 7 deletions

View File

@ -881,7 +881,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
boolean datastoreChangeObserved = false;
boolean volumePathChangeObserved = false;
if (cmd.getContextParam(DiskTO.PROTOCOL_TYPE) != null && cmd.getContextParam(DiskTO.PROTOCOL_TYPE).equalsIgnoreCase("DatastoreCluster")) {
if (cmd.getContextParam(DiskTO.PROTOCOL_TYPE) != null && cmd.getContextParam(DiskTO.PROTOCOL_TYPE).equalsIgnoreCase(Storage.StoragePoolType.DatastoreCluster.toString())) {
VirtualMachineDiskInfoBuilder diskInfoBuilder = vmMo.getDiskInfoBuilder();
VirtualMachineDiskInfo matchingExistingDisk = getMatchingExistingDiskWithVolumeDetails(diskInfoBuilder, path, chainInfo, managed, cmd.get_iScsiName(), poolUUID, hyperHost, context);
if (diskInfoBuilder != null && matchingExistingDisk != null) {
@ -957,7 +957,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
ResizeVolumeAnswer answer = new ResizeVolumeAnswer(cmd, true, "success", newSize * 1024);
if (datastoreChangeObserved) {
answer.setContextParam("datastoreName", poolUUID);
answer.setContextParam("datastoreUUID", poolUUID);
answer.setContextParam("chainInfo", chainInfo);
}
@ -1954,7 +1954,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
s_logger.error(msg);
throw new Exception(msg);
}
if (rootDisk.getDetails().get(DiskTO.PROTOCOL_TYPE) != null && rootDisk.getDetails().get(DiskTO.PROTOCOL_TYPE).equalsIgnoreCase("DatastoreCluster")) {
if (rootDisk.getDetails().get(DiskTO.PROTOCOL_TYPE) != null && rootDisk.getDetails().get(DiskTO.PROTOCOL_TYPE).equalsIgnoreCase(Storage.StoragePoolType.DatastoreCluster.toString())) {
if (diskInfoBuilder != null) {
DatastoreMO diskDatastoreMofromVM = getDataStoreWhereDiskExists(hyperHost, context, diskInfoBuilder, rootDisk, diskDatastores);
if (diskDatastoreMofromVM != null) {

View File

@ -425,13 +425,13 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri
vol.update();
VolumeVO volumeVO = volumeDao.findById(vol.getId());
String datastoreName = answer.getContextParam("datastoreName");
if (datastoreName != null) {
StoragePoolVO storagePoolVO = primaryStoreDao.findByUuid(datastoreName);
String datastoreUUID = answer.getContextParam("datastoreUUID");
if (datastoreUUID != null) {
StoragePoolVO storagePoolVO = primaryStoreDao.findByUuid(datastoreUUID);
if (storagePoolVO != null) {
volumeVO.setPoolId(storagePoolVO.getId());
} else {
s_logger.warn(String.format("Unable to find datastore %s while updating the new datastore of the volume %d", datastoreName, vol.getId()));
s_logger.warn(String.format("Unable to find datastore %s while updating the new datastore of the volume %d", datastoreUUID, vol.getId()));
}
}