GutoVeronezi commented on a change in pull request #5144:
URL: https://github.com/apache/cloudstack/pull/5144#discussion_r660917697
##########
File path:
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
##########
@@ -2756,6 +2758,32 @@ protected KVMStoragePoolManager getPoolManager() {
return _storagePoolMgr;
}
+ public void detachAndAttachConfigDriveISO(final Connect conn, final String
vmName) {
+ // detach and re-attach configdrive ISO
+ List<DiskDef> disks = getDisks(conn, vmName);
+ DiskDef configdrive = null;
+ for (DiskDef disk : disks) {
+ if (disk.getDeviceType() == DiskDef.DeviceType.CDROM &&
disk.getDiskLabel() == CONFIG_DRIVE_ISO_DISK_LABEL) {
+ configdrive = disk;
+ }
+ }
+ if (configdrive != null) {
Review comment:
We could invert the logic here to reduce block complexity.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]