Skip to content

Commit ada64a9

Browse files
committed
pseudo code improved
1 parent 9c57b40 commit ada64a9

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

engine/schema/src/main/java/com/cloud/upgrade/GuestOsMapper.java

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,22 @@ public GuestOsMapper() {
5353
}
5454

5555
private void mergeDuplicates() {
56-
// find duplicates
57-
// find for the one with the higher (or lower) id, guestos hypervisor mappings
58-
// # we can also look at user_defined to decide which to eliminate and which to keep
59-
// for each retrieved mapping
60-
// // set the guest_os_id to the lower (or higher) id
61-
// find for the one with the highr (or lower) id, VMs
62-
// // set the guest_os_id to the lower (or higher) id
63-
// mark the higher id as removed
64-
// set the lower id as not user defined,
56+
// find duplicate guest_os definitions
57+
// decide which to remove
58+
// # highest/lowest id
59+
// # or is user_defined == false
60+
// for each one to remove
61+
// // find guestos hypervisor mappings
62+
// // // for each retrieved mapping
63+
// // // // set the guest_os_id to the one to keep
64+
// // find VMs
65+
// // // for each VM
66+
// // // // set the guest_os_id to the one to keep
67+
// // find templates
68+
// // // for each template
69+
// // // // set the guest_os_id to the one to keep
70+
// // mark as removed
71+
// set the lower id as not user defined, if that was not the premise anyway
6572
}
6673

6774
private long getGuestOsId(long categoryId, String displayName) {

0 commit comments

Comments
 (0)