From c03592729d9a1c38a6cd080954045ca6f36b37b3 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 9 Nov 2023 10:21:12 -0500 Subject: [PATCH] chore(deps): bump `github.com/vmware/govmomi` from 0.29.0 to 0.33.1 Bumps [github.com/vmware/govmomi](https://github.com/vmware/govmomi) from 0.29.0 to 0.33.1. - [Release notes](https://github.com/vmware/govmomi/releases) - [Changelog](https://github.com/vmware/govmomi/blob/main/CHANGELOG.md) - [Commits](vmware/govmomi@v0.32.0...v0.33.1) Address changes needed in `vm.go` and `library.go` for the content library items and tested. Signed-off-by: Ryan Johnson --- .github/dependabot.yml | 2 +- builder/vsphere/driver/library.go | 2 +- builder/vsphere/driver/vm.go | 2 +- go.mod | 4 ++-- go.sum | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 108edd0d..90af6262 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,4 +9,4 @@ updates: interval: "daily" allow: - dependency-name: "github.com/hashicorp/packer-plugin-sdk" - + - dependency-name: "github.com/vmware/govmomi" diff --git a/builder/vsphere/driver/library.go b/builder/vsphere/driver/library.go index 4b9d7b9e..74c900fc 100644 --- a/builder/vsphere/driver/library.go +++ b/builder/vsphere/driver/library.go @@ -95,7 +95,7 @@ func (d *VCenterDriver) UpdateContentLibraryItem(item *library.Item, name string item.Patch(&library.Item{ ID: item.ID, Name: name, - Description: description, + Description: &description, }) return lm.UpdateLibraryItem(d.ctx, item) } diff --git a/builder/vsphere/driver/vm.go b/builder/vsphere/driver/vm.go index c3de0480..bd219b23 100644 --- a/builder/vsphere/driver/vm.go +++ b/builder/vsphere/driver/vm.go @@ -851,7 +851,7 @@ func (vm *VirtualMachineDriver) ImportOvfToContentLibrary(ovf vcenter.OVF) error if err == nil { // Updates existing library item ovf.Target.LibraryItemID = item.ID - if ovf.Spec.Description != item.Description { + if item.Description != nil && ovf.Spec.Description != *item.Description { err = vm.driver.UpdateContentLibraryItem(item, ovf.Spec.Name, ovf.Spec.Description) if err != nil { log.Printf("cannot update content library: %v", err) diff --git a/go.mod b/go.mod index 586a5c13..e3f5a867 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,13 @@ module github.com/hashicorp/packer-plugin-vsphere go 1.19 require ( - github.com/google/go-cmp v0.5.9 + github.com/google/go-cmp v0.6.0 github.com/hashicorp/hcl/v2 v2.16.2 github.com/hashicorp/packer-plugin-sdk v0.5.1 github.com/pkg/errors v0.9.1 github.com/vmware-tanzu/image-registry-operator-api v0.0.0-20230523235530-62ec5758f097 github.com/vmware-tanzu/vm-operator/api v0.0.0-20230424164826-7ee71aebc7b1 - github.com/vmware/govmomi v0.29.0 + github.com/vmware/govmomi v0.33.1 github.com/zclconf/go-cty v1.12.1 golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 gopkg.in/yaml.v2 v2.4.0 diff --git a/go.sum b/go.sum index 561bfa63..947a88b0 100644 --- a/go.sum +++ b/go.sum @@ -245,8 +245,8 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -574,8 +574,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0= github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ= @@ -589,8 +589,8 @@ github.com/vmware-tanzu/image-registry-operator-api v0.0.0-20230523235530-62ec57 github.com/vmware-tanzu/image-registry-operator-api v0.0.0-20230523235530-62ec5758f097/go.mod h1:S0HMBgdo3S/0a5hwq+Ya4XZI2aEDtGkSGeojU1cINOg= github.com/vmware-tanzu/vm-operator/api v0.0.0-20230424164826-7ee71aebc7b1 h1:krW4K3Vj8DkVqLMUOlW1OMLr1BY9Lg+PLZ7mAzlJz/A= github.com/vmware-tanzu/vm-operator/api v0.0.0-20230424164826-7ee71aebc7b1/go.mod h1:vauVboD3sQxP+pb28TnI9wfrj+0nH2zSEc9Q7AzWJ54= -github.com/vmware/govmomi v0.29.0 h1:SHJQ7DUc4fltFZv16znJNGHR1/XhiDK5iKxm2OqwkuU= -github.com/vmware/govmomi v0.29.0/go.mod h1:F7adsVewLNHsW/IIm7ziFURaXDaHEwcc+ym4r3INMdY= +github.com/vmware/govmomi v0.33.1 h1:qS2VpEBd/WLbzLO5McI6h5o5zaKsrezUxRY5r9jkW8A= +github.com/vmware/govmomi v0.33.1/go.mod h1:QuzWGiEMA/FYlu5JXKjytiORQoxv2hTHdS2lWnIqKMM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=