Skip to content

Commit

Permalink
Migrated maas-client to new maas-client-go repo
Browse files Browse the repository at this point in the history
  • Loading branch information
prathabk committed Jul 14, 2021
1 parent b05f2b9 commit 145b265
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 1,043 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ require (
github.com/go-logr/logr v0.3.0
github.com/pkg/errors v0.9.1
github.com/prometheus/common v0.10.0
github.com/spectrocloud/maas-client-go v0.0.0-20210714065108-3d1cbf51760c
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.6.1
k8s.io/api v0.17.9
k8s.io/apimachinery v0.17.9
k8s.io/client-go v0.17.9
k8s.io/klog v1.0.0
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009
k8s.io/utils v0.0.0-20210709001253-0e1f9d693477
sigs.k8s.io/cluster-api v0.3.14
sigs.k8s.io/controller-runtime v0.5.14
)
Expand Down
12 changes: 8 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OI
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk=
Expand Down Expand Up @@ -373,6 +375,8 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spectrocloud/maas-client-go v0.0.0-20210714065108-3d1cbf51760c h1:VLN+7vmPV1u5AMoSVMNcRlp8SxIkuoKjZ2rK0tMwUnM=
github.com/spectrocloud/maas-client-go v0.0.0-20210714065108-3d1cbf51760c/go.mod h1:2uKR/gd6gsmGjRYAdGxcxZrUOHFrCTyk0PIFficZbgg=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
Expand All @@ -396,8 +400,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
Expand Down Expand Up @@ -631,8 +635,8 @@ k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29 h1:NeQXVJ2XFSkRoPzRo8AId0
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU=
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20200619165400-6e3d28b6ed19/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ=
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210709001253-0e1f9d693477 h1:AuP1OP6ExD2U8pP9w85xHtmgBn/Ob3pngZwWMe12GBQ=
k8s.io/utils v0.0.0-20210709001253-0e1f9d693477/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
Expand Down
2 changes: 1 addition & 1 deletion pkg/maas/dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/pkg/errors"
infrav1 "github.com/spectrocloud/cluster-api-provider-maas/api/v1alpha3"
"github.com/spectrocloud/cluster-api-provider-maas/pkg/maas/scope"
"github.com/spectrocloud/cluster-api-provider-maas/pkg/maasclient"
"github.com/spectrocloud/maas-client-go/maasclient"
"k8s.io/apimachinery/pkg/util/sets"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/maas/machine/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/prometheus/common/log"
infrav1 "github.com/spectrocloud/cluster-api-provider-maas/api/v1alpha3"
"github.com/spectrocloud/cluster-api-provider-maas/pkg/maas/scope"
"github.com/spectrocloud/cluster-api-provider-maas/pkg/maasclient"
"github.com/spectrocloud/maas-client-go/maasclient"
"k8s.io/utils/pointer"
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3"
)
Expand Down Expand Up @@ -119,7 +119,7 @@ func fromSDKTypeToMachine(m *maasclient.Machine) *infrav1.Machine {
Hostname: m.Hostname,
State: infrav1.MachineState(m.State),
Powered: m.PowerState == "on",
AvailabilityZone: m.AvailabilityZone,
AvailabilityZone: m.Zone.Name,
}

if m.FQDN != "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/maas/scope/client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scope

import (
"github.com/spectrocloud/cluster-api-provider-maas/pkg/maasclient"
"github.com/spectrocloud/maas-client-go/maasclient"
"os"
)

Expand Down
134 changes: 0 additions & 134 deletions pkg/maasclient/bootresource.go

This file was deleted.

47 changes: 0 additions & 47 deletions pkg/maasclient/bootresource_test.go

This file was deleted.

Loading

0 comments on commit 145b265

Please sign in to comment.