Skip to content

Commit

Permalink
Fixes for size reservations. (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Jan 9, 2024
1 parent c8dd79b commit 230301f
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 141 deletions.
2 changes: 1 addition & 1 deletion cmd/size.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (c *sizeCmd) try() error {
}

func (c sizeCmd) listReverations() error {
resp, err := c.client.Size().ListSizeReservations(size.NewListSizeReservationsParams(), nil)
resp, err := c.client.Size().ListSizeReservations(size.NewListSizeReservationsParams().WithBody(emptyBody), nil)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/size_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func Test_SizeReservationsCmd_MultiResult(t *testing.T) {
},
mocks: &client.MetalMockFns{
Size: func(mock *mock.Mock) {
mock.On("ListSizeReservations", testcommon.MatchIgnoreContext(t, size.NewListSizeReservationsParams()), nil).Return(&size.ListSizeReservationsOK{Payload: reservations}, nil)
mock.On("ListSizeReservations", testcommon.MatchIgnoreContext(t, size.NewListSizeReservationsParams().WithBody(emptyBody)), nil).Return(&size.ListSizeReservationsOK{Payload: reservations}, nil)
},
},
want: reservations,
Expand Down
1 change: 0 additions & 1 deletion docs/metalctl_size_reservations.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,5 @@ metalctl size reservations [flags]
### SEE ALSO

* [metalctl size](metalctl_size.md) - manage size entities
* [metalctl size reservations check](metalctl_size_reservations_check.md) - check if there are size reservations that are ineffective, e.g. because a project was deleted
* [metalctl size reservations list](metalctl_size_reservations_list.md) - list size reservations

46 changes: 0 additions & 46 deletions docs/metalctl_size_reservations_check.md

This file was deleted.

39 changes: 18 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/fatih/color v1.16.0
github.com/go-openapi/runtime v0.26.2
github.com/go-openapi/strfmt v0.21.9
github.com/go-openapi/strfmt v0.22.0
github.com/google/go-cmp v0.6.0
github.com/metal-stack/metal-go v0.26.0
github.com/metal-stack/metal-lib v0.14.1
github.com/metal-stack/metal-go v0.26.1
github.com/metal-stack/metal-lib v0.14.2
github.com/metal-stack/updater v1.2.1
github.com/metal-stack/v v1.0.3
github.com/olekukonko/tablewriter v0.0.6-0.20230925090304-df64c4bbad77
Expand Down Expand Up @@ -58,21 +58,21 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e // indirect
github.com/emicklei/go-restful-openapi/v2 v2.9.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.1 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.5.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.1 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/errors v0.20.4 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/loads v0.21.2 // indirect
github.com/go-openapi/spec v0.20.11 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-openapi/validate v0.22.3 // indirect
github.com/go-openapi/analysis v0.22.0 // indirect
github.com/go-openapi/errors v0.21.0 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/loads v0.21.5 // indirect
github.com/go-openapi/spec v0.20.13 // indirect
github.com/go-openapi/swag v0.22.7 // indirect
github.com/go-openapi/validate v0.22.6 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/goccy/go-yaml v1.11.2 // indirect
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 // indirect
Expand All @@ -99,15 +99,14 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/josharian/native v1.1.1-0.20230202152459-5c7d0dd6ab86 // indirect
github.com/jsimonetti/rtnetlink v1.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/jszwec/csvutil v1.9.0 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/kortschak/wol v0.0.0-20200729010619-da482cc4850a // indirect
github.com/lestrrat-go/blackmagic v1.0.2 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc v1.0.4 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx/v2 v2.0.18 // indirect
github.com/lestrrat-go/jwx/v2 v2.0.19 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
Expand All @@ -124,8 +123,6 @@ require (
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
Expand Down Expand Up @@ -163,14 +160,14 @@ require (
go.uber.org/zap v1.26.0 // indirect
go4.org/mem v0.0.0-20220726221520-4f986261bf13 // indirect
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.1 // indirect
Expand Down
Loading

0 comments on commit 230301f

Please sign in to comment.