v0.31.0
Release v0.31.0
Release Date: 2023-09-25
⚠️ BREAKING
-
[b594bf1] Move to main
Changing GoVmomi's default branch from
master
tomain
will likely result in dependents needing to repoint their clients and other integrations to the new, default branch. -
[9920086] Generate JSON tags
Updating the
vim25/types
with camelCased, JSON tags affects the output of thegovc
command when using the-json
flag to emit results as JSON. Field names that used to be PascalCased will now be camelCased. Queries for tools that parse JSON, such asjq
, will need to be updated to use the new camelCased fields.This change was made to support marshaling the eam, pbm, sms, vim, and vslm types to/from JSON using OpenAPI JSON discriminators.
-
[4f9f126] Change
string
to*string
forItem.Description
andLibrary.Description
in library package-
Test against a VC testbed
Sending a UpdateLibraryItem request with this change, and set the new description to "". The original item description was "virtualmachinepublishrequest.vmware.com: 6b0d06ad-8e18-4881-a806-2a7c8a7e1b4b", after this UpdateLibraryItem request succeeded, the item description was set to "". While before this change, it would be a no-op for the description.
-
Test using govc
-
Update Library
Create a library: ➜ govmomi git:(issue-3048) ✗ govc library.create -d "description-1" cl-1 495f611a-cf74-40d6-a54a-8b239cf15406 ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.info 495f611a-cf74-40d6-a54a-8b239cf15406 Name: cl-1 ID: 495f611a-cf74-40d6-a54a-8b239cf15406 Path: /cl-1 Description: description-1 Version: 2 Created: Fri Feb 17 19:18:22 2023 Security Policy ID StorageBackings: DatastoreID: sharedVmfs-0 Type: DATASTORE Update the library description with new string: ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.update -d "new description" 495f611a-cf74-40d6-a54a-8b239cf15406 ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.info 495f611a-cf74-40d6-a54a-8b239cf15406 Name: cl-1 ID: 495f611a-cf74-40d6-a54a-8b239cf15406 Path: /cl-1 Description: new description Version: 3 Created: Fri Feb 17 19:18:22 2023 Security Policy ID StorageBackings: DatastoreID: sharedVmfs-0 Type: DATASTORE Update the item name, description is not erased. ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.update -n "cl-1-new" 495f611a-cf74-40d6-a54a-8b239cf15406 ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.info 495f611a-cf74-40d6-a54a-8b239cf15406 Name: cl-1-new ID: 495f611a-cf74-40d6-a54a-8b239cf15406 Path: /cl-1-new Description: new description Version: 4 Created: Fri Feb 17 19:18:22 2023 Security Policy ID StorageBackings: DatastoreID: sharedVmfs-0 Type: DATASTORE Update the library description with empty string: ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.update -d "" 495f611a-cf74-40d6-a54a-8b239cf15406 ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.info 495f611a-cf74-40d6-a54a-8b239cf15406 Name: cl-1-new ID: 495f611a-cf74-40d6-a54a-8b239cf15406 Path: /cl-1-new Description: Version: 5 Created: Fri Feb 17 19:18:22 2023 Security Policy ID StorageBackings: DatastoreID: sharedVmfs-0 Type: DATASTORE
-
Update Library Item
➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.update -d "item-2" /cl-1/image-2 ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.info /cl-1/image-2 Name: image-2 ID: 0dc7df56-31e0-47dc-8b0a-6a33279ddccc Path: /cl-1/image-2 Description: item-2 Type: ovf Size: 2.0GB Created: Wed Feb 15 23:05:15 2023 Modified: Fri Feb 17 19:29:54 2023 Version: 3 Security Compliance: true Certificate Status: INTERNAL Update item name: govmomi git:(issue-3048) ✗ ~/go/bin/govc library.update -n "image-2-new" /cl-1/image-2 ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.info /cl-1/image-2-new Name: image-2-new ID: 0dc7df56-31e0-47dc-8b0a-6a33279ddccc Path: /cl-1/image-2-new Description: item-2 Type: ovf Size: 2.0GB Created: Wed Feb 15 23:05:15 2023 Modified: Fri Feb 17 19:31:44 2023 Version: 4 Security Compliance: true Certificate Status: INTERNAL Update item description to empty string ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.update -d "" /cl-1/image-2-new ➜ govmomi git:(issue-3048) ✗ ~/go/bin/govc library.info /cl-1/image-2-new Name: image-2-new ID: 0dc7df56-31e0-47dc-8b0a-6a33279ddccc Path: /cl-1/image-2-new Description: Type: ovf Size: 2.0GB Created: Wed Feb 15 23:05:15 2023 Modified: Fri Feb 17 19:32:56 2023 Version: 5 Security Compliance: true Certificate Status: INTERNAL
-
-
🐞 Fix
- [8f9e549] govc vm.clone failure when using 'cluster' option (#3208)
- [b22f730] govc datacenter.info VM count with multiple DCs
- [65814f0] Update some goreleaser deprecated fields (#3181)
- [b4eac19] check the error chain when validating if it's x509 error (#3174)
- [86cadf2] Fix the gorelease
- [1711a84] avoid modifying client transport outside of NewClient (#3161)
- [313aa85] share http.Transport with service clients (#3039)
- [f81f3b3] grep warnings during generating usage documentation
- [2d11115] support
binary
anddateTime
in JSON (#3127) - [c4ffe46] add esxcli.Fault and revert Error() string (#3072)
- [93cb079] byte, float and int (de) serialization (#3121)
- [8bc2caa] avoid govc -verbose flag panic if an UpdateSet is nil (#3088)
- [9ba1b85] include StoragePod Datastore children in ContainerView (#3094)
- [8b00a93] only limit the number of samples generated to maxSample when maxSample is greater than 0 and the number of samples to generate is greater than maxSample Closes: #3097 (#3097)
- [4ed0763] support govc ls -xml flag (#3053)
- [8554329] Pin the result limit of ssoadmin client to its MAX (#3004)
💡 Examples
💫 API Changes
- [a03f473] Fix errors w 8.0U2 GA update
- [515df5d] Update generated types to vSphere 8.0U2 GA
- [b7ceede] Prep to update types to vSphere 8.0U2 GA
- [ccd07a0] Update generated types to vSphere 8.0U1c GA
- [4c00586] Prep to update types to vSphere 8.0U1c GA
- [5431c33] Type/field comments for data structures; API versions
- [4b2de28] Add SDK support for VM data sets (#3050)
- [25865e5] set inventory path in SearchIndex.FindByInventoryPath (#3095)
- [38d0ac0] Add JSON transport for vim25 (#3062)
- [0938fba] Add ServerGuid to gen'd MoRef
- [e09a412] support find.NetworkList by ID (#2626)
- [e8fa981] support find.Network by cluster path
- [4e6d642] JSON Discriminators for vim25/types
- [9920086] Generate JSON tags
💫 govc
(CLI)
- [c4d851b] Add CLI support for VM data sets (#3050)
- [02f353d] Command to print device/backings model as tree
- [af7833b] Fix memory aliasing in for loop (gosec G601)
- [e17d884] add -file flag for cluster.module.rm
- [e34c721] Add CLI device protocol support for vm.network.add (#3167)
- [48bdfad] Add --help
- [28014f9] Add general usage message (#3054)
- [e5f3cd0] add detail error message for host.esxcli commands (#3073)
- [81733d0] add cluster.mv command (#2524)
- [daaaca0] Add support for CNS volume snapshots
- [477bf69] Support JSON protocol using environment variable (#3062)
- [b8007c4] dont check poweredOn for vm.console vmrc requests (#2127)
- [6b34770] add sso.idp.ldap.update command (#3057)
- [e5b2aa3] Add feature VM IOMMU enablement support (#3055)
- [f4c678a] Add checksum validation to govc import.ova (#1978)
- [e935b5a] Add feature to get and set default idp (#3023)
💫 vcsim
(Simulator)
- [35ec7c3] Add simulator support for VM data sets (#3050)
- [c77de71] Introduce separation btw new service instance & infra creation
- [2b5c457] add interactive debug github action stage
- [9b2ef98] use docker event for efficient monitoring
- [6f34f13] container backing respects changes via reconfigure
- [6248cbf] create underlay network for pNICs in container-backed hosts
- [6b7b0df] per-host OptionManager instances and differentiated roles
- [387dc6e] support container backing for hosts
- [fdb4d84] untangle container/VM to allow reuse of container logic for hosts
- [9d8380c] Fix RefreshDatastore to return a valid response (#3198)
- [47dd6e0] add PerformanceManager counter values
- [65b6c51] add lookup.EndpointURL tests
- [cd9446c] apply PCI UnitNumber offset of 7 for ethernet
- [1135605] set StandbyMode default to "none"
- [0a351a8] Add RUN.env flag to inject environment variables to container-backed VM
- [112777b] Fix VM ExtraConfig
- [e621790] make task lock handoff optional (#2351)
- [6c0ed53] async guest shutdown and standby
- [297c79b] add VirtualMachine.StandbyGuest support
- [7a04bd0] Fix FindByInventoryPath to handle root folder (#3119)
- [78a979c] Add CSV format support to QueryPerf API (#3103)
- [c62983f] add ssoadmin user and group management (#2852)
- [eb9c11c] add guest.net.ipConfig
📃 Documentation
- [e4a3688] Add README to vendored JSON pkg
🧹 Chore
- [2fab8d5] Update version.go for v0.31.0
- [c460f70] Dockerfile & steps for generating types
- [7e49056] add missing guest OS IDs
- [0ed91a2] bump embano1/wip
- [c600508] Err on json.Decode for invalid type/vals
- [2f5d7c6] fix WaitForUpdates bats test race
- [03718c0] remove sso bats test hacks
- [4aad418] upgrade to bats-core v1.9.0 release
- [d1af63f] fix jq query case
- [91f51cf] sync httptest/server race fix
- [80e6b73] add timeout to bats tests
- [3158766] adjust cert trust checks to support newer Go versions (#3001)
- [4153cba] Update CI to Go 1.20
- [5b3da2e] upgrade golangci-lint
- [825c73c] bats related fixes
- [1991de5] Remove JSON tag for "This" / ArrayOf "_value"
- [b594bf1] Move to main
- [e639aba] Exclude vim25/json from CodeStyle workflow
- [908aa06] Include LICENSE in vendored JSON pkg
- [5caa20a] JSON Encoding w Discriminator Support
- [a581fd0] Vendor Go 1.17.13 encoding/json
📖 Commits
- [2fab8d5] chore: Update version.go for v0.31.0
- [a03f473] api: Fix errors w 8.0U2 GA update
- [515df5d] api: Update generated types to vSphere 8.0U2 GA
- [b7ceede] api: Prep to update types to vSphere 8.0U2 GA
- [3fb5b82] Use Envoy sidecar for guest and datastore file transfer.
- [ccd07a0] api: Update generated types to vSphere 8.0U1c GA
- [4c00586] api: Prep to update types to vSphere 8.0U1c GA
- [5431c33] api: Type/field comments for data structures; API versions
- [c4d851b] govc: Add CLI support for VM data sets (#3050)
- [35ec7c3] vcsim: Add simulator support for VM data sets (#3050)
- [4b2de28] api: Add SDK support for VM data sets (#3050)
- [02f353d] govc: Command to print device/backings model as tree
- [8f9e549] fix: govc vm.clone failure when using 'cluster' option (#3208)
- [db07615] build(deps): bump goreleaser/goreleaser-action from 4 to 5
- [00407ce] build(deps): bump actions/checkout from 3 to 4
- [c77de71] vcsim: Introduce separation btw new service instance & infra creation
- [b22f730] fix: govc datacenter.info VM count with multiple DCs
- [af7833b] govc: Fix memory aliasing in for loop (gosec G601)
- [73b4535] build(deps): bump github.com/google/uuid from 1.3.0 to 1.3.1
- [e6bb6ce] govc/library: fix dropped error
- [e17d884] govc: add -file flag for cluster.module.rm
- [f636e96] Address review comments
- [2b5c457] vcsim: add interactive debug github action stage
- [9b2ef98] vcsim: use docker event for efficient monitoring
- [6f34f13] vcsim: container backing respects changes via reconfigure
- [6248cbf] vcsim: create underlay network for pNICs in container-backed hosts
- [6b7b0df] vcsim: per-host OptionManager instances and differentiated roles
- [387dc6e] vcsim: support container backing for hosts
- [fdb4d84] vcsim: untangle container/VM to allow reuse of container logic for hosts
- [40264da] Trim leading slash on soap path
- [9d8380c] vcsim: Fix RefreshDatastore to return a valid response (#3198)
- [47dd6e0] vcsim: add PerformanceManager counter values
- [c6a9ac8] Bypass lookup svc for STS and SSOadmin clients
- [ddfd7eb] remove bad spacing in new pull request template
- [65b6c51] vcsim: add lookup.EndpointURL tests
- [c460f70] chore: Dockerfile & steps for generating types
- [4cf0b76] Allow picking datastore upload URL scheme by env
- [319e472] build: quote golang version in release file to workaround issue in github action Close #3179 (#3179)
- [65814f0] fix: Update some goreleaser deprecated fields (#3181)
- [b4eac19] fix: check the error chain when validating if it's x509 error (#3174)
- [cd9446c] vcsim: apply PCI UnitNumber offset of 7 for ethernet
- [3322f61] Merge branch 'main' of github.com:vmware/govmomi into notable-user-otel-contrib
- [e34c721] govc: Add CLI device protocol support for vm.network.add (#3167)
- [eebdbef] add opentelemetry collector contrib as notable user
- [86cadf2] fix: Fix the gorelease
- [1711a84] fix: avoid modifying client transport outside of NewClient (#3161)
- [313aa85] fix: share http.Transport with service clients (#3039)
- [d648a21] add cnssyncdatastore API
- [5c7bf5f] Remove client request log from debug tracing (#3154)
- [1135605] vcsim: set StandbyMode default to "none"
- [48bdfad] govc: Add --help
- [f81f3b3] fix: grep warnings during generating usage documentation
- [28014f9] govc: Add general usage message (#3054)
- [0a351a8] vcsim: Add RUN.env flag to inject environment variables to container-backed VM
- [112777b] vcsim: Fix VM ExtraConfig
- [e621790] vcsim: make task lock handoff optional (#2351)
- [6c0ed53] vcsim: async guest shutdown and standby
- [7e49056] chore: add missing guest OS IDs
- [297c79b] vcsim: add VirtualMachine.StandbyGuest support
- [833cf28] build(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4
- [2d11115] fix: support
binary
anddateTime
in JSON (#3127) - [2731f2d] Rm SetIndent in json.NewEncoder / JSON file name
- [0ed91a2] chore: bump embano1/wip
- [c4ffe46] fix: add esxcli.Fault and revert Error() string (#3072)
- [174fb99] build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3
- [e5f3cd0] govc: add detail error message for host.esxcli commands (#3073)
- [c65a846] build(deps): bump chuhlomin/render-template from 1.6 to 1.7
- [93cb079] fix: byte, float and int (de) serialization (#3121)
- [7a04bd0] vcsim: Fix FindByInventoryPath to handle root folder (#3119)
- [81733d0] govc: add cluster.mv command (#2524)
- [685bd76] Add RUN.port.xx flag to publish ports on container backed VM
- [8bc2caa] fix: avoid govc -verbose flag panic if an UpdateSet is nil (#3088)
- [78a979c] vcsim: Add CSV format support to QueryPerf API (#3103)
- [9ba1b85] fix: include StoragePod Datastore children in ContainerView (#3094)
- [8b00a93] fix: only limit the number of samples generated to maxSample when maxSample is greater than 0 and the number of samples to generate is greater than maxSample Closes: #3097 (#3097)
- [25865e5] api: set inventory path in SearchIndex.FindByInventoryPath (#3095)
- [c600508] chore: Err on json.Decode for invalid type/vals
- [5a2fa4f] build(deps): bump nokogiri from 1.13.10 to 1.14.3 in /gen
- [4ed5b07] Make mounting DMI information optional with docker-backed vcsim
- [a1c8c4c] build(deps): bump peter-evans/create-pull-request from 4 to 5
- [8bcff40] build(deps): bump peter-evans/create-or-update-comment from 2 to 3
- [daaaca0] govc: Add support for CNS volume snapshots
- [bf0510b] build(deps): bump github.com/google/go-cmp from 0.5.7 to 0.5.9
- [477bf69] govc: Support JSON protocol using environment variable (#3062)
- [38d0ac0] api: Add JSON transport for vim25 (#3062)
- [4ed0763] fix: support govc ls -xml flag (#3053)
- [2f5d7c6] chore: fix WaitForUpdates bats test race
- [03718c0] chore: remove sso bats test hacks
- [4aad418] chore: upgrade to bats-core v1.9.0 release
- [d1af63f] chore: fix jq query case
- [91f51cf] chore: sync httptest/server race fix
- [80e6b73] chore: add timeout to bats tests
- [49f82b8] build(deps): bump actions/stale from 7 to 8
- [b8007c4] govc: dont check poweredOn for vm.console vmrc requests (#2127)
- [0938fba] api: Add ServerGuid to gen'd MoRef
- [71493ef] examples: add rest.Client.LoginByToken
- [3bf4694] examples: add session.Manager.LoginByToken (#3037)
- [c62983f] vcsim: add ssoadmin user and group management (#2852)
- [3158766] chore: adjust cert trust checks to support newer Go versions (#3001)
- [4153cba] chore: Update CI to Go 1.20
- [5b3da2e] chore: upgrade golangci-lint
- [b3a9e0c] build(deps): bump actions/setup-go from 3 to 4
- [6b34770] govc: add sso.idp.ldap.update command (#3057)
- [e5b2aa3] govc: Add feature VM IOMMU enablement support (#3055)
- [1ea4b00] build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8 in /hack/tools
- [4f9f126] Use string pointer for library/item description field.
- [e09a412] api: support find.NetworkList by ID (#2626)
- [e8fa981] api: support find.Network by cluster path
- [ea05845] lookup.EndpointURL should only save thumbprints for endpoints outside of vCenter
- [eb9c11c] vcsim: add guest.net.ipConfig
- [825c73c] chore: bats related fixes
- [f4c678a] govc: Add checksum validation to govc import.ova (#1978)
- [1991de5] chore: Remove JSON tag for "This" / ArrayOf "_value"
- [e935b5a] govc: Add feature to get and set default idp (#3023)
- [1970ec3] build(deps): bump actions/stale from 6 to 7
- [8554329] fix: Pin the result limit of ssoadmin client to its MAX (#3004)
- [b594bf1] chore: Move to main
- [4e6d642] api: JSON Discriminators for vim25/types
- [9920086] api: Generate JSON tags
- [e639aba] chore: Exclude vim25/json from CodeStyle workflow
- [e4a3688] docs: Add README to vendored JSON pkg
- [908aa06] chore: Include LICENSE in vendored JSON pkg
- [5caa20a] chore: JSON Encoding w Discriminator Support
- [dc1a57e] build(deps): bump goreleaser/goreleaser-action from 3 to 4
- [a581fd0] chore: Vendor Go 1.17.13 encoding/json
- [9bd958a] build(deps): bump nokogiri from 1.13.9 to 1.13.10 in /gen