api: Fix OVF defVal & ConfigSpec vAppConfig#3904
Merged
akutz merged 1 commit intovmware:mainfrom Nov 20, 2025
Merged
Conversation
32592fc to
3b7d4fe
Compare
This patch addresses some bugs in the way OVFs are unmarshalled as well as transformed into ConfigSpec objects. For some reason the original OVF unmarshalling code ignored the fact that properties have a "value" attribute and not just sub-elements. In fact, the latter is not even in the DMTF OVF spec. There was also a bug in how the default value and value were treated as the same, when they are not. Signed-off-by: akutz <andrew.kutz@broadcom.com>
3b7d4fe to
35b20e6
Compare
This was referenced Nov 20, 2025
akutz
added a commit
to akutz/govmomi
that referenced
this pull request
Nov 20, 2025
Apparently we have several OVF examples with `ovf:defaultValue` lying around, and these are incorrect. There is no such attribute in the OVF schema per http://schemas.dmtf.org/ovf/envelope/1/dsp8023.xsd. Per the OVF spec: > The optional attribute ovf:userConfigurable determines whether the > property value is configurable during the installation phase. If > ovf:userConfigurable is FALSE or omitted, the ovf:value attribute > specifies the value to be used for that customization parameter > during installation. If ovf:userConfigurable is TRUE, the ovf:value > attribute specifies a default value for that customization parameter, > which may be changed during installation. Therefore the previous behavior was correct. Signed-off-by: akutz <andrew.kutz@broadcom.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This patch addresses some bugs in the way OVFs are unmarshalled as well as transformed into ConfigSpec objects. For some reason the original OVF unmarshalling code ignored the fact that properties have a "value" attribute and not just sub-elements. In fact, the latter is not even in the DMTF OVF spec. There was also a bug in how the default value and value were treated as the same, when they are not.
Closes:
NAHow Has This Been Tested?
Added unit tests and enhanced existing ones. Just run
go test -v -count=1 ./ovfGuidelines
Please read and follow the
CONTRIBUTIONguidelines of this project.