fix: parsing vApp properties while converting from OVF envelope to VM ConfigSpec#3964
Merged
Conversation
fa75724 to
5cf5513
Compare
akutz
reviewed
Feb 23, 2026
akutz
requested changes
Feb 23, 2026
tenthirtyam
requested changes
Feb 23, 2026
tenthirtyam
left a comment
Contributor
There was a problem hiding this comment.
Commit sign-off should use your broadcom.com email.
Contributor
Author
Done. |
akutz
approved these changes
Feb 23, 2026
Contributor
|
I'll fix the issue blocking the CI in another PR in the morning. |
aa274df to
a678a7c
Compare
…pe to VM ConfigSpec Signed-off-by: Hemanth kumar Pannem <hemanth-kumar.pannem@broadcom.com>
tenthirtyam
approved these changes
Feb 24, 2026
aruneshpa
pushed a commit
to aruneshpa/govmomi
that referenced
this pull request
Mar 17, 2026
… ConfigSpec(vmware#3964) Signed-off-by: Hemanth kumar Pannem <hemanth-kumar.pannem@broadcom.com>
aruneshpa
pushed a commit
to aruneshpa/govmomi
that referenced
this pull request
Mar 17, 2026
… ConfigSpec(vmware#3964) Signed-off-by: Hemanth kumar Pannem <hemanth-kumar.pannem@broadcom.com>
aruneshpa
pushed a commit
to aruneshpa/govmomi
that referenced
this pull request
Mar 17, 2026
… ConfigSpec(vmware#3964) Signed-off-by: Hemanth kumar Pannem <hemanth-kumar.pannem@broadcom.com>
aruneshpa
pushed a commit
to aruneshpa/govmomi
that referenced
this pull request
Mar 17, 2026
… ConfigSpec(vmware#3964) Signed-off-by: Hemanth kumar Pannem <hemanth-kumar.pannem@broadcom.com> Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@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
When building a
VmConfigSpecfrom an OVF envelope (Envelope.toVAppConfig), vApp property default values were assigned verbatim from the parsed OVF without any type-aware processing. This caused a correctness bug forbooleanproperties: the OVF envelope uses lowercase"true"/"false", but the vSphere API requires the canonical forms"True"/"False".This change introduces
ovf/vappconfig_parser.go, which implements type-aware parsing and validation of vApp property values for all OVF property types defined in DSP0004/DSP0243:boolean"True"/"False"intrealipstring/passwordstring(N..M)/password(N..M)int(N..M)real(N..M)ip:network,expression, unknownPassword-typed properties are handled with care: error messages never include the property value to avoid leaking secrets in logs.
Envelope.toVAppConfignow returns an error if any property value fails validation, surfacing problems at config-spec construction time rather than silently passing bad values to vSphere.Closes: #3963
How Has This Been Tested?
Unit tests added in
ovf/vappconfig_parser_test.gocovering:string,password,boolean,int,real,ip,ip:network,expression, unknown)string(..N),string(N..),string(M..N),int(M..N),real(M..N),password(..N),password(N..),password(M..N))go test ./ovf/...
ok github.com/vmware/govmomi/ovf 0.403s
ok github.com/vmware/govmomi/ovf/importer 0.198s