Skip to content

Commit b600bb9

Browse files
Fix build after rebasing with main
1 parent 635abdc commit b600bb9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ public UserVmResponse importVm(ImportVmCmd cmd) {
15101510
Long poolId = cmd.getStoragePoolId();
15111511

15121512
UnmanagedInstanceTO unmanagedInstanceTO = null;
1513-
if(ImportSource.EXTERNAL == importSource) {
1513+
if (ImportSource.EXTERNAL == importSource) {
15141514
if (StringUtils.isBlank(cmd.getUsername())) {
15151515
throw new InvalidParameterValueException("Username need to be provided.");
15161516
}
@@ -1522,35 +1522,35 @@ public UserVmResponse importVm(ImportVmCmd cmd) {
15221522
}
15231523
}
15241524

1525-
if(ImportSource.SHARED == importSource) {
1526-
if(poolId == null) {
1525+
if (ImportSource.SHARED == importSource) {
1526+
if (poolId == null) {
15271527
throw new InvalidParameterValueException("Storage Pool is required for Import from shared storage");
15281528
}
15291529

1530-
if(primaryDataStoreDao.findById(poolId) == null) {
1530+
if (primaryDataStoreDao.findById(poolId) == null) {
15311531
throw new InvalidParameterValueException("Storage Pool not found");
15321532
}
15331533
}
15341534

1535-
if(ImportSource.LOCAL == importSource) {
1536-
if(hostId == null) {
1535+
if (ImportSource.LOCAL == importSource) {
1536+
if (hostId == null) {
15371537
throw new InvalidParameterValueException("Host is required for Import from local storage");
15381538
}
15391539

1540-
if(hostDao.findById(hostId) == null) {
1540+
if (hostDao.findById(hostId) == null) {
15411541
throw new InvalidParameterValueException("Host not found");
15421542
}
15431543
}
15441544

1545-
if(ImportSource.SHARED == importSource || ImportSource.LOCAL == importSource) {
1546-
if(diskPath == null) {
1545+
if (ImportSource.SHARED == importSource || ImportSource.LOCAL == importSource) {
1546+
if (diskPath == null) {
15471547
throw new InvalidParameterValueException("Disk Path is required for Import from shared/local storage");
15481548
}
15491549
}
15501550

15511551
UserVm userVm = null;
15521552

1553-
if(ImportSource.EXTERNAL == importSource) {
1553+
if (ImportSource.EXTERNAL == importSource) {
15541554
String username = cmd.getUsername();
15551555
String password = cmd.getPassword();
15561556
String tmpPath = cmd.getTmpPath();
@@ -1602,7 +1602,7 @@ private UserVm importExternalKvmVirtualMachine(final UnmanagedInstanceTO unmanag
16021602

16031603
// Check NICs and supplied networks
16041604
Map<String, Network.IpAddresses> nicIpAddressMap = getNicIpAddresses(unmanagedInstance.getNics(), callerNicIpAddressMap);
1605-
Map<String, Long> allNicNetworkMap = getUnmanagedNicNetworkMap(unmanagedInstance.getNics(), nicNetworkMap, nicIpAddressMap, zone, hostName, owner);
1605+
Map<String, Long> allNicNetworkMap = getUnmanagedNicNetworkMap(unmanagedInstance.getName(), unmanagedInstance.getNics(), nicNetworkMap, nicIpAddressMap, zone, hostName, owner);
16061606
if (!CollectionUtils.isEmpty(unmanagedInstance.getNics())) {
16071607
allDetails.put(VmDetailConstants.NIC_ADAPTER, unmanagedInstance.getNics().get(0).getAdapterType());
16081608
}

0 commit comments

Comments
 (0)