mirror of https://github.com/apache/cloudstack.git
Change in constructors
This commit is contained in:
parent
cb3211ffa1
commit
9aadf0aaeb
|
|
@ -42,18 +42,25 @@ public class MigrateVolumeCommand extends Command {
|
|||
private Map<String, String> srcDetails;
|
||||
private Map<String, String> destDetails;
|
||||
|
||||
public MigrateVolumeCommand(long volumeId, String volumePath, StoragePool pool, int timeout, String chainInfo) {
|
||||
public MigrateVolumeCommand(long volumeId, String volumePath, StoragePool pool, int timeout) {
|
||||
this.volumeId = volumeId;
|
||||
this.volumePath = volumePath;
|
||||
this.pool = new StorageFilerTO(pool);
|
||||
this.chainInfo = chainInfo;
|
||||
this.setWait(timeout);
|
||||
}
|
||||
|
||||
public MigrateVolumeCommand(long volumeId, String volumePath, StoragePool pool, String attachedVmName, Volume.Type volumeType, int timeout) {
|
||||
this(volumeId, volumePath, pool, timeout);
|
||||
this.attachedVmName = attachedVmName;
|
||||
this.volumeType = volumeType;
|
||||
this.setWait(timeout);
|
||||
}
|
||||
|
||||
public MigrateVolumeCommand(long volumeId, String volumePath, StoragePool pool, String attachedVmName, Volume.Type volumeType, int timeout, String chainInfo) {
|
||||
this(volumeId, volumePath, pool, timeout, chainInfo);
|
||||
this(volumeId, volumePath, pool, timeout);
|
||||
this.attachedVmName = attachedVmName;
|
||||
this.volumeType = volumeType;
|
||||
this.chainInfo = chainInfo;
|
||||
this.setWait(timeout);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class ResizeVolumeCommand extends Command {
|
|||
protected ResizeVolumeCommand() {
|
||||
}
|
||||
|
||||
public ResizeVolumeCommand(String path, StorageFilerTO pool, Long currentSize, Long newSize, boolean shrinkOk, String vmInstance, String chainInfo) {
|
||||
public ResizeVolumeCommand(String path, StorageFilerTO pool, Long currentSize, Long newSize, boolean shrinkOk, String vmInstance) {
|
||||
this.path = path;
|
||||
this.pool = pool;
|
||||
this.currentSize = currentSize;
|
||||
|
|
@ -46,12 +46,16 @@ public class ResizeVolumeCommand extends Command {
|
|||
this.shrinkOk = shrinkOk;
|
||||
this.vmInstance = vmInstance;
|
||||
this.managed = false;
|
||||
}
|
||||
|
||||
public ResizeVolumeCommand(String path, StorageFilerTO pool, Long currentSize, Long newSize, boolean shrinkOk, String vmInstance, String chainInfo) {
|
||||
this(path, pool, currentSize, newSize, shrinkOk, vmInstance);
|
||||
this.chainInfo = chainInfo;
|
||||
}
|
||||
|
||||
public ResizeVolumeCommand(String path, StorageFilerTO pool, Long currentSize, Long newSize, boolean shrinkOk, String vmInstance,
|
||||
boolean isManaged, String iScsiName) {
|
||||
this(path, pool, currentSize, newSize, shrinkOk, vmInstance, null);
|
||||
this(path, pool, currentSize, newSize, shrinkOk, vmInstance);
|
||||
|
||||
this.iScsiName = iScsiName;
|
||||
this.managed = isManaged;
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ public class CheckNetworkAnswerTest {
|
|||
Long newSize = 4194304L;
|
||||
Long currentSize = 1048576L;
|
||||
|
||||
ResizeVolumeCommand rv = new ResizeVolumeCommand("dummydiskpath", new StorageFilerTO(dummypool), currentSize, newSize, false, "vmName", null);
|
||||
ResizeVolumeCommand rv = new ResizeVolumeCommand("dummydiskpath", new StorageFilerTO(dummypool), currentSize, newSize, false, "vmName");
|
||||
|
||||
@Test
|
||||
public void testExecuteInSequence() {
|
||||
|
|
|
|||
|
|
@ -740,7 +740,7 @@ public class StorageSystemDataMotionStrategy implements DataMotionStrategy {
|
|||
StoragePool destPool = (StoragePool)dataStoreMgr.getDataStore(destVolumeInfo.getDataStore().getId(), DataStoreRole.Primary);
|
||||
|
||||
MigrateVolumeCommand command = new MigrateVolumeCommand(srcVolumeInfo.getId(), srcVolumeInfo.getPath(), destPool, srcVolumeInfo.getAttachedVmName(),
|
||||
srcVolumeInfo.getVolumeType(), waitInterval, null);
|
||||
srcVolumeInfo.getVolumeType(), waitInterval);
|
||||
|
||||
Map<String, String> details = new HashMap<>();
|
||||
|
||||
|
|
|
|||
|
|
@ -4836,7 +4836,7 @@ public class LibvirtComputingResourceTest {
|
|||
final boolean shrinkOk = true;
|
||||
final String vmInstance = "Test";
|
||||
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance, null);
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance);
|
||||
|
||||
final KVMStoragePoolManager storagePoolMgr = Mockito.mock(KVMStoragePoolManager.class);
|
||||
final KVMStoragePool storagePool = Mockito.mock(KVMStoragePool.class);
|
||||
|
|
@ -4889,7 +4889,7 @@ public class LibvirtComputingResourceTest {
|
|||
final boolean shrinkOk = false;
|
||||
final String vmInstance = "Test";
|
||||
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance, null);
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance);
|
||||
|
||||
final KVMStoragePoolManager storagePoolMgr = Mockito.mock(KVMStoragePoolManager.class);
|
||||
final KVMStoragePool storagePool = Mockito.mock(KVMStoragePool.class);
|
||||
|
|
@ -4929,7 +4929,7 @@ public class LibvirtComputingResourceTest {
|
|||
final boolean shrinkOk = false;
|
||||
final String vmInstance = "Test";
|
||||
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance, null);
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance);
|
||||
|
||||
final LibvirtRequestWrapper wrapper = LibvirtRequestWrapper.getInstance();
|
||||
assertNotNull(wrapper);
|
||||
|
|
@ -4947,7 +4947,7 @@ public class LibvirtComputingResourceTest {
|
|||
final boolean shrinkOk = true;
|
||||
final String vmInstance = "Test";
|
||||
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance, null);
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance);
|
||||
|
||||
final KVMStoragePoolManager storagePoolMgr = Mockito.mock(KVMStoragePoolManager.class);
|
||||
final KVMStoragePool storagePool = Mockito.mock(KVMStoragePool.class);
|
||||
|
|
@ -4976,7 +4976,7 @@ public class LibvirtComputingResourceTest {
|
|||
final boolean shrinkOk = false;
|
||||
final String vmInstance = "Test";
|
||||
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance, null);
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance);
|
||||
|
||||
final KVMStoragePoolManager storagePoolMgr = Mockito.mock(KVMStoragePoolManager.class);
|
||||
final KVMStoragePool storagePool = Mockito.mock(KVMStoragePool.class);
|
||||
|
|
@ -5024,7 +5024,7 @@ public class LibvirtComputingResourceTest {
|
|||
final boolean shrinkOk = false;
|
||||
final String vmInstance = "Test";
|
||||
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance, null);
|
||||
final ResizeVolumeCommand command = new ResizeVolumeCommand(path, pool, currentSize, newSize, shrinkOk, vmInstance);
|
||||
|
||||
final KVMStoragePoolManager storagePoolMgr = Mockito.mock(KVMStoragePoolManager.class);
|
||||
final KVMStoragePool storagePool = Mockito.mock(KVMStoragePool.class);
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ public class CitrixRequestWrapperTest {
|
|||
public void testResizeVolumeCommand() {
|
||||
final StorageFilerTO pool = Mockito.mock(StorageFilerTO.class);
|
||||
|
||||
final ResizeVolumeCommand resizeCommand = new ResizeVolumeCommand("Test", pool, 1l, 3l, false, "Tests-1", null);
|
||||
final ResizeVolumeCommand resizeCommand = new ResizeVolumeCommand("Test", pool, 1l, 3l, false, "Tests-1");
|
||||
|
||||
final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance();
|
||||
assertNotNull(wrapper);
|
||||
|
|
|
|||
|
|
@ -486,7 +486,7 @@ public class XenServer610WrapperTest {
|
|||
final Map<String, String> other = new HashMap<String, String>();
|
||||
other.put("live", "true");
|
||||
|
||||
final MigrateVolumeCommand createStorageCommand = new MigrateVolumeCommand(volumeId, volumePath, pool, timeout, null);
|
||||
final MigrateVolumeCommand createStorageCommand = new MigrateVolumeCommand(volumeId, volumePath, pool, timeout);
|
||||
|
||||
final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance();
|
||||
assertNotNull(wrapper);
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ public class LinstorPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
|
|||
|
||||
ResizeVolumeCommand resizeCmd =
|
||||
new ResizeVolumeCommand(vol.getPath(), new StorageFilerTO(pool), oldSize, resizeParameter.newSize, resizeParameter.shrinkOk,
|
||||
resizeParameter.instanceName, null);
|
||||
resizeParameter.instanceName);
|
||||
CreateCmdResult result = new CreateCmdResult(null, null);
|
||||
try {
|
||||
ResizeVolumeAnswer answer = (ResizeVolumeAnswer) _storageMgr.sendToPool(pool, resizeParameter.hosts, resizeCmd);
|
||||
|
|
|
|||
Loading…
Reference in New Issue