From 9c6da5c8e7d5d39791ae1a03566c61a4595f3636 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Mon, 30 Sep 2024 14:07:04 +0200 Subject: [PATCH] Pin and review. --- cmd/tableprinters/size.go | 10 ++++++---- docs/metalctl_machine_update.md | 6 +++--- docs/metalctl_network_update.md | 6 +++--- docs/metalctl_size_reservation_update.md | 6 +++--- go.mod | 2 +- go.sum | 4 ++-- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/cmd/tableprinters/size.go b/cmd/tableprinters/size.go index a7e948e..4a1932f 100644 --- a/cmd/tableprinters/size.go +++ b/cmd/tableprinters/size.go @@ -98,12 +98,12 @@ func (t *TablePrinter) SizeReservationTable(data []*models.V1SizeReservationResp func (t *TablePrinter) SizeReservationUsageTable(data []*models.V1SizeReservationUsageResponse, wide bool) ([]string, [][]string, error) { var ( - header = []string{"ID", "Size", "Project", "Partition", "Used/Amount", "Project Allocations"} + header = []string{"ID", "Size", "Project", "Partition", "Used/Amount"} rows [][]string ) if wide { - header = append(header, "Labels") + header = append(header, "Allocated", "Labels") } for _, d := range data { @@ -115,13 +115,15 @@ func (t *TablePrinter) SizeReservationUsageTable(data []*models.V1SizeReservatio pointer.SafeDeref(d.Projectid), pointer.SafeDeref(d.Partitionid), fmt.Sprintf("%d/%d", pointer.SafeDeref(d.Usedamount), pointer.SafeDeref(d.Amount)), - strconv.Itoa(int(pointer.SafeDeref(d.Projectallocations))), } if wide { labels := genericcli.MapToLabels(d.Labels) sort.Strings(labels) - row = append(row, strings.Join(labels, "\n")) + row = append(row, + strconv.Itoa(int(pointer.SafeDeref(d.Projectallocations))), + strings.Join(labels, "\n"), + ) } rows = append(rows, row) diff --git a/docs/metalctl_machine_update.md b/docs/metalctl_machine_update.md index fac0b15..752352c 100644 --- a/docs/metalctl_machine_update.md +++ b/docs/metalctl_machine_update.md @@ -3,7 +3,7 @@ updates the machine ``` -metalctl machine update [flags] +metalctl machine update [flags] ``` ### Options @@ -18,9 +18,9 @@ metalctl machine update [flags] $ metalctl machine describe machine-1 -o yaml > machine.yaml $ vi machine.yaml $ # either via stdin - $ cat machine.yaml | metalctl machine update -f - + $ cat machine.yaml | metalctl machine update -f - $ # or via file - $ metalctl machine update -f machine.yaml + $ metalctl machine update -f machine.yaml the file can also contain multiple documents and perform a bulk operation. diff --git a/docs/metalctl_network_update.md b/docs/metalctl_network_update.md index 0e74b92..13c04e2 100644 --- a/docs/metalctl_network_update.md +++ b/docs/metalctl_network_update.md @@ -3,7 +3,7 @@ updates the network ``` -metalctl network update [flags] +metalctl network update [flags] ``` ### Options @@ -20,9 +20,9 @@ metalctl network update [flags] $ metalctl network describe network-1 -o yaml > network.yaml $ vi network.yaml $ # either via stdin - $ cat network.yaml | metalctl network update -f - + $ cat network.yaml | metalctl network update -f - $ # or via file - $ metalctl network update -f network.yaml + $ metalctl network update -f network.yaml the file can also contain multiple documents and perform a bulk operation. diff --git a/docs/metalctl_size_reservation_update.md b/docs/metalctl_size_reservation_update.md index 2ffdf53..47e19a0 100644 --- a/docs/metalctl_size_reservation_update.md +++ b/docs/metalctl_size_reservation_update.md @@ -3,7 +3,7 @@ updates the reservation ``` -metalctl size reservation update [flags] +metalctl size reservation update [flags] ``` ### Options @@ -18,9 +18,9 @@ metalctl size reservation update [flags] $ metalctl reservation describe reservation-1 -o yaml > reservation.yaml $ vi reservation.yaml $ # either via stdin - $ cat reservation.yaml | metalctl reservation update -f - + $ cat reservation.yaml | metalctl reservation update -f - $ # or via file - $ metalctl reservation update -f reservation.yaml + $ metalctl reservation update -f reservation.yaml the file can also contain multiple documents and perform a bulk operation. diff --git a/go.mod b/go.mod index 28aef65..b421c62 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/go-openapi/strfmt v0.23.0 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 - github.com/metal-stack/metal-go v0.35.3-0.20240926084747-24263b1712fc + github.com/metal-stack/metal-go v0.36.0 github.com/metal-stack/metal-lib v0.18.3 github.com/metal-stack/updater v1.2.2 github.com/metal-stack/v v1.0.3 diff --git a/go.sum b/go.sum index 04826c7..e9634a3 100644 --- a/go.sum +++ b/go.sum @@ -244,8 +244,8 @@ github.com/mdlayher/sdnotify v1.0.0 h1:Ma9XeLVN/l0qpyx1tNeMSeTjCPH6NtuD6/N9XdTlQ github.com/mdlayher/sdnotify v1.0.0/go.mod h1:HQUmpM4XgYkhDLtd+Uad8ZFK1T9D5+pNxnXQjCeJlGE= github.com/mdlayher/socket v0.5.1 h1:VZaqt6RkGkt2OE9l3GcC6nZkqD3xKeQLyfleW/uBcos= github.com/mdlayher/socket v0.5.1/go.mod h1:TjPLHI1UgwEv5J1B5q0zTZq12A/6H7nKmtTanQE37IQ= -github.com/metal-stack/metal-go v0.35.3-0.20240926084747-24263b1712fc h1:QKGuvGFDsjuPp8bbbB7OFa0M8C9FCRnaHpMISLsDEY8= -github.com/metal-stack/metal-go v0.35.3-0.20240926084747-24263b1712fc/go.mod h1:3MJTYCS4YJz8D8oteTKhjpaAKNMMjMKYDrIy9awHGtQ= +github.com/metal-stack/metal-go v0.36.0 h1:U3J3rolrw/uU5J2V982UPoCm23U8/0oq/eq0oXiq81c= +github.com/metal-stack/metal-go v0.36.0/go.mod h1:3MJTYCS4YJz8D8oteTKhjpaAKNMMjMKYDrIy9awHGtQ= github.com/metal-stack/metal-lib v0.18.3 h1:bovFiJPB9SMvuGLqcXVWz6jFB8HrdzwnCX7TFlen4r0= github.com/metal-stack/metal-lib v0.18.3/go.mod h1:Ctyi6zaXFr2NVrQZLFsDLnFCzupKnYErTtgRFKAsnbw= github.com/metal-stack/security v0.8.1 h1:4zmVUxZvDWShVvVIxM3XhIv7pTmPe9DvACRIHW6YTsk=