Skip to content

Commit 145b265

Browse files
author
Prathab
committed
Migrated maas-client to new maas-client-go repo
1 parent b05f2b9 commit 145b265

File tree

15 files changed

+14
-1043
lines changed

15 files changed

+14
-1043
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ require (
66
github.com/go-logr/logr v0.3.0
77
github.com/pkg/errors v0.9.1
88
github.com/prometheus/common v0.10.0
9+
github.com/spectrocloud/maas-client-go v0.0.0-20210714065108-3d1cbf51760c
910
github.com/spf13/pflag v1.0.5
10-
github.com/stretchr/testify v1.6.1
1111
k8s.io/api v0.17.9
1212
k8s.io/apimachinery v0.17.9
1313
k8s.io/client-go v0.17.9
1414
k8s.io/klog v1.0.0
15-
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009
15+
k8s.io/utils v0.0.0-20210709001253-0e1f9d693477
1616
sigs.k8s.io/cluster-api v0.3.14
1717
sigs.k8s.io/controller-runtime v0.5.14
1818
)

go.sum

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OI
207207
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
208208
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
209209
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
210+
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
211+
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
210212
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
211213
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
212214
github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk=
@@ -373,6 +375,8 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1
373375
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
374376
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
375377
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
378+
github.com/spectrocloud/maas-client-go v0.0.0-20210714065108-3d1cbf51760c h1:VLN+7vmPV1u5AMoSVMNcRlp8SxIkuoKjZ2rK0tMwUnM=
379+
github.com/spectrocloud/maas-client-go v0.0.0-20210714065108-3d1cbf51760c/go.mod h1:2uKR/gd6gsmGjRYAdGxcxZrUOHFrCTyk0PIFficZbgg=
376380
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
377381
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
378382
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
@@ -396,8 +400,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
396400
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
397401
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
398402
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
399-
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
400-
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
403+
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
404+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
401405
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
402406
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
403407
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
@@ -631,8 +635,8 @@ k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29 h1:NeQXVJ2XFSkRoPzRo8AId0
631635
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU=
632636
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
633637
k8s.io/utils v0.0.0-20200619165400-6e3d28b6ed19/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
634-
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ=
635-
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
638+
k8s.io/utils v0.0.0-20210709001253-0e1f9d693477 h1:AuP1OP6ExD2U8pP9w85xHtmgBn/Ob3pngZwWMe12GBQ=
639+
k8s.io/utils v0.0.0-20210709001253-0e1f9d693477/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
636640
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
637641
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
638642
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=

pkg/maas/dns/dns.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"github.com/pkg/errors"
66
infrav1 "github.com/spectrocloud/cluster-api-provider-maas/api/v1alpha3"
77
"github.com/spectrocloud/cluster-api-provider-maas/pkg/maas/scope"
8-
"github.com/spectrocloud/cluster-api-provider-maas/pkg/maasclient"
8+
"github.com/spectrocloud/maas-client-go/maasclient"
99
"k8s.io/apimachinery/pkg/util/sets"
1010
)
1111

pkg/maas/machine/machine.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/prometheus/common/log"
77
infrav1 "github.com/spectrocloud/cluster-api-provider-maas/api/v1alpha3"
88
"github.com/spectrocloud/cluster-api-provider-maas/pkg/maas/scope"
9-
"github.com/spectrocloud/cluster-api-provider-maas/pkg/maasclient"
9+
"github.com/spectrocloud/maas-client-go/maasclient"
1010
"k8s.io/utils/pointer"
1111
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3"
1212
)
@@ -119,7 +119,7 @@ func fromSDKTypeToMachine(m *maasclient.Machine) *infrav1.Machine {
119119
Hostname: m.Hostname,
120120
State: infrav1.MachineState(m.State),
121121
Powered: m.PowerState == "on",
122-
AvailabilityZone: m.AvailabilityZone,
122+
AvailabilityZone: m.Zone.Name,
123123
}
124124

125125
if m.FQDN != "" {

pkg/maas/scope/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package scope
22

33
import (
4-
"github.com/spectrocloud/cluster-api-provider-maas/pkg/maasclient"
4+
"github.com/spectrocloud/maas-client-go/maasclient"
55
"os"
66
)
77

pkg/maasclient/bootresource.go

Lines changed: 0 additions & 134 deletions
This file was deleted.

pkg/maasclient/bootresource_test.go

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)