From 3edb8c26b027092c9656ac103acd4786ab3458e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:35:44 +0000 Subject: [PATCH] Bump github.com/packethost/packngo from 0.1.0 to 0.31.0 Bumps [github.com/packethost/packngo](https://github.com/packethost/packngo) from 0.1.0 to 0.31.0. - [Release notes](https://github.com/packethost/packngo/releases) - [Changelog](https://github.com/equinixmetal-archive/packngo/blob/master/CHANGELOG.md) - [Commits](https://github.com/packethost/packngo/compare/v0.1.0...v0.31.0) --- updated-dependencies: - dependency-name: github.com/packethost/packngo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 25 ++++++++++--- .../packethost/packngo/metadata/doc.go | 6 ++++ .../packethost/packngo/metadata/metadata.go | 36 ++++++++++++------- vendor/modules.txt | 4 +-- 5 files changed, 53 insertions(+), 20 deletions(-) create mode 100644 vendor/github.com/packethost/packngo/metadata/doc.go diff --git a/go.mod b/go.mod index 881ea0e76c..1760747bba 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/diskfs/go-diskfs v1.4.0 - github.com/packethost/packngo v0.1.0 + github.com/packethost/packngo v0.31.0 github.com/sirupsen/logrus v1.9.3 github.com/vishvananda/netlink v0.0.0-20170808154308-f5a6f697a596 github.com/vmware/vmw-guestinfo v0.0.0-20220317130741-510905f0efa3 diff --git a/go.sum b/go.sum index 1f9c918be1..f568aa3bf9 100644 --- a/go.sum +++ b/go.sum @@ -3,13 +3,16 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/diskfs/go-diskfs v1.4.0 h1:MAybY6TPD+fmhY+a2qFhmdvMeIKvCqlgh4QIc1uCmBs= github.com/diskfs/go-diskfs v1.4.0/go.mod h1:G8cyy+ngM+3yKlqjweMmtqvE+TxsnIo1xumbJX1AeLg= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/elliotwutingfeng/asciiset v0.0.0-20230602022725-51bbb787efab h1:h1UgjJdAAhj+uPL68n7XASS6bU+07ZX1WJvVS2eyoeY= github.com/elliotwutingfeng/asciiset v0.0.0-20230602022725-51bbb787efab/go.mod h1:GLo/8fDswSAniFG+BFIaiSPcK610jyzgEhWYPQwuQdw= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/packethost/packngo v0.1.0 h1:G/5zumXb2fbPm5MAM3y8MmugE66Ehpio5qx0IhdhTPc= -github.com/packethost/packngo v0.1.0/go.mod h1:otzZQXgoO96RTzDB/Hycg0qZcXZsWJGJRSXbmEIJ+4M= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/packethost/packngo v0.31.0 h1:LLH90ardhULWbagBIc3I3nl2uU75io0a7AwY6hyi0S4= +github.com/packethost/packngo v0.31.0/go.mod h1:Io6VJqzkiqmIEQbpOjeIw9v8q9PfcTEq8TEY/tMQsfw= github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc= github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/xattr v0.4.9 h1:5883YPCtkSd8LFbs13nXplj9g9tlrwoJRjgpgMu1/fE= @@ -19,8 +22,13 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 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.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/vishvananda/netlink v0.0.0-20170808154308-f5a6f697a596 h1:K6pwCps8j1ylaB37G0r6hGajvbNsdm+0ITJ6L88r65w= @@ -29,12 +37,21 @@ github.com/vishvananda/netns v0.0.0-20170707011535-86bef332bfc3 h1:NcYCJC+LbOrfv github.com/vishvananda/netns v0.0.0-20170707011535-86bef332bfc3/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vmware/vmw-guestinfo v0.0.0-20220317130741-510905f0efa3 h1:v6jG/tdl4O07LNVp74Nt7/OyL+1JsIW1M2f/nSvQheY= github.com/vmware/vmw-guestinfo v0.0.0-20220317130741-510905f0efa3/go.mod h1:CSBTxrhePCm0cmXNKDGeu+6bOQzpaEklfCqEpn89JWk= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200420201142-3c4aac89819a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/djherbis/times.v1 v1.3.0 h1:uxMS4iMtH6Pwsxog094W0FYldiNnfY/xba00vq6C2+o= gopkg.in/djherbis/times.v1 v1.3.0/go.mod h1:AQlg6unIsrsCEdQYhTzERy542dz6SFdQFZFv6mUY0P8= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/github.com/packethost/packngo/metadata/doc.go b/vendor/github.com/packethost/packngo/metadata/doc.go new file mode 100644 index 0000000000..3acfffc06e --- /dev/null +++ b/vendor/github.com/packethost/packngo/metadata/doc.go @@ -0,0 +1,6 @@ +// Package metadata implements the Equinix Metal Metadata API available +// to Equinix Metal devices at https://metadata.platformequinix.com/metadata. +// +// For more information, see +// https://metal.equinix.com/developers/docs/servers/metadata/ +package metadata diff --git a/vendor/github.com/packethost/packngo/metadata/metadata.go b/vendor/github.com/packethost/packngo/metadata/metadata.go index ed9485f98d..3c98c01203 100644 --- a/vendor/github.com/packethost/packngo/metadata/metadata.go +++ b/vendor/github.com/packethost/packngo/metadata/metadata.go @@ -9,10 +9,14 @@ import ( "net/http" ) -const BaseURL = "https://metadata.packet.net" +const BaseURL = "https://metadata.platformequinix.com" func GetMetadata() (*CurrentDevice, error) { - res, err := http.Get(BaseURL + "/metadata") + return GetMetadataFromURL(BaseURL) +} + +func GetMetadataFromURL(baseURL string) (*CurrentDevice, error) { + res, err := http.Get(baseURL + "/metadata") if err != nil { return nil, err } @@ -40,7 +44,11 @@ func GetMetadata() (*CurrentDevice, error) { } func GetUserData() ([]byte, error) { - res, err := http.Get(BaseURL + "/userdata") + return GetUserDataFromURL(BaseURL) +} + +func GetUserDataFromURL(baseURL string) ([]byte, error) { + res, err := http.Get(baseURL + "/userdata") if err != nil { return nil, err } @@ -101,16 +109,18 @@ func (m BondingMode) String() string { } type CurrentDevice struct { - ID string `json:"id"` - Hostname string `json:"hostname"` - IQN string `json:"iqn"` - Plan string `json:"plan"` - Facility string `json:"facility"` - Tags []string `json:"tags"` - SSHKeys []string `json:"ssh_keys"` - OS OperatingSystem `json:"operating_system"` - Network NetworkInfo `json:"network"` - Volumes []VolumeInfo `json:"volume"` + ID string `json:"id"` + Hostname string `json:"hostname"` + IQN string `json:"iqn"` + Plan string `json:"plan"` + Metro string `json:"metro"` + Facility string `json:"facility"` + Tags []string `json:"tags"` + SSHKeys []string `json:"ssh_keys"` + OS OperatingSystem `json:"operating_system"` + Network NetworkInfo `json:"network"` + Volumes []VolumeInfo `json:"volumes"` + CustomData map[string]interface{} `json:"customdata"` // This is available, but is actually inaccurate, currently: // APIBaseURL string `json:"api_url"` diff --git a/vendor/modules.txt b/vendor/modules.txt index bf7155c1ba..26d036a42f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -17,8 +17,8 @@ github.com/elliotwutingfeng/asciiset # github.com/google/uuid v1.3.0 ## explicit github.com/google/uuid -# github.com/packethost/packngo v0.1.0 -## explicit +# github.com/packethost/packngo v0.31.0 +## explicit; go 1.16 github.com/packethost/packngo/metadata # github.com/pierrec/lz4/v4 v4.1.17 ## explicit; go 1.14