diff --git a/go.mod b/go.mod index fbd4d56..10aaa0a 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.22 require ( github.com/alecthomas/kong v0.9.0 - github.com/gophercloud/gophercloud/v2 v2.0.0 - github.com/gophercloud/utils/v2 v2.0.0-20240705071316-780b64d153e3 + github.com/gophercloud/gophercloud/v2 v2.1.0 + github.com/gophercloud/utils/v2 v2.0.0-20240725072607-4241c98875fa github.com/olekukonko/tablewriter v0.0.5 - github.com/sapcc/go-bits v0.0.0-20240709125621-b1e90ef040ad + github.com/sapcc/go-bits v0.0.0-20240801093859-8ef04d19f38d ) require ( diff --git a/go.sum b/go.sum index d824195..e3adba3 100644 --- a/go.sum +++ b/go.sum @@ -6,10 +6,10 @@ github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM= github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= -github.com/gophercloud/gophercloud/v2 v2.0.0 h1:iH0x0Ji79a/ULzmq95fvOBAyie7+M+wUAEu+JrRMsCk= -github.com/gophercloud/gophercloud/v2 v2.0.0/go.mod h1:ZKbcGNjxFTSaP5wlvtLDdsppllD/UGGvXBPqcjeqA8Y= -github.com/gophercloud/utils/v2 v2.0.0-20240705071316-780b64d153e3 h1:Jakaq9ALfVGOGC8w0eTS2FMa+yG8bMbM1lDhkFpEDXA= -github.com/gophercloud/utils/v2 v2.0.0-20240705071316-780b64d153e3/go.mod h1:SlglU6S3SCTU9qjapk7XjPufH/VhHXi+nKl8fuoLUoc= +github.com/gophercloud/gophercloud/v2 v2.1.0 h1:91p6c+uMckXyx39nSIYjDirDBnPVFQq0q1njLNPX+NY= +github.com/gophercloud/gophercloud/v2 v2.1.0/go.mod h1:f2hMRC7Kakbv5vM7wSGHrIPZh6JZR60GVHryJlF/K44= +github.com/gophercloud/utils/v2 v2.0.0-20240725072607-4241c98875fa h1:CSwTIHhHPn+Vnw3NCjH0u2vKJCAjkt434QkO0LLqR/E= +github.com/gophercloud/utils/v2 v2.0.0-20240725072607-4241c98875fa/go.mod h1:D1BEunNi0AHvB8TReOhT9fLhnwqzwBZ51SBfq2tLNs8= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= @@ -18,8 +18,8 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/sapcc/go-bits v0.0.0-20240709125621-b1e90ef040ad h1:e0kDKCEhohs+oKwYRRAibCJdqd2DvLwWrK17yELxUpY= -github.com/sapcc/go-bits v0.0.0-20240709125621-b1e90ef040ad/go.mod h1:d9JN0Gm8lF5jUMQeH/3MS5iNhs6/AlR/wVQ8vxRAGmo= +github.com/sapcc/go-bits v0.0.0-20240801093859-8ef04d19f38d h1:J6hg859uZMKn3aEQhEZBdUMXvbKIl3I7t7kNM4qeOps= +github.com/sapcc/go-bits v0.0.0-20240801093859-8ef04d19f38d/go.mod h1:GDqhmlHFdWGzbJlpNinE2f21GOvOKe5tt2N1rOix4I0= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= diff --git a/vendor/github.com/gophercloud/gophercloud/v2/CHANGELOG.md b/vendor/github.com/gophercloud/gophercloud/v2/CHANGELOG.md index 1d7dfbc..bae5109 100644 --- a/vendor/github.com/gophercloud/gophercloud/v2/CHANGELOG.md +++ b/vendor/github.com/gophercloud/gophercloud/v2/CHANGELOG.md @@ -1,3 +1,14 @@ +## v2.1.0 (2024-07-24) + +* [GH-3078](https://github.com/gophercloud/gophercloud/pull/3078) [networking]: add BGP VPNs support +* [GH-3086](https://github.com/gophercloud/gophercloud/pull/3086) build(deps): bump golang.org/x/crypto from 0.24.0 to 0.25.0 +* [GH-3090](https://github.com/gophercloud/gophercloud/pull/3090) Adding support for field dns_publish_fixed_ip in a subnet +* [GH-3092](https://github.com/gophercloud/gophercloud/pull/3092) [neutron]: introduce Stateful argument for the security groups +* [GH-3094](https://github.com/gophercloud/gophercloud/pull/3094) [neutron]: introduce Description argument for the portforwarding +* [GH-3106](https://github.com/gophercloud/gophercloud/pull/3106) clouds: Parse trust_id from clouds.yaml +* [GH-3131](https://github.com/gophercloud/gophercloud/pull/3131) Align ServiceFail provisioning state value with Ironic +* [GH-3136](https://github.com/gophercloud/gophercloud/pull/3136) Added node.Retired + ## v2.0.0 (2024-05-27) MAIN BREAKING CHANGES: diff --git a/vendor/github.com/gophercloud/gophercloud/v2/provider_client.go b/vendor/github.com/gophercloud/gophercloud/v2/provider_client.go index f8c4928..a4a8dce 100644 --- a/vendor/github.com/gophercloud/gophercloud/v2/provider_client.go +++ b/vendor/github.com/gophercloud/gophercloud/v2/provider_client.go @@ -13,7 +13,7 @@ import ( // DefaultUserAgent is the default User-Agent string set in the request header. const ( - DefaultUserAgent = "gophercloud/v2.0.0" + DefaultUserAgent = "gophercloud/v2.1.0" DefaultMaxBackoffRetries = 60 ) diff --git a/vendor/github.com/sapcc/go-bits/httpext/server.go b/vendor/github.com/sapcc/go-bits/httpext/server.go index 379582a..c9e9903 100644 --- a/vendor/github.com/sapcc/go-bits/httpext/server.go +++ b/vendor/github.com/sapcc/go-bits/httpext/server.go @@ -72,7 +72,18 @@ func ContextWithSIGINT(ctx context.Context, delay time.Duration) context.Context func ListenAndServeContext(ctx context.Context, addr string, handler http.Handler) error { logg.Info("Listening on %s...", addr) server := &http.Server{Addr: addr, Handler: handler} + return listenAndServeContext(ctx, server, func() error { return server.ListenAndServe() }) +} + +// ListenAndServeTLSContext is a wrapper around http.ListenAndServeTLS() that additionally +// shuts down the HTTP server gracefully when the context expires, or if an error occurs. +func ListenAndServeTLSContext(ctx context.Context, addr, certFile, keyFile string, handler http.Handler) error { + logg.Info("Listening on %s...", addr) + server := &http.Server{Addr: addr, Handler: handler} + return listenAndServeContext(ctx, server, func() error { return server.ListenAndServeTLS(certFile, keyFile) }) +} +func listenAndServeContext(ctx context.Context, server *http.Server, listenAndServe func() error) error { // waitForServerShutdown channel serves two purposes: // 1. It is used to block until server.Shutdown() returns to prevent // program from exiting prematurely. This is because when Shutdown is @@ -95,13 +106,13 @@ func ListenAndServeContext(ctx context.Context, addr string, handler http.Handle waitForServerShutdown <- err }() - listenAndServeErr := server.ListenAndServe() - if listenAndServeErr != http.ErrServerClosed { + listenAndServeErr := listenAndServe() + if listenAndServeErr != http.ErrServerClosed { //nolint:errorlint // errorlint usually understands that this error is returned directly from ListenAndServe(), but the indirection confuses it shutdownServer <- struct{}{} } shutdownErr := <-waitForServerShutdown - if listenAndServeErr == http.ErrServerClosed { + if listenAndServeErr == http.ErrServerClosed { //nolint:errorlint // same as above return addPrefix(shutdownErr, "ListenAndServeContext: could not shutdown HTTP server") } diff --git a/vendor/modules.txt b/vendor/modules.txt index 0d092fa..ae766ef 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -4,7 +4,7 @@ github.com/alecthomas/kong # github.com/gofrs/uuid/v5 v5.2.0 ## explicit; go 1.19 github.com/gofrs/uuid/v5 -# github.com/gophercloud/gophercloud/v2 v2.0.0 +# github.com/gophercloud/gophercloud/v2 v2.1.0 ## explicit; go 1.22 github.com/gophercloud/gophercloud/v2 github.com/gophercloud/gophercloud/v2/openstack @@ -16,7 +16,7 @@ github.com/gophercloud/gophercloud/v2/openstack/identity/v3/roles github.com/gophercloud/gophercloud/v2/openstack/identity/v3/tokens github.com/gophercloud/gophercloud/v2/openstack/utils github.com/gophercloud/gophercloud/v2/pagination -# github.com/gophercloud/utils/v2 v2.0.0-20240705071316-780b64d153e3 +# github.com/gophercloud/utils/v2 v2.0.0-20240725072607-4241c98875fa ## explicit; go 1.22 github.com/gophercloud/utils/v2/client github.com/gophercloud/utils/v2/env @@ -32,7 +32,7 @@ github.com/mitchellh/go-homedir # github.com/olekukonko/tablewriter v0.0.5 ## explicit; go 1.12 github.com/olekukonko/tablewriter -# github.com/sapcc/go-bits v0.0.0-20240709125621-b1e90ef040ad +# github.com/sapcc/go-bits v0.0.0-20240801093859-8ef04d19f38d ## explicit; go 1.22 github.com/sapcc/go-bits/httpext github.com/sapcc/go-bits/logg