Skip to content

api: Update bindings to vSphere 9.1.2.0 - #4199

Draft
atanaskrastilov wants to merge 6 commits into
vmware:mainfrom
atanaskrastilov:topic/ak016942/main-bindings-9.1.2
Draft

atanaskrastilov wants to merge 6 commits into
vmware:mainfrom
atanaskrastilov:topic/ak016942/main-bindings-9.1.2

Conversation

@atanaskrastilov

@atanaskrastilov atanaskrastilov commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Update the bindings to vSphere 9.1.2.0 and set vim25.Version to 9.1.2.0.

Commits (please merge without squashing):

  1. chore: Pin the generator image (base image digest, Debian packages, goimports) and update gen/README.md.
  2. api: Set VIM_VERSION=9.1.2.0 in gen/gen.sh.
  3. chore: Add generator rules in gen/overrides.yaml that keep the declarations shipped in v0.56.2:
  4. fix: vslm.ObjectManager.Delete builds HostDeleteVStorageObject_Task explicitly instead of converting the
    request type.
  5. api: Generated bindings:
    • 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.
    • BREAKING: removes CustomizationIPSettings.Primary and VmPlacementPolicy.TagsToAttach (also from
      VmToVmGroupsAntiAffinity, VmVmAffinity and VmVmAntiAffinity).
  6. govc: Regenerate govc/USAGE.md.

Closes: #4057

How Has This Been Tested?

  • GOOS=linux GOARCH=amd64 go build ./... passes on each commit.
  • go test ./... in govc/ passes.
  • make doc leaves govc/USAGE.md unchanged.
  • gorelease -base=v0.56.2, compared with the same run on main: the only new incompatible changes are
    vim25.Version and the two removals.
  • make go-test, make lint and the govc tests: see the CI checks on this PR.
  • The govc tests fail in CI with the same 9 tests that fail on main (vcsim_stop exiting with status 143,
    vcsim run container); no new failures.
  • On the previous head, before the rebase onto the current main (same generated bindings): the govc bats tests
    against vcsim pass.

Guidelines

Please read and follow the CONTRIBUTION guidelines of this project.

🤖 Generated with Claude Code

@atanaskrastilov
atanaskrastilov force-pushed the topic/ak016942/main-bindings-9.1.2 branch 4 times, most recently from 4a15630 to 0e43aee Compare November 6, 2026 12:30
@atanaskrastilov
atanaskrastilov requested review from akutz and dougm and removed request for akutz and dougm November 6, 2026 13:08
@atanaskrastilov
atanaskrastilov force-pushed the topic/ak016942/main-bindings-9.1.2 branch 2 times, most recently from 04a41a1 to 29c061e Compare November 6, 2026 13:44

@karaatanassov karaatanassov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread gen/Dockerfile Outdated
Comment on lines +3 to +5
## with Go 1.27 indents lists in doc comments differently, which changes the
## comments of every generated file.
ARG GO_VERSION=1.25.14

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.27.3 is likely the correct value for today.

The comment differs from the actual value. Why?

@atanaskrastilov atanaskrastilov Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 by

I will leave it at 1.25 and investigate in a new task if we can move to 1.27.3 if that is ok?

Comment thread gen/gen.sh Outdated
Comment on lines +79 to +81
# 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I don't think we do I will scrub all internal references.

Comment thread gen/overrides.yaml Outdated
Comment on lines +16 to +25
# 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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread vim25/types/unreleased.go
// 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed?

@atanaskrastilov
atanaskrastilov force-pushed the topic/ak016942/main-bindings-9.1.2 branch from 29c061e to d57dd52 Compare November 6, 2026 15:10
atanaskrastilov and others added 6 commits November 25, 2026 08:48
- 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>
@atanaskrastilov
atanaskrastilov force-pushed the topic/ak016942/main-bindings-9.1.2 branch from d57dd52 to 94e397c Compare December 1, 2026 09:35
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

Successfully merging this pull request may close these issues.

Add firmwareVersion and driverVersion to vim.host.HostHostBusAdapter

2 participants