diff --git a/go.mod b/go.mod index 5a28c6ac0..da11cae93 100644 --- a/go.mod +++ b/go.mod @@ -16,23 +16,23 @@ require ( github.com/spf13/pflag v1.0.6 github.com/spf13/viper v1.20.1 github.com/stackitcloud/stackit-sdk-go/core v0.17.1 - github.com/stackitcloud/stackit-sdk-go/services/alb v0.3.1 - github.com/stackitcloud/stackit-sdk-go/services/authorization v0.6.3 + github.com/stackitcloud/stackit-sdk-go/services/alb v0.4.0 + github.com/stackitcloud/stackit-sdk-go/services/authorization v0.7.0 github.com/stackitcloud/stackit-sdk-go/services/dns v0.15.0 - github.com/stackitcloud/stackit-sdk-go/services/git v0.3.3 - github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.2 + github.com/stackitcloud/stackit-sdk-go/services/git v0.5.0 + github.com/stackitcloud/stackit-sdk-go/services/iaas v0.23.0 github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.2.0 - github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.22.0 - github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.4 - github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.14.0 - github.com/stackitcloud/stackit-sdk-go/services/runcommand v1.1.0 + github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.23.0 + github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.1.0 + github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.15.0 + github.com/stackitcloud/stackit-sdk-go/services/runcommand v1.2.0 github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.12.0 - github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.1.0 - github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.3 + github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.2.0 + github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.1.0 github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.8.0 - github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.1.0 - github.com/stackitcloud/stackit-sdk-go/services/ske v0.23.0 - github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.1.0 + github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.2.0 + github.com/stackitcloud/stackit-sdk-go/services/ske v0.24.0 + github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.2.0 github.com/zalando/go-keyring v0.2.6 golang.org/x/mod v0.24.0 golang.org/x/oauth2 v0.30.0 @@ -236,11 +236,11 @@ require ( github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.14.0 // indirect github.com/spf13/cast v1.7.1 // indirect - github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.1.0 + github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.2.0 github.com/stackitcloud/stackit-sdk-go/services/logme v0.24.0 github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.24.0 - github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.3 - github.com/stackitcloud/stackit-sdk-go/services/observability v0.6.0 + github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.2.0 + github.com/stackitcloud/stackit-sdk-go/services/observability v0.7.0 github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.24.0 github.com/stackitcloud/stackit-sdk-go/services/redis v0.24.0 github.com/subosito/gotenv v1.6.0 // indirect diff --git a/go.sum b/go.sum index 1d1a6d7fc..60169ba09 100644 --- a/go.sum +++ b/go.sum @@ -564,54 +564,54 @@ github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YE github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stackitcloud/stackit-sdk-go/core v0.17.1 h1:TTrVoB1lERd/qfWzpe6HpwCJSjtaGnUI7UE7ITb5IT0= github.com/stackitcloud/stackit-sdk-go/core v0.17.1/go.mod h1:8KIw3czdNJ9sdil9QQimxjR6vHjeINFrRv0iZ67wfn0= -github.com/stackitcloud/stackit-sdk-go/services/alb v0.3.1 h1:7JbFIXiq3IlFST7N7kS0gxX5EKX/rYs87kUVtR00sHw= -github.com/stackitcloud/stackit-sdk-go/services/alb v0.3.1/go.mod h1:IYXv5QX/LEYfF02eN1/1KKo979yPewWhrbhpRnG2yOg= -github.com/stackitcloud/stackit-sdk-go/services/authorization v0.6.3 h1:aXVMNdiHCtT07bro52KjnxEBMDNK9DweJBlk+G4ElCM= -github.com/stackitcloud/stackit-sdk-go/services/authorization v0.6.3/go.mod h1:dJ19ZwFjp2bfC5ZobXV3vUdSpE3quUw3GuoFSKLpHIo= +github.com/stackitcloud/stackit-sdk-go/services/alb v0.4.0 h1:l53lihnLUbAORdQPoUL2NlczWfeXfW5gHhoAIPsqGfI= +github.com/stackitcloud/stackit-sdk-go/services/alb v0.4.0/go.mod h1:IYXv5QX/LEYfF02eN1/1KKo979yPewWhrbhpRnG2yOg= +github.com/stackitcloud/stackit-sdk-go/services/authorization v0.7.0 h1:VpONplkdlEh7Pf22+cNnnHH4bx+S9QI+z55XYRE74JY= +github.com/stackitcloud/stackit-sdk-go/services/authorization v0.7.0/go.mod h1:dJ19ZwFjp2bfC5ZobXV3vUdSpE3quUw3GuoFSKLpHIo= github.com/stackitcloud/stackit-sdk-go/services/dns v0.15.0 h1:GQAA9gqhKN0ZRc1vRYURHeVjSghh+iF+5DK0HdeuakI= github.com/stackitcloud/stackit-sdk-go/services/dns v0.15.0/go.mod h1:PMHoavoIaRZpkI9BA0nsnRjGoHASVSBon45XB3QyhMA= -github.com/stackitcloud/stackit-sdk-go/services/git v0.3.3 h1:/NXxiJf/NFpj+DFXc07vsx+0he/xufdhIskXUlSeyyw= -github.com/stackitcloud/stackit-sdk-go/services/git v0.3.3/go.mod h1:XhXHJpOVC9Rpwyf1G+EpMbprBafH9aZb8vWBdR+z0WM= -github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.2 h1:zh6e2eHgqex++fr6N0RK7wMMBGesC3QhBd42FdTq2Z8= -github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.2/go.mod h1:QNH50Pq0Hu21lLDOwa02PIjRjTl0LfEdHoz5snGQRn8= -github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.1.0 h1:9gUobm//GzVGYTbfa39tNRceEjQskNuNVZyUS9rOZ4Y= -github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.1.0/go.mod h1:h3oM6cS23Yfynp8Df1hNr0FxtY5Alii/2g8Wqi5SIVE= +github.com/stackitcloud/stackit-sdk-go/services/git v0.5.0 h1:s0A2EPBrnBxfKStKA/B1izbyYHw/0m2RdqN3Inkv9hI= +github.com/stackitcloud/stackit-sdk-go/services/git v0.5.0/go.mod h1:XhXHJpOVC9Rpwyf1G+EpMbprBafH9aZb8vWBdR+z0WM= +github.com/stackitcloud/stackit-sdk-go/services/iaas v0.23.0 h1:3D34kZSosO25ydqUz72y8sg6yigthKf35DO8SFUyzFU= +github.com/stackitcloud/stackit-sdk-go/services/iaas v0.23.0/go.mod h1:QNH50Pq0Hu21lLDOwa02PIjRjTl0LfEdHoz5snGQRn8= +github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.2.0 h1:gaTgjmEIvq7Nmji5YHh1haFvA/8dWyOgCg3lw6drjL4= +github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.2.0/go.mod h1:h3oM6cS23Yfynp8Df1hNr0FxtY5Alii/2g8Wqi5SIVE= github.com/stackitcloud/stackit-sdk-go/services/logme v0.24.0 h1:5J2TH9ig5cp+5pCHugrsDJuFsRnIOQHQUqsxlweRXL0= github.com/stackitcloud/stackit-sdk-go/services/logme v0.24.0/go.mod h1:+3jizYma6Dq3XVn6EMMdSBF9eIm0w6hCJvrStB3AIL0= github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.24.0 h1:t/Ten9AuoWFmrDq5gAI3kVZShF3i8zEAaeBsYYqiaao= github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.24.0/go.mod h1:qgvi3qiAzB1wKpMJ5CPnEaUToeiwgnQxGvlkjdisaLU= github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.2.0 h1:U/IhjLOz0vG6zuxTqGhBd8f609s6JB+X9PaL6x/VM58= github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.2.0/go.mod h1:+JSnz5/AvGN5ek/iH008frRc/NgjSr1EVOTIbyLwAuQ= -github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.3 h1:RFe45uLzTSmd69yaQe5zLDY3+1hYi6/lSZUVcjbb6+c= -github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.3/go.mod h1:iCOYS9yICXQPyMAIdUGMqJDLY8HXKiVAdiMzO/mPvtA= -github.com/stackitcloud/stackit-sdk-go/services/observability v0.6.0 h1:QqlFcMv/TbIG95u/xHB/9aLvElplj1lKnTIyUSwEtT4= -github.com/stackitcloud/stackit-sdk-go/services/observability v0.6.0/go.mod h1:1gMNjPCqT868oIqdWGkiReS1G/qpM4bYKYBmDRi8sqg= -github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.22.0 h1:XDt4NCiWdpjbbw9UevsxLJ3SGkO1bSoJnV96RSHNNoI= -github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.22.0/go.mod h1:c30J6f/fXtbzcHkH3ZcabZUek3wfy5CRnEkcW5e5yXg= -github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.4 h1:AIQueG1oSdKbxK8ASZZYkmqzJ7NhKzKcR5AQsndoF18= -github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.4/go.mod h1:4g/L5PHfz1xk3udEhvPy2nXiH4UgRO5Cj6iwUa7k5VQ= +github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.2.0 h1:+dKIPVz9ydKbX3x6+1NvYk++OA378w74p+N6SjDmzBQ= +github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.2.0/go.mod h1:iCOYS9yICXQPyMAIdUGMqJDLY8HXKiVAdiMzO/mPvtA= +github.com/stackitcloud/stackit-sdk-go/services/observability v0.7.0 h1:TMHTJvVZj2Ne0tBgKxeSB5kUVP0dx3WQ2YZhbSIMp0E= +github.com/stackitcloud/stackit-sdk-go/services/observability v0.7.0/go.mod h1:1gMNjPCqT868oIqdWGkiReS1G/qpM4bYKYBmDRi8sqg= +github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.23.0 h1:/OaZCyrD8LFa4W6a2Vu2QSVMJwLLBr8ZdBKzX00MV1Q= +github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.23.0/go.mod h1:c30J6f/fXtbzcHkH3ZcabZUek3wfy5CRnEkcW5e5yXg= +github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.1.0 h1:r29a9GoBLVw2VZSzdPftlIsE5t7shdxobwoT6NVUIjU= +github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.1.0/go.mod h1:4g/L5PHfz1xk3udEhvPy2nXiH4UgRO5Cj6iwUa7k5VQ= github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.24.0 h1:YEfhKt3T25uY7vs8QcAPfdTs1GLil0BcrLCJ5RhMyR0= github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.24.0/go.mod h1:9JoCgKe2IKmawcuAYIuxrAMMb6pk5XiY80Z3sU7IWy0= github.com/stackitcloud/stackit-sdk-go/services/redis v0.24.0 h1:FZdQwBKyW86l1EwiEUSDsAfhF9si337kNAnagz9ND6A= github.com/stackitcloud/stackit-sdk-go/services/redis v0.24.0/go.mod h1:mID7cr40WzI4wdvveYhLzvkk+zPfolfo5+VcDGo5slU= -github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.14.0 h1:Rpbt83RyXS0AMw97g5L9oQdCAmVBGAyHpeCcDXesuEk= -github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.14.0/go.mod h1:Picm0mP7TUBTAu+MzWtedz61LczMnWH4ghPjwB/g5DE= -github.com/stackitcloud/stackit-sdk-go/services/runcommand v1.1.0 h1:nvwaviIDf5ffAydfQBrl48K1nPowyDq05ompo9ZzFzY= -github.com/stackitcloud/stackit-sdk-go/services/runcommand v1.1.0/go.mod h1:qId86UiowpDDs0L+mstdzz3xXtnW+R56wh7q8CQltb4= +github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.15.0 h1:lFxbZmcD+YyMVN35k2UxCpGoqhR+FyfgaOEcdWSOrwQ= +github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.15.0/go.mod h1:Picm0mP7TUBTAu+MzWtedz61LczMnWH4ghPjwB/g5DE= +github.com/stackitcloud/stackit-sdk-go/services/runcommand v1.2.0 h1:fMtKiC1VwABJXckRTyxLWWMDCNrbVdpCwQ63aBKgR5k= +github.com/stackitcloud/stackit-sdk-go/services/runcommand v1.2.0/go.mod h1:qId86UiowpDDs0L+mstdzz3xXtnW+R56wh7q8CQltb4= github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.12.0 h1:oGR3wRC0xfX2Itpwbh/SrT/k2fnmMSzvy2U9U2lDQPs= github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.12.0/go.mod h1:iD7R3CNdLUDUyKP+lATsQy+V4QGMMOb15zPnNq4wnbs= -github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.1.0 h1:cKQAuKSihSX1Jpacub2rZ1StItiO7SIO0y+Fi2yukd4= -github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.1.0/go.mod h1:j2GV/ePXEccwq0WV7DtmKpsZcJ2X45Be3D4oAlJdddo= -github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.3 h1:iLyXsBF+lP7iE4rnoK3hO8l4wHcgySRXD65oeUgt6Jc= -github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.3/go.mod h1:5F7/2BiKhrbvHD56mj5xR9qf8P0V2yMgeitmdIpQv4s= +github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.2.0 h1:h3tF+yBqrFeRpvyeeGTM33ExA/YYbjwfKYvuZj7gQyM= +github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.2.0/go.mod h1:j2GV/ePXEccwq0WV7DtmKpsZcJ2X45Be3D4oAlJdddo= +github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.1.0 h1:WJA2v8XCISdrcbnJXstsjVE+QAFVsDpfJHNp0ORe1Bc= +github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.1.0/go.mod h1:5F7/2BiKhrbvHD56mj5xR9qf8P0V2yMgeitmdIpQv4s= github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.8.0 h1:rgSKhgnybB3vrAKAafnuOLjyhn4LtxUxvmgmi810N3U= github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.8.0/go.mod h1:e3WMlYcUZZ5bpndWuCrxEQqIOPsYPuus9O/EG2eIfG4= -github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.1.0 h1:Wb/eEqbnwLw+lsTlAC8qTFoLMtXOTWcZDUDSiUB7GnM= -github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.1.0/go.mod h1:TYWEik7b2aJrCJrRWU3mn1p1hmShCwizRthT3xl6z0o= -github.com/stackitcloud/stackit-sdk-go/services/ske v0.23.0 h1:kPAYBLDJC8W3GvDt+KtqDl2EZJgbU9l1tUj0JbCWA+4= -github.com/stackitcloud/stackit-sdk-go/services/ske v0.23.0/go.mod h1:nJTJ3qT2xHmOs2aqQgBPfOLp322gE9pvpRaluTlRmN8= -github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.1.0 h1:awy7JzBwAVJEKcJVt1DBZtZ0qtdT2aEuWCkgQvKky9w= -github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.1.0/go.mod h1:CyYJqR0tZWs2r5bGz69j4bmvhxdsd4QLCm1Uf+LouB0= +github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.2.0 h1:7CETDuCaEkA+YDbje6jaWhWO8w05lVxELTs93he9YG8= +github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.2.0/go.mod h1:TYWEik7b2aJrCJrRWU3mn1p1hmShCwizRthT3xl6z0o= +github.com/stackitcloud/stackit-sdk-go/services/ske v0.24.0 h1:VuX2xLDdPeeXH2+E4FPnTRxGXu68cI62titv4W1V5ic= +github.com/stackitcloud/stackit-sdk-go/services/ske v0.24.0/go.mod h1:nJTJ3qT2xHmOs2aqQgBPfOLp322gE9pvpRaluTlRmN8= +github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.2.0 h1:WvPLO1c7oT/MWmCRTt7jRyxus2g3DIluIW5iAsUpSFM= +github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.2.0/go.mod h1:CyYJqR0tZWs2r5bGz69j4bmvhxdsd4QLCm1Uf+LouB0= github.com/stbenjam/no-sprintf-host-port v0.2.0 h1:i8pxvGrt1+4G0czLr/WnmyH7zbZ8Bg8etvARQ1rpyl4= github.com/stbenjam/no-sprintf-host-port v0.2.0/go.mod h1:eL0bQ9PasS0hsyTyfTjjG+E80QIyPnBVQbYZyv20Jfk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/internal/cmd/beta/alb/list/list_test.go b/internal/cmd/beta/alb/list/list_test.go index 547787166..f0fb05146 100644 --- a/internal/cmd/beta/alb/list/list_test.go +++ b/internal/cmd/beta/alb/list/list_test.go @@ -5,12 +5,12 @@ import ( "strconv" "testing" + "github.com/google/go-cmp/cmp/cmpopts" "github.com/stackitcloud/stackit-cli/internal/cmd/params" "github.com/stackitcloud/stackit-cli/internal/pkg/globalflags" "github.com/stackitcloud/stackit-cli/internal/pkg/print" "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "github.com/google/uuid" "github.com/stackitcloud/stackit-sdk-go/services/alb" ) @@ -49,7 +49,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel { } func fixtureRequest(mods ...func(request *alb.ApiListLoadBalancersRequest)) alb.ApiListLoadBalancersRequest { - request := testClient.ListLoadBalancers(context.Background(), testProjectId, testRegion) + request := testClient.ListLoadBalancers(testCtx, testProjectId, testRegion) for _, mod := range mods { mod(&request) } @@ -160,7 +160,6 @@ func TestBuildRequest(t *testing.T) { diff := cmp.Diff(request, tt.expectedRequest, cmp.AllowUnexported(tt.expectedRequest), cmpopts.EquateComparable(testCtx), - cmpopts.IgnoreFields(alb.ApiListLoadBalancersRequest{}, "ctx"), ) if diff != "" { t.Fatalf("Data does not match: %s", diff) diff --git a/internal/cmd/beta/alb/plans/plans_test.go b/internal/cmd/beta/alb/plans/plans_test.go index bfbda8586..84b5c9002 100644 --- a/internal/cmd/beta/alb/plans/plans_test.go +++ b/internal/cmd/beta/alb/plans/plans_test.go @@ -156,7 +156,6 @@ func TestBuildRequest(t *testing.T) { diff := cmp.Diff(request, tt.expectedRequest, cmp.AllowUnexported(tt.expectedRequest), cmpopts.EquateComparable(testCtx), - cmpopts.IgnoreFields(alb.ApiListLoadBalancersRequest{}, "ctx"), ) if diff != "" { t.Fatalf("Data does not match: %s", diff) diff --git a/internal/cmd/beta/alb/quotas/quotas_test.go b/internal/cmd/beta/alb/quotas/quotas_test.go index 1ff2aaacd..6240e20d3 100644 --- a/internal/cmd/beta/alb/quotas/quotas_test.go +++ b/internal/cmd/beta/alb/quotas/quotas_test.go @@ -156,7 +156,6 @@ func TestBuildRequest(t *testing.T) { diff := cmp.Diff(request, tt.expectedRequest, cmp.AllowUnexported(tt.expectedRequest), cmpopts.EquateComparable(testCtx), - cmpopts.IgnoreFields(alb.ApiListLoadBalancersRequest{}, "ctx"), ) if diff != "" { t.Fatalf("Data does not match: %s", diff) diff --git a/internal/cmd/git/create/create_test.go b/internal/cmd/git/create/create_test.go index 33ed0cc7e..26499bf8b 100644 --- a/internal/cmd/git/create/create_test.go +++ b/internal/cmd/git/create/create_test.go @@ -184,7 +184,7 @@ func TestBuildRequest(t *testing.T) { model.Name = "new-name" }), expectedRequest: fixtureRequest(func(request *git.ApiCreateInstanceRequest) { - *request = request.CreateInstancePayload(fixtureCreatePayload(func(payload *git.CreateInstancePayload) { + *request = (*request).CreateInstancePayload(fixtureCreatePayload(func(payload *git.CreateInstancePayload) { payload.Name = utils.Ptr("new-name") })) }), diff --git a/internal/cmd/image/create/create_test.go b/internal/cmd/image/create/create_test.go index cdf15ce81..e0ed042c9 100644 --- a/internal/cmd/image/create/create_test.go +++ b/internal/cmd/image/create/create_test.go @@ -339,7 +339,7 @@ func TestBuildRequest(t *testing.T) { model.Labels = nil }), expectedRequest: fixtureRequest(func(request *iaas.ApiCreateImageRequest) { - *request = request.CreateImagePayload(fixtureCreatePayload(func(payload *iaas.CreateImagePayload) { + *request = (*request).CreateImagePayload(fixtureCreatePayload(func(payload *iaas.CreateImagePayload) { payload.Labels = nil })) }), @@ -350,7 +350,7 @@ func TestBuildRequest(t *testing.T) { model.Config.CdromBus = utils.Ptr("foobar") }), expectedRequest: fixtureRequest(func(request *iaas.ApiCreateImageRequest) { - *request = request.CreateImagePayload(fixtureCreatePayload(func(payload *iaas.CreateImagePayload) { + *request = (*request).CreateImagePayload(fixtureCreatePayload(func(payload *iaas.CreateImagePayload) { payload.Config.CdromBus = iaas.NewNullableString(utils.Ptr("foobar")) })) }), @@ -361,7 +361,7 @@ func TestBuildRequest(t *testing.T) { model.Config.Uefi = false }), expectedRequest: fixtureRequest(func(request *iaas.ApiCreateImageRequest) { - *request = request.CreateImagePayload(fixtureCreatePayload(func(payload *iaas.CreateImagePayload) { + *request = (*request).CreateImagePayload(fixtureCreatePayload(func(payload *iaas.CreateImagePayload) { payload.Config.Uefi = utils.Ptr(false) })) }), diff --git a/internal/cmd/image/list/list_test.go b/internal/cmd/image/list/list_test.go index c357d3bc1..6437127df 100644 --- a/internal/cmd/image/list/list_test.go +++ b/internal/cmd/image/list/list_test.go @@ -184,7 +184,7 @@ func TestBuildRequest(t *testing.T) { model.LabelSelector = utils.Ptr("") }), expectedRequest: fixtureRequest(func(request *iaas.ApiListImagesRequest) { - *request = request.LabelSelector("") + *request = (*request).LabelSelector("") }), }, { @@ -193,7 +193,7 @@ func TestBuildRequest(t *testing.T) { model.LabelSelector = utils.Ptr("foo=bar") }), expectedRequest: fixtureRequest(func(request *iaas.ApiListImagesRequest) { - *request = request.LabelSelector("foo=bar") + *request = (*request).LabelSelector("foo=bar") }), }, } diff --git a/internal/cmd/image/update/update_test.go b/internal/cmd/image/update/update_test.go index bb313b3c2..17216cbb9 100644 --- a/internal/cmd/image/update/update_test.go +++ b/internal/cmd/image/update/update_test.go @@ -373,7 +373,7 @@ func TestBuildRequest(t *testing.T) { model.Labels = nil }), expectedRequest: fixtureRequest(func(request *iaas.ApiUpdateImageRequest) { - *request = request.UpdateImagePayload(fixtureCreatePayload(func(payload *iaas.UpdateImagePayload) { + *request = (*request).UpdateImagePayload(fixtureCreatePayload(func(payload *iaas.UpdateImagePayload) { payload.Labels = nil })) }), @@ -384,7 +384,7 @@ func TestBuildRequest(t *testing.T) { model.Name = utils.Ptr("something else") }), expectedRequest: fixtureRequest(func(request *iaas.ApiUpdateImageRequest) { - *request = request.UpdateImagePayload(fixtureCreatePayload(func(payload *iaas.UpdateImagePayload) { + *request = (*request).UpdateImagePayload(fixtureCreatePayload(func(payload *iaas.UpdateImagePayload) { payload.Name = utils.Ptr("something else") })) }), @@ -395,7 +395,7 @@ func TestBuildRequest(t *testing.T) { model.Config.CdromBus = utils.Ptr("something else") }), expectedRequest: fixtureRequest(func(request *iaas.ApiUpdateImageRequest) { - *request = request.UpdateImagePayload(fixtureCreatePayload(func(payload *iaas.UpdateImagePayload) { + *request = (*request).UpdateImagePayload(fixtureCreatePayload(func(payload *iaas.UpdateImagePayload) { payload.Config.CdromBus.Set(utils.Ptr("something else")) })) }), diff --git a/internal/cmd/load-balancer/observability-credentials/add/add_test.go b/internal/cmd/load-balancer/observability-credentials/add/add_test.go index 5ee5523f8..bedebaf95 100644 --- a/internal/cmd/load-balancer/observability-credentials/add/add_test.go +++ b/internal/cmd/load-balancer/observability-credentials/add/add_test.go @@ -189,7 +189,7 @@ func TestBuildRequest(t *testing.T) { diff := cmp.Diff(request, tt.expectedRequest, cmp.AllowUnexported(tt.expectedRequest), cmpopts.EquateComparable(testCtx), - cmpopts.IgnoreFields(loadbalancer.ApiCreateCredentialsRequest{}, "xRequestID"), + cmpopts.IgnoreFields(loadbalancer.CreateCredentialsRequest{}, "xRequestID"), ) if diff != "" { t.Fatalf("Data does not match: %s", diff) diff --git a/internal/cmd/load-balancer/target-pool/add-target/add_target_test.go b/internal/cmd/load-balancer/target-pool/add-target/add_target_test.go index 61d2fe4a6..7d7b1799f 100644 --- a/internal/cmd/load-balancer/target-pool/add-target/add_target_test.go +++ b/internal/cmd/load-balancer/target-pool/add-target/add_target_test.go @@ -338,7 +338,7 @@ func TestBuildRequest(t *testing.T) { }, } }) - *request = request.UpdateTargetPoolPayload(*payload) + *request = (*request).UpdateTargetPoolPayload(*payload) }), }, { @@ -357,7 +357,7 @@ func TestBuildRequest(t *testing.T) { }, } }) - *request = request.UpdateTargetPoolPayload(*payload) + *request = (*request).UpdateTargetPoolPayload(*payload) }), }, { @@ -376,7 +376,7 @@ func TestBuildRequest(t *testing.T) { }, } }) - *request = request.UpdateTargetPoolPayload(*payload) + *request = (*request).UpdateTargetPoolPayload(*payload) }), }, { diff --git a/internal/cmd/load-balancer/target-pool/remove-target/remove_target_test.go b/internal/cmd/load-balancer/target-pool/remove-target/remove_target_test.go index d945f3c8e..14bb4fadc 100644 --- a/internal/cmd/load-balancer/target-pool/remove-target/remove_target_test.go +++ b/internal/cmd/load-balancer/target-pool/remove-target/remove_target_test.go @@ -320,7 +320,7 @@ func TestBuildRequest(t *testing.T) { payload := fixturePayload(func(payload *loadbalancer.UpdateTargetPoolPayload) { payload.Targets = utils.Ptr((*payload.Targets)[1:]) }) - *request = request.UpdateTargetPoolPayload(*payload) + *request = (*request).UpdateTargetPoolPayload(*payload) }), }, { diff --git a/internal/cmd/network-area/route/create/create_test.go b/internal/cmd/network-area/route/create/create_test.go index 182555c0c..a1ab93772 100644 --- a/internal/cmd/network-area/route/create/create_test.go +++ b/internal/cmd/network-area/route/create/create_test.go @@ -241,7 +241,7 @@ func TestBuildRequest(t *testing.T) { model.Labels = utils.Ptr(map[string]string{"key": "value"}) }), expectedRequest: fixtureRequest(func(request *iaas.ApiCreateNetworkAreaRouteRequest) { - *request = request.CreateNetworkAreaRoutePayload(fixturePayload(func(payload *iaas.CreateNetworkAreaRoutePayload) { + *request = (*request).CreateNetworkAreaRoutePayload(fixturePayload(func(payload *iaas.CreateNetworkAreaRoutePayload) { (*payload.Ipv4)[0].Labels = utils.Ptr(map[string]interface{}{"key": "value"}) })) }), diff --git a/internal/cmd/observability/grafana/public-read-access/disable/disable_test.go b/internal/cmd/observability/grafana/public-read-access/disable/disable_test.go index a8db1bd9d..9dc5019d2 100644 --- a/internal/cmd/observability/grafana/public-read-access/disable/disable_test.go +++ b/internal/cmd/observability/grafana/public-read-access/disable/disable_test.go @@ -262,7 +262,7 @@ func TestBuildRequest(t *testing.T) { }), isValid: true, expectedRequest: fixtureRequest(func(request *observability.ApiUpdateGrafanaConfigsRequest) { - *request = request.UpdateGrafanaConfigsPayload(*fixturePayload(func(payload *observability.UpdateGrafanaConfigsPayload) { + *request = (*request).UpdateGrafanaConfigsPayload(*fixturePayload(func(payload *observability.UpdateGrafanaConfigsPayload) { payload.GenericOauth = nil })) }), diff --git a/internal/cmd/observability/grafana/public-read-access/enable/enable_test.go b/internal/cmd/observability/grafana/public-read-access/enable/enable_test.go index d425e7078..6d1fbea0a 100644 --- a/internal/cmd/observability/grafana/public-read-access/enable/enable_test.go +++ b/internal/cmd/observability/grafana/public-read-access/enable/enable_test.go @@ -262,7 +262,7 @@ func TestBuildRequest(t *testing.T) { }), isValid: true, expectedRequest: fixtureRequest(func(request *observability.ApiUpdateGrafanaConfigsRequest) { - *request = request.UpdateGrafanaConfigsPayload(*fixturePayload(func(payload *observability.UpdateGrafanaConfigsPayload) { + *request = (*request).UpdateGrafanaConfigsPayload(*fixturePayload(func(payload *observability.UpdateGrafanaConfigsPayload) { payload.GenericOauth = nil })) }), diff --git a/internal/cmd/observability/grafana/single-sign-on/disable/disable_test.go b/internal/cmd/observability/grafana/single-sign-on/disable/disable_test.go index 53c087352..e536ab098 100644 --- a/internal/cmd/observability/grafana/single-sign-on/disable/disable_test.go +++ b/internal/cmd/observability/grafana/single-sign-on/disable/disable_test.go @@ -262,7 +262,7 @@ func TestBuildRequest(t *testing.T) { }), isValid: true, expectedRequest: fixtureRequest(func(request *observability.ApiUpdateGrafanaConfigsRequest) { - *request = request.UpdateGrafanaConfigsPayload(*fixturePayload(func(payload *observability.UpdateGrafanaConfigsPayload) { + *request = (*request).UpdateGrafanaConfigsPayload(*fixturePayload(func(payload *observability.UpdateGrafanaConfigsPayload) { payload.GenericOauth = nil })) }), diff --git a/internal/cmd/observability/grafana/single-sign-on/enable/enable_test.go b/internal/cmd/observability/grafana/single-sign-on/enable/enable_test.go index cdc464409..033227257 100644 --- a/internal/cmd/observability/grafana/single-sign-on/enable/enable_test.go +++ b/internal/cmd/observability/grafana/single-sign-on/enable/enable_test.go @@ -262,7 +262,7 @@ func TestBuildRequest(t *testing.T) { }), isValid: true, expectedRequest: fixtureRequest(func(request *observability.ApiUpdateGrafanaConfigsRequest) { - *request = request.UpdateGrafanaConfigsPayload(*fixturePayload(func(payload *observability.UpdateGrafanaConfigsPayload) { + *request = (*request).UpdateGrafanaConfigsPayload(*fixturePayload(func(payload *observability.UpdateGrafanaConfigsPayload) { payload.GenericOauth = nil })) }), diff --git a/internal/cmd/project/list/list_test.go b/internal/cmd/project/list/list_test.go index 79397409f..6d187a9bc 100644 --- a/internal/cmd/project/list/list_test.go +++ b/internal/cmd/project/list/list_test.go @@ -67,7 +67,7 @@ func fixtureRequest(mods ...func(request *resourcemanager.ApiListProjectsRequest testCreationTimeAfter, err := time.Parse(creationTimeAfterFormat, testCreationTimeAfter) if err != nil { - return resourcemanager.ApiListProjectsRequest{} + return resourcemanager.ListProjectsRequest{} } request = request.CreationTimeStart(testCreationTimeAfter) request = request.Member("member") diff --git a/internal/cmd/security-group/create/create_test.go b/internal/cmd/security-group/create/create_test.go index 9b2561489..7b9cbd21e 100644 --- a/internal/cmd/security-group/create/create_test.go +++ b/internal/cmd/security-group/create/create_test.go @@ -227,7 +227,7 @@ func TestBuildRequest(t *testing.T) { model.Labels = nil }), expectedRequest: fixtureRequest(func(request *iaas.ApiCreateSecurityGroupRequest) { - *request = request.CreateSecurityGroupPayload(iaas.CreateSecurityGroupPayload{ + *request = (*request).CreateSecurityGroupPayload(iaas.CreateSecurityGroupPayload{ Description: &testDescription, Labels: nil, Name: &testName, @@ -241,7 +241,7 @@ func TestBuildRequest(t *testing.T) { model.Stateful = utils.Ptr(false) }), expectedRequest: fixtureRequest(func(request *iaas.ApiCreateSecurityGroupRequest) { - *request = request.CreateSecurityGroupPayload(iaas.CreateSecurityGroupPayload{ + *request = (*request).CreateSecurityGroupPayload(iaas.CreateSecurityGroupPayload{ Description: &testDescription, Labels: utils.Ptr(toStringAnyMapPtr(testLabels)), Name: &testName, diff --git a/internal/cmd/security-group/list/list_test.go b/internal/cmd/security-group/list/list_test.go index a78e3501a..bade91812 100644 --- a/internal/cmd/security-group/list/list_test.go +++ b/internal/cmd/security-group/list/list_test.go @@ -178,7 +178,7 @@ func TestBuildRequest(t *testing.T) { model.LabelSelector = utils.Ptr("") }), expectedRequest: fixtureRequest(func(request *iaas.ApiListSecurityGroupsRequest) { - *request = request.LabelSelector("") + *request = (*request).LabelSelector("") }), }, { @@ -187,7 +187,7 @@ func TestBuildRequest(t *testing.T) { model.LabelSelector = utils.Ptr("foo=bar") }), expectedRequest: fixtureRequest(func(request *iaas.ApiListSecurityGroupsRequest) { - *request = request.LabelSelector("foo=bar") + *request = (*request).LabelSelector("foo=bar") }), }, } diff --git a/internal/cmd/security-group/update/update_test.go b/internal/cmd/security-group/update/update_test.go index 3bc10055a..1d89a9e48 100644 --- a/internal/cmd/security-group/update/update_test.go +++ b/internal/cmd/security-group/update/update_test.go @@ -268,7 +268,7 @@ func TestBuildRequest(t *testing.T) { model.Labels = nil }), expectedRequest: fixtureRequest(func(request *iaas.ApiUpdateSecurityGroupRequest) { - *request = request.UpdateSecurityGroupPayload(iaas.UpdateSecurityGroupPayload{ + *request = (*request).UpdateSecurityGroupPayload(iaas.UpdateSecurityGroupPayload{ Description: &testDescription, Labels: nil, Name: &testName, diff --git a/internal/cmd/server/reboot/reboot_test.go b/internal/cmd/server/reboot/reboot_test.go index 77e99f506..cfcda6783 100644 --- a/internal/cmd/server/reboot/reboot_test.go +++ b/internal/cmd/server/reboot/reboot_test.go @@ -199,7 +199,7 @@ func TestBuildRequest(t *testing.T) { model.HardReboot = true }), expectedRequest: fixtureRequest(func(request *iaas.ApiRebootServerRequest) { - *request = request.Action("hard") + *request = (*request).Action("hard") }), }, } diff --git a/internal/pkg/services/load-balancer/utils/utils_test.go b/internal/pkg/services/load-balancer/utils/utils_test.go index e33fd75b8..5941b2c93 100644 --- a/internal/pkg/services/load-balancer/utils/utils_test.go +++ b/internal/pkg/services/load-balancer/utils/utils_test.go @@ -56,7 +56,7 @@ func (m *loadBalancerClientMocked) ListLoadBalancersExecute(_ context.Context, _ } func (m *loadBalancerClientMocked) UpdateTargetPool(_ context.Context, _, _, _, _ string) loadbalancer.ApiUpdateTargetPoolRequest { - return loadbalancer.ApiUpdateTargetPoolRequest{} + return loadbalancer.UpdateTargetPoolRequest{} } func fixtureLoadBalancer(mods ...func(*loadbalancer.LoadBalancer)) *loadbalancer.LoadBalancer {