This patch modifies the behavior of the HardwareVersion.IsValid function so that it returns true if the specified version can be parsed.
There is a new function, HardwareVersion.IsSupported, that acts more like the old behavior of IsValid. IsSupported only returns true when the version is known to GoVmomi.
BREAKING: HardwareVersion.IsValid is more relaxed, consider IsSupported
HardwareVersion.IsValid returns true if the specified value matches a VMX version format.
HardwareVersion.IsSupported behaves how IsValid used to behave.
Closes: NA
Type of change
Please mark options that are relevant:
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
[ ] Build related change
How Has This Been Tested?
[x] go test -count 1 -v ./vim25/types
Checklist:
[x] My code follows the CONTRIBUTIONguidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
Description
This patch modifies the behavior of the HardwareVersion.IsValid function so that it returns true if the specified version can be parsed.
There is a new function, HardwareVersion.IsSupported, that acts more like the old behavior of IsValid. IsSupported only returns true when the version is known to GoVmomi.
BREAKING: HardwareVersion.IsValid is more relaxed, consider IsSupported
Closes:
NA
Type of change
Please mark options that are relevant:
How Has This Been Tested?
go test -count 1 -v ./vim25/types
Checklist:
CONTRIBUTION
guidelines of this project