diff --git a/azure/scope/machine.go b/azure/scope/machine.go index 0b8614962a7..7d6206e5bf1 100644 --- a/azure/scope/machine.go +++ b/azure/scope/machine.go @@ -404,7 +404,7 @@ func (m *MachineScope) AvailabilitySetSpec() (azure.ResourceSpecGetter, error) { asSKU := m.cache.availabilitySetSKU faultDomainCountStr, ok := asSKU.GetCapability(resourceskus.MaximumPlatformFaultDomainCount) if !ok { - return nil, errors.Errorf("cannot find capability %s sku %s", resourceskus.MaximumPlatformFaultDomainCount, asSKU.Name) + return nil, errors.Errorf("cannot find capability %s sku %s", resourceskus.MaximumPlatformFaultDomainCount, *asSKU.Name) } faultDomainCount, err := strconv.ParseUint(faultDomainCountStr, 10, 32) diff --git a/azure/services/availabilitysets/availabilitysets_test.go b/azure/services/availabilitysets/availabilitysets_test.go index 931dade8483..61a4cbabeaf 100644 --- a/azure/services/availabilitysets/availabilitysets_test.go +++ b/azure/services/availabilitysets/availabilitysets_test.go @@ -25,7 +25,6 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/to" - // "github.com/Azure/go-autorest/autorest/to" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" diff --git a/azure/services/availabilitysets/client.go b/azure/services/availabilitysets/client.go index 3b309918e70..389de4393e4 100644 --- a/azure/services/availabilitysets/client.go +++ b/azure/services/availabilitysets/client.go @@ -59,11 +59,11 @@ func newAvailabilitySetsClient(subscriptionID string, baseURI string, authorizer } // Get gets an availability set. -func (a *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (interface{}, error) { +func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (interface{}, error) { ctx, _, done := tele.StartSpanWithLogger(ctx, "availabilitysets.AzureClient.Get") defer done() - return a.availabilitySets.Get(ctx, spec.ResourceGroupName(), spec.ResourceName()) + return ac.availabilitySets.Get(ctx, spec.ResourceGroupName(), spec.ResourceName()) } // CreateOrUpdateAsync creates or updates a availability set asynchronously.