Repository navigation
api: Update bindings to vSphere 9.1.2.0 - #4199
atanaskrastilov wants to merge 6 commits into
Conversation
4a15630 to
0e43aee
Compare
04a41a1 to
29c061e
Compare
karaatanassov
left a comment
There was a problem hiding this comment.
The code changes look good to me though I cannot prove they are correct or not. Andrew and/or Doug will have more inputs. Polish the description of the PR as the coding agent has gone overboard in my opinion. Also try to resolve the issues notes in the PR description by talking to people. The agent cannot do that so it put its screams for help in the PR description. Ask Doug or Andrew about the squash policy if you insist on merging the individual steps into main/master history.
| ## with Go 1.27 indents lists in doc comments differently, which changes the | ||
| ## comments of every generated file. | ||
| ARG GO_VERSION=1.25.14 |
There was a problem hiding this comment.
1.27.3 is likely the correct value for today.
The comment differs from the actual value. Why?
There was a problem hiding this comment.
Comment is no wrong,
Generating with 1.27.3 would change the indentation of the comments:
- // - REQUIREMENT profile - Defines the storage constraints applied
- // to virtual machine placement. Requirements are defined by
+ // - REQUIREMENT profile - Defines the storage constraints applied
+ // to virtual machine placement. Requirements are defined byI will leave it at 1.25 and investigate in a new task if we can move to 1.27.3 if that is ok?
| # vimbase is not taken from the vcenter-all component tree: the | ||
| # vsphere-h5client component of tera-vcenter-all build 25893938 pins | ||
| # tera-vimbase build 25815313 from vcf-9.1.0.0. |
There was a problem hiding this comment.
I have been watching some other company repos in github and some of them leak more internal stuff others less.
Do we feel comfortable leaking build names, numbers, components. These are not publicly used product names.
There was a problem hiding this comment.
No I don't think we do I will scrub all internal references.
| # Field optionality where vi-json and the WSDL disagree. The WSDL marks a | ||
| # field minOccurs="0" when it was released after its type, even if VMODL | ||
| # declares it required; vi-json keeps the VMODL optionality. "required" and | ||
| # "optional" override the WSDL, "wsdl" keeps it. Generation fails for a | ||
| # disagreement without a rule, so that a field does not silently change its | ||
| # Go type or omitempty. | ||
| # | ||
| # Required fields are always encoded, including to an endpoint whose API | ||
| # version predates the field. | ||
| optionality: |
There was a problem hiding this comment.
Validate with Stefan.
My understanding is that very old fields e.g. pre 7.0 with @released annotation (i.e. not there since dawn of time) are rendered as optional in XSD files as the history of xsd is very old and there was time when a SOAP peer had to contend with other peers that did not know about certain field.
Because we introduced VI-JSON in 8.0.1.0 there is no possibility for a VI-JSON peer to talk to a party that does not know about fields existing in 8.0.1 and earlier release.
Basically for a field in vmodl like
@released(version="version10")
boolean diskUuidEnabled;
in the xsd file we will mark the field optional as there are xml peers (server of client) that could have been compiled before version10 (version10 is perhaps something like vCenter 5.
in the vi-json the earliest compiled client is on version 8.0.1. So every party knows about version10.
I am posting this comment se we can automate the generation of this file or perhaps drop the file altogether as the validation itself is weird.
| // VirtualMachineExtensionCompatibilityConstraintType enumerates the set of | ||
| // constraintType values defined in this release. The value is carried as an | ||
| // open string on the wire; these are the named constants. | ||
| type VirtualMachineExtensionCompatibilityConstraintType string |
There was a problem hiding this comment.
This is no longer needed?
29c061e to
d57dd52
Compare
- Dockerfile: base the image on golang:1.25.14-trixie pinned by digest, install Ruby 3.3 from a pinned Debian snapshot, and pin goimports. - gen_from_wsdl.rb: replace File.exists?, which Ruby 3.2 removed. - Makefile: pass VIM_VERSION into the container. - README.md: list the input files. Signed-off-by: Atanas Krastilov <atanas.krastilov@broadcom.com>
Set VIM_VERSION to 9.1.2.0. Signed-off-by: Atanas Krastilov <atanas.krastilov@broadcom.com>
Add gen/overrides.yaml, applied on top of the generator output, to keep the declarations shipped in v0.56.2: - fields: the Go type and xml/json tags of 4 vim25 fields. - optionality: 120 vim25 fields that stay required although the WSDL marks them minOccurs="0". - extra_fields: ResourcePoolRuntimeInfo.VmRp and SetCustomValueResponse.XMLName. - extra_enum_values: the VmPlacementPolicyVmPlacementPolicyStrictness value RequiredDuringPlacementRequiredDuringExecution. Field optionality otherwise comes from the WSDL. Generation fails on a rule that no longer changes the output, on a field whose optionality vi-json.yaml and the WSDL disagree on without a rule, on an extra field that is also generated, and on unknown keys. Signed-off-by: Atanas Krastilov <atanas.krastilov@broadcom.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build HostDeleteVStorageObject_Task explicitly instead of converting the DeleteVStorageObject_Task request, since the two types no longer have the same fields. Signed-off-by: Atanas Krastilov <atanas.krastilov@broadcom.com>
Regenerate the bindings and set vim25.Version to 9.1.2.0. - vim25 adds 67 types, 56 struct fields and 8 methods; pbm adds 2 enum values. - The ExtensionCompatibility bindings move from vim25/types/unreleased.go to the generated files. Closes: vmware#4057 BREAKING: Remove CustomizationIPSettings.Primary and VmPlacementPolicy.TagsToAttach (also from VmToVmGroupsAntiAffinity, VmVmAffinity and VmVmAntiAffinity). Signed-off-by: Atanas Krastilov <atanas.krastilov@broadcom.com>
Regenerate USAGE.md with make doc: host.vnic.service lists the new vnetworking value. Signed-off-by: Atanas Krastilov <atanas.krastilov@broadcom.com>
d57dd52 to
94e397c
Compare
Description
Update the bindings to vSphere 9.1.2.0 and set
vim25.Versionto9.1.2.0.Commits (please merge without squashing):
chore: Pin the generator image (base image digest, Debian packages, goimports) and updategen/README.md.api: SetVIM_VERSION=9.1.2.0ingen/gen.sh.chore: Add generator rules ingen/overrides.yamlthat keep the declarations shipped in v0.56.2:fix:vslm.ObjectManager.DeletebuildsHostDeleteVStorageObject_Taskexplicitly instead of converting therequest type.
api: Generated bindings:vim25/types/unreleased.goto the generated files.CustomizationIPSettings.PrimaryandVmPlacementPolicy.TagsToAttach(also fromVmToVmGroupsAntiAffinity,VmVmAffinityandVmVmAntiAffinity).govc: Regenerategovc/USAGE.md.Closes: #4057
How Has This Been Tested?
GOOS=linux GOARCH=amd64 go build ./...passes on each commit.go test ./...ingovc/passes.make docleavesgovc/USAGE.mdunchanged.gorelease -base=v0.56.2, compared with the same run onmain: the only new incompatible changes arevim25.Versionand the two removals.make go-test,make lintand the govc tests: see the CI checks on this PR.main(vcsim_stopexiting with status 143,vcsim run container); no new failures.main(same generated bindings): the govc bats testsagainst vcsim pass.
Guidelines
Please read and follow the
CONTRIBUTIONguidelines of this project.🤖 Generated with Claude Code