Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a GetMinimumCompatibleHardwareVersion for configSpec devices #161

Open
sreyasn opened this issue Jun 12, 2023 · 0 comments
Open

Use a GetMinimumCompatibleHardwareVersion for configSpec devices #161

sreyasn opened this issue Jun 12, 2023 · 0 comments

Comments

@sreyasn
Copy link
Contributor

sreyasn commented Jun 12, 2023

Please describe the solution you would like.

Implement a GetMinimumCompatibleHardwareVersion with args configSpec and floorHardwareVersion int32 as the known, minimum hardware version in pkg/util/vsphere/vm.

This function can then be used to determine the minimum, compatible hardware version for the provided configSpec with a value that cannot be less than the provided floorHardwareVersion. The caller will then determine what value to send in for floorHardwareVersion by determining:

For example, in HardwareVersionForPVCandPCIDevices

if the VM Op VM has PVCs, then floorHardwareVersion is the larger value between MinSupportedHWVersionForPVC and imageHWVersion
if the VM Op VM does not have PVCs then floorHardwareVersion is imageHWVersion
This way the renamed GetMinimumCompatibleHardwareVersion becomes a useful function that is not tied to the VM Op API schemas and can be reused elsewhere.

Similarly for PCI devices send in MinSupportedHWVersionForPCIDevices or the imageHWVersion.

Is there anything else you would like to add?
For more context refer : #160 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant