diff --git a/go.mod b/go.mod index 5e0befc8..a269659c 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/onsi/gomega v1.36.2 github.com/packer-community/winrmcp v0.0.0-20221126162354-6e900dd2c68f github.com/pkg/errors v0.9.1 - github.com/vmware/govmomi v0.47.1 + github.com/vmware/govmomi v0.48.0 golang.org/x/sys v0.29.0 ) @@ -30,7 +30,7 @@ require ( github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20250121033306-997b0b79cac0 // indirect + github.com/google/pprof v0.0.0-20250128161936-077ca0a936bf // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect diff --git a/go.sum b/go.sum index 85eff02e..f2e5aaad 100644 --- a/go.sum +++ b/go.sum @@ -47,8 +47,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20250121033306-997b0b79cac0 h1:EinjE47mmVVsxcjIwVKQWNY+3P+5R2BhkbULjhEDThc= -github.com/google/pprof v0.0.0-20250121033306-997b0b79cac0/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250128161936-077ca0a936bf h1:BvBLUD2hkvLI3dJTJMiopAq8/wp43AAZKTP7qdpptbU= +github.com/google/pprof v0.0.0-20250128161936-077ca0a936bf/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -123,8 +123,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde h1:AMNpJRc7P+GTwVbl8DkK2I9I8BBUzNiHuH/tlxrpan0= github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde/go.mod h1:MvrEmduDUz4ST5pGZ7CABCnOU5f3ZiOAZzT6b1A6nX8= -github.com/vmware/govmomi v0.47.1 h1:6a2iNaqSS2/AFfvI8UMe0l787/TBKkK0KK9jCqCyYCE= -github.com/vmware/govmomi v0.47.1/go.mod h1:bYwUHpGpisE4AOlDl5eph90T+cjJMIcKx/kaa5v5rQM= +github.com/vmware/govmomi v0.48.0 h1:CP5bCvkDNGkmn29UlcJKTWMLwDg3iusP8anrZnedWrg= +github.com/vmware/govmomi v0.48.0/go.mod h1:bYwUHpGpisE4AOlDl5eph90T+cjJMIcKx/kaa5v5rQM= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= diff --git a/vendor/github.com/vmware/govmomi/.goreleaser.yml b/vendor/github.com/vmware/govmomi/.goreleaser.yml index e1cb5289..a359fc97 100644 --- a/vendor/github.com/vmware/govmomi/.goreleaser.yml +++ b/vendor/github.com/vmware/govmomi/.goreleaser.yml @@ -92,49 +92,6 @@ changelog: - Merge pull request - Merge branch -# upload disabled since it is maintained in homebrew-core -brews: - - name: govc - ids: - - govcbuild - repository: - owner: govmomi - name: homebrew-tap - # TODO: create token in specified tap repo, add as secret to govmomi repo and reference in release workflow - # token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" - # enable once we do fully automated releases - skip_upload: true - commit_author: - name: Alfred the Narwhal - email: cna-alfred@vmware.com - directory: Formula - homepage: "https://github.com/vmware/govmomi/blob/main/govc/README.md" - description: "govc is a vSphere CLI built on top of govmomi." - test: | - system "#{bin}/govc version" - install: | - bin.install "govc" - - name: vcsim - ids: - - vcsimbuild - repository: - owner: govmomi - name: homebrew-tap - # TODO: create token in specified tap repo, add as secret to govmomi repo and reference in release workflow - # token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" - # enable once we do fully automated releases - skip_upload: true - commit_author: - name: Alfred the Narwhal - email: cna-alfred@vmware.com - directory: Formula - homepage: "https://github.com/vmware/govmomi/blob/main/vcsim/README.md" - description: "vcsim is a vSphere API simulator built on top of govmomi." - test: | - system "#{bin}/vcsim -h" - install: | - bin.install "vcsim" - dockers: - image_templates: - "vmware/govc:{{ .Tag }}" diff --git a/vendor/github.com/vmware/govmomi/cns/types/types.go b/vendor/github.com/vmware/govmomi/cns/types/types.go index c85298ee..3b5ce9c0 100644 --- a/vendor/github.com/vmware/govmomi/cns/types/types.go +++ b/vendor/github.com/vmware/govmomi/cns/types/types.go @@ -294,6 +294,7 @@ type CnsContainerCluster struct { VSphereUser string `xml:"vSphereUser" json:"vSphereUser"` ClusterFlavor string `xml:"clusterFlavor,omitempty" json:"clusterFlavor"` ClusterDistribution string `xml:"clusterDistribution,omitempty" json:"clusterDistribution"` + Delete bool `xml:"delete,omitempty" json:"delete"` } func init() { diff --git a/vendor/github.com/vmware/govmomi/internal/version/version.go b/vendor/github.com/vmware/govmomi/internal/version/version.go index 24d1597b..121948f4 100644 --- a/vendor/github.com/vmware/govmomi/internal/version/version.go +++ b/vendor/github.com/vmware/govmomi/internal/version/version.go @@ -21,5 +21,5 @@ const ( ClientName = "govmomi" // ClientVersion is the version of this SDK - ClientVersion = "0.47.1" + ClientVersion = "0.48.0" ) diff --git a/vendor/github.com/vmware/govmomi/session/cache/session.go b/vendor/github.com/vmware/govmomi/session/cache/session.go index 0144afe7..33273c69 100644 --- a/vendor/github.com/vmware/govmomi/session/cache/session.go +++ b/vendor/github.com/vmware/govmomi/session/cache/session.go @@ -18,7 +18,7 @@ package cache import ( "context" - "crypto/sha1" + "crypto/sha256" "encoding/json" "fmt" "net/url" @@ -105,7 +105,7 @@ func (s *Session) key(path string) string { // Key session file off of full URI and insecure setting. // Hash key to get a predictable, canonical format. key := fmt.Sprintf("%s#insecure=%t", p.String(), s.Insecure) - return fmt.Sprintf("%040x", sha1.Sum([]byte(key))) + return fmt.Sprintf("%064x", sha256.Sum256([]byte(key))) } func (s *Session) file(p string) string { diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/registry.go b/vendor/github.com/vmware/govmomi/vim25/mo/registry.go index deacf508..ed5b5e35 100644 --- a/vendor/github.com/vmware/govmomi/vim25/mo/registry.go +++ b/vendor/github.com/vmware/govmomi/vim25/mo/registry.go @@ -1,21 +1,27 @@ -/* -Copyright (c) 2014 VMware, Inc. All Rights Reserved. +// © Broadcom. All Rights Reserved. +// The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. +// SPDX-License-Identifier: Apache-2.0 -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +package mo - http://www.apache.org/licenses/LICENSE-2.0 +import ( + "reflect" -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + "github.com/vmware/govmomi/vim25/types" +) -package mo +var t = map[string]reflect.Type{} -import "reflect" +// TODO: 9.0 mo below, not included in the generate mo/mo.go, since the generator still uses older rbvmomi vmodl.db -var t = map[string]reflect.Type{} +type DirectPathProfileManager struct { + Self types.ManagedObjectReference `json:"self"` +} + +func (m DirectPathProfileManager) Reference() types.ManagedObjectReference { + return m.Self +} + +func init() { + t["DirectPathProfileManager"] = reflect.TypeOf((*DirectPathProfileManager)(nil)).Elem() +} diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go b/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go index 66a8a978..51b4c8c3 100644 --- a/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go +++ b/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go @@ -1,18 +1,6 @@ -/* -Copyright (c) 2014-2024 VMware, Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// © Broadcom. All Rights Reserved. +// The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. +// SPDX-License-Identifier: Apache-2.0 package mo @@ -36,6 +24,11 @@ func ignoreMissingProperty(ref types.ManagedObjectReference, p types.MissingProp // Seen with vApp child VM return true } + case "ResourcePool": + switch p.Path { + case "resourceConfigSpecDetailed": + return true + } } return false diff --git a/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go b/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go index cfe5e0af..3068da1c 100644 --- a/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go +++ b/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go @@ -1,18 +1,6 @@ -/* -Copyright (c) 2014-2024 VMware, Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// © Broadcom. All Rights Reserved. +// The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. +// SPDX-License-Identifier: Apache-2.0 package mo @@ -192,8 +180,10 @@ var nilValue reflect.Value func assignValue(val reflect.Value, fi []int, pv reflect.Value, field ...string) { // Indexed property path can only use base types if val.Kind() == reflect.Interface { - base := baseType(val.Type()) - val.Set(reflect.New(base)) + if val.IsNil() { + base := baseType(val.Type()) + val.Set(reflect.New(base)) + } val = val.Elem() } diff --git a/vendor/github.com/vmware/govmomi/vim25/soap/client.go b/vendor/github.com/vmware/govmomi/vim25/soap/client.go index 7b4b26ab..b7ff99f5 100644 --- a/vendor/github.com/vmware/govmomi/vim25/soap/client.go +++ b/vendor/github.com/vmware/govmomi/vim25/soap/client.go @@ -214,9 +214,8 @@ func (c *Client) NewServiceClient(path string, namespace string) *Client { return c.newServiceClientWithTransport(path, namespace, c.t) } -// SessionCookie returns a SessionCookie with value of the vmware_soap_session http.Cookie. -func (c *Client) SessionCookie() *HeaderElement { - for _, cookie := range c.Jar.Cookies(c.URL()) { +func sessionCookie(jar http.CookieJar, u *url.URL) *HeaderElement { + for _, cookie := range jar.Cookies(u) { if cookie.Name == SessionCookieName { return &HeaderElement{Value: cookie.Value} } @@ -224,6 +223,22 @@ func (c *Client) SessionCookie() *HeaderElement { return nil } +// SessionCookie returns a SessionCookie with value of the vmware_soap_session http.Cookie. +func (c *Client) SessionCookie() *HeaderElement { + u := c.URL() + + if cookie := sessionCookie(c.Jar, u); cookie != nil { + return cookie + } + + // Default "/sdk" Path would match above, + // but saw a case of Path == "sdk", where above returns nil. + // The jar entry Path is normally "/", so fallback to that. + u.Path = "/" + + return sessionCookie(c.Jar, u) +} + func (c *Client) newServiceClientWithTransport(path string, namespace string, t *http.Transport) *Client { vc := c.URL() u, err := url.Parse(path) diff --git a/vendor/modules.txt b/vendor/modules.txt index ac599834..a952219f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -60,7 +60,7 @@ github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value -# github.com/google/pprof v0.0.0-20250121033306-997b0b79cac0 +# github.com/google/pprof v0.0.0-20250128161936-077ca0a936bf ## explicit; go 1.22 github.com/google/pprof/profile # github.com/google/subcommands v1.2.0 @@ -199,7 +199,7 @@ github.com/pkg/errors # github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde ## explicit github.com/tidwall/transform -# github.com/vmware/govmomi v0.47.1 +# github.com/vmware/govmomi v0.48.0 ## explicit; go 1.21 github.com/vmware/govmomi github.com/vmware/govmomi/cli