Skip to content

Commit 26f73c4

Browse files
committed
Replace hashicorp/go-uuid import with gofrs/uuid
Replace import of hashicorp/go-uuid as its license is not incompatible with the license of the project. Instead use gofrs/uuid which is compatible. It uses an MIT license. Signed-off-by: Alexander Wels <awels@redhat.com>
1 parent 1d23291 commit 26f73c4

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module github.com/gophercloud/utils/v2
33
go 1.22
44

55
require (
6+
github.com/gofrs/uuid/v5 v5.2.0
67
github.com/gophercloud/gophercloud/v2 v2.0.0-rc.1
7-
github.com/hashicorp/go-uuid v1.0.3
88
github.com/mitchellh/go-homedir v1.1.0
99
golang.org/x/sys v0.20.0
1010
golang.org/x/text v0.15.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM=
2+
github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
13
github.com/gophercloud/gophercloud/v2 v2.0.0-rc.1 h1:B0J9VVGlNuMF/743KMVFScDB8M2Bd5N1KlsEZykSBlc=
24
github.com/gophercloud/gophercloud/v2 v2.0.0-rc.1/go.mod h1:cwPW9cbJmfBt1c7o/yzXuNjwonhWA+F9Zw8LNQzd3Zk=
3-
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
4-
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
55
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
66
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
77
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=

openstack/clientconfig/requests.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import (
1515
"github.com/gophercloud/utils/v2/gnocchi"
1616
"github.com/gophercloud/utils/v2/internal"
1717

18-
"github.com/hashicorp/go-uuid"
18+
"github.com/gofrs/uuid/v5"
19+
1920
yaml "gopkg.in/yaml.v3"
2021
)
2122

@@ -923,11 +924,11 @@ func NewServiceClient(ctx context.Context, service string, opts *ClientOpts) (*g
923924
case "load-balancer":
924925
return openstack.NewLoadBalancerV2(pClient, eo)
925926
case "messaging":
926-
clientID, err := uuid.GenerateUUID()
927+
clientID, err := uuid.NewV4()
927928
if err != nil {
928929
return nil, fmt.Errorf("failed to generate UUID: %w", err)
929930
}
930-
return openstack.NewMessagingV2(pClient, clientID, eo)
931+
return openstack.NewMessagingV2(pClient, clientID.String(), eo)
931932
case "network":
932933
return openstack.NewNetworkV2(pClient, eo)
933934
case "object-store":

0 commit comments

Comments
 (0)