Skip to content

Commit e3c8143

Browse files
Dirk KlahreDirk Klahre
authored andcommitted
[#4547] adapt collection sort to get the right root disk
1 parent 58a0a7b commit e3c8143

File tree

1 file changed

+1
-3
lines changed
  • plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource

1 file changed

+1
-3
lines changed

plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7274,9 +7274,7 @@ public int compare(final UnmanagedInstanceTO.Disk disk1, final UnmanagedInstance
72747274
}
72757275

72767276
int extractInt(UnmanagedInstanceTO.Disk disk) {
7277-
String num = disk.getLabel().replaceAll("\\D", "");
7278-
// return 0 if no digits found
7279-
return num.isEmpty() ? 0 : Integer.parseInt(num);
7277+
return disk.getPosition() + (disk.getControllerUnit() * 100);
72807278
}
72817279
});
72827280
}

0 commit comments

Comments
 (0)