From 94bd6e5a14c5f44a5a7cbe98b5ec6b3802e98fb1 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Fri, 3 Jul 2026 10:59:01 +0200 Subject: [PATCH] Adopt to labels update strategie --- cmd/api/v2/ip.go | 6 +++--- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/api/v2/ip.go b/cmd/api/v2/ip.go index 0f89a05..283af54 100644 --- a/cmd/api/v2/ip.go +++ b/cmd/api/v2/ip.go @@ -121,7 +121,7 @@ func (c *ip) updateFromCLI(args []string) (*apiv2.IPServiceUpdateRequest, error) req.Type = pointer.PointerOrNil(ipStaticToType(viper.GetBool("static"))) } if viper.IsSet("remove-labels") || viper.IsSet("labels") { - updates := &apiv2.UpdateLabelsIndividually{} + updates := &apiv2.LabelsPatch{} if viper.IsSet("remove-labels") { updates.Remove = viper.GetStringSlice("remove-labels") @@ -136,8 +136,8 @@ func (c *ip) updateFromCLI(args []string) (*apiv2.IPServiceUpdateRequest, error) } req.Labels = &apiv2.UpdateLabels{ - Strategy: &apiv2.UpdateLabels_Individual{ - Individual: updates, + Strategy: &apiv2.UpdateLabels_Patch{ + Patch: updates, }, } } diff --git a/go.mod b/go.mod index 229d67d..61b8dd4 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/fatih/color v1.19.0 github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 - github.com/metal-stack/api v0.2.2 + github.com/metal-stack/api v0.2.3 github.com/metal-stack/metal-lib v0.25.2 github.com/metal-stack/v v1.0.3 github.com/spf13/afero v1.15.0 diff --git a/go.sum b/go.sum index 7a487ae..b3f02bf 100644 --- a/go.sum +++ b/go.sum @@ -71,8 +71,8 @@ github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4= github.com/mattn/go-runewidth v0.0.24 h1:cpokDiIn0MGnhdHwuWnJBITySJ20QyNGnY2kR/ay2DU= github.com/mattn/go-runewidth v0.0.24/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= -github.com/metal-stack/api v0.2.2 h1:z6IHXtvLFP5Fa2jYw4ajC0SZWD8nrhj/o8yTrTpjaaw= -github.com/metal-stack/api v0.2.2/go.mod h1:+WrGqA7QpQ2O60vakm3tjDbo70Q4c92pdco4R5MRcL8= +github.com/metal-stack/api v0.2.3 h1:+WxXfcsd3R9Hr8BzOa0ybXv8rlarDNJDSlVgetwAYns= +github.com/metal-stack/api v0.2.3/go.mod h1:+WrGqA7QpQ2O60vakm3tjDbo70Q4c92pdco4R5MRcL8= github.com/metal-stack/metal-lib v0.25.2 h1:OW8y6PtlV5lv3bXSDU1MaNGvtbroiDYjuhSxqKHKAgw= github.com/metal-stack/metal-lib v0.25.2/go.mod h1:tnx4MM5oml10EMN6Nq6oFSbjOKB9B27WUZQUyZ4MywA= github.com/metal-stack/v v1.0.3 h1:Sh2oBlnxrCUD+mVpzfC8HiqL045YWkxs0gpTvkjppqs=