Skip to content

Commit

Permalink
feat: Enable function for merging disks (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
alperencelik authored Jun 4, 2024
1 parent fe3dbec commit 215b6c1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions virtual_machine_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,24 @@ func (vmc *VirtualMachineConfig) MergeIPConfigs() map[string]string {
}
return vmc.IPConfigs
}

func (vmc *VirtualMachineConfig) MergeDisks() map[string]string {
mergedDisks := make(map[string]string)

for k, v := range vmc.MergeIDEs() {
mergedDisks[k] = v
}

for k, v := range vmc.MergeSCSIs() {
mergedDisks[k] = v
}

for k, v := range vmc.MergeSATAs() {
mergedDisks[k] = v
}

for k, v := range vmc.MergeVirtIOs() {
mergedDisks[k] = v
}
return mergedDisks
}

0 comments on commit 215b6c1

Please sign in to comment.