vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.26k stars 896 forks source link

api: EnsureDisksHaveControllers helper #3474

Closed akutz closed 1 week ago

akutz commented 1 week ago

Description

This patch adds a function for ensuring all disks in a ConfigSpec point to a valid controller.

Closes: NA

Type of change

Please mark options that are relevant:

How Has This Been Tested?

image image image image image image image image image

Checklist:

akutz commented 1 week ago
  • Can we also use this logic on the simulator side? As in a dry-run mode that helps vcsim detect invalid device controller config, resulting in a Fault. Then again, if everything uses this helper client side, might not be a need for such vcsim testing ;)

Oh, possibly!

  • Can we collapse / get rid of related code in VirtualDeviceList? As in the VirtualDeviceList.*Controller methods.

I can take a look to see what we might be able to remove.

Do you want me to block this PR on either of the above pieces of feedback? I am fine doing so, I just wanted to be clear if that was your expectation. Thanks!

Nevemind, I missed the part where you said "after this PR is merged" :) Thanks again!