From d5d2fec89d266b51817aea71d9532acc555924ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20K=C3=A4mmerling?= Date: Wed, 26 Aug 2020 15:19:12 +0200 Subject: [PATCH] Update hcloud-go to 1.22.0 and expose correct disk size for resized without disk server (#269) --- cli/server_describe.go | 2 +- cli/server_list.go | 3 ++- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cli/server_describe.go b/cli/server_describe.go index 7b47222c..1ecf4a1c 100644 --- a/cli/server_describe.go +++ b/cli/server_describe.go @@ -60,7 +60,7 @@ func serverDescribeText(cli *CLI, server *hcloud.Server) error { fmt.Printf(" Cores:\t%d\n", server.ServerType.Cores) fmt.Printf(" CPU Type:\t%s\n", server.ServerType.CPUType) fmt.Printf(" Memory:\t%v GB\n", server.ServerType.Memory) - fmt.Printf(" Disk:\t\t%d GB\n", server.ServerType.Disk) + fmt.Printf(" Disk:\t\t%d GB\n", server.PrimaryDiskSize) fmt.Printf(" Storage Type:\t%s\n", server.ServerType.StorageType) fmt.Printf("Public Net:\n") diff --git a/cli/server_list.go b/cli/server_list.go index 37023228..a276fde6 100644 --- a/cli/server_list.go +++ b/cli/server_list.go @@ -79,7 +79,8 @@ func runServerList(cli *CLI, cmd *cobra.Command, args []string) error { Delete: server.Protection.Delete, Rebuild: server.Protection.Rebuild, }, - Labels: server.Labels, + Labels: server.Labels, + PrimaryDiskSize: server.PrimaryDiskSize, } if server.Image != nil { serverImage := imageToSchema(*server.Image) diff --git a/go.mod b/go.mod index eaced28c..c0b9ec20 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ require ( github.com/cheggaaa/pb/v3 v3.0.5 github.com/dustin/go-humanize v1.0.0 github.com/fatih/structs v1.1.0 - github.com/hetznercloud/hcloud-go v1.21.1 + github.com/hetznercloud/hcloud-go v1.22.0 github.com/pelletier/go-toml v1.8.0 github.com/spf13/cobra v1.0.0 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 3858671e..c2d504e3 100644 --- a/go.sum +++ b/go.sum @@ -52,8 +52,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmg github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hetznercloud/hcloud-go v1.21.1 h1:LWNozxiZhKmeMqYbAS7KsAcPcxg47afCnTeLKmN+n7w= -github.com/hetznercloud/hcloud-go v1.21.1/go.mod h1:xng8lbDUg+xM1dgc0yGHX5EeqbwIq7UYlMWMTx3SQVg= +github.com/hetznercloud/hcloud-go v1.22.0 h1:CC0jwkaBzwP4ObFE0sdJBTvGh5DE9kB/tuDETnRfOik= +github.com/hetznercloud/hcloud-go v1.22.0/go.mod h1:xng8lbDUg+xM1dgc0yGHX5EeqbwIq7UYlMWMTx3SQVg= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=