From b15b967c33ad278b4a8826dab3354393605c0fa1 Mon Sep 17 00:00:00 2001 From: Ace Eldeib Date: Wed, 10 Apr 2019 20:35:40 -0700 Subject: [PATCH] fix: align comments to behavior --- .../internalloadbalancers/internalloadbalancers.go | 6 +++--- pkg/cloud/azure/services/publicips/publicips.go | 4 ++-- .../services/publicloadbalancers/publicloadbalancers.go | 6 +++--- pkg/cloud/azure/services/routetables/routetables.go | 2 +- pkg/cloud/azure/services/securitygroups/securitygroups.go | 6 +++--- pkg/cloud/azure/services/subnets/subnets.go | 8 ++++---- .../virtualmachineextensions/virtualmachineextensions.go | 6 +++--- .../azure/services/virtualmachines/virtualmachines.go | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pkg/cloud/azure/services/internalloadbalancers/internalloadbalancers.go b/pkg/cloud/azure/services/internalloadbalancers/internalloadbalancers.go index ce1c282bc12..3e040ad08d2 100644 --- a/pkg/cloud/azure/services/internalloadbalancers/internalloadbalancers.go +++ b/pkg/cloud/azure/services/internalloadbalancers/internalloadbalancers.go @@ -36,7 +36,7 @@ type Spec struct { IPAddress string } -// Get provides information about a route table. +// Get provides information about an internal load balancer. func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) { internalLBSpec, ok := spec.(*Spec) if !ok { @@ -52,7 +52,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) return lb, nil } -// CreateOrUpdate creates or updates a route table. +// CreateOrUpdate creates or updates an internal load balancer. func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { internalLBSpec, ok := spec.(*Spec) if !ok { @@ -150,7 +150,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { return err } -// Delete deletes the route table with the provided name. +// Delete deletes the internal load balancer with the provided name. func (s *Service) Delete(ctx context.Context, spec azure.Spec) error { internalLBSpec, ok := spec.(*Spec) if !ok { diff --git a/pkg/cloud/azure/services/publicips/publicips.go b/pkg/cloud/azure/services/publicips/publicips.go index 1bb205deb26..f7156dabed2 100644 --- a/pkg/cloud/azure/services/publicips/publicips.go +++ b/pkg/cloud/azure/services/publicips/publicips.go @@ -32,7 +32,7 @@ type Spec struct { Name string } -// Get provides information about a route table. +// Get provides information about a public ip. func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) { publicIPSpec, ok := spec.(*Spec) if !ok { @@ -47,7 +47,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) return publicIP, nil } -// CreateOrUpdate creates or updates a public ip +// CreateOrUpdate creates or updates a public ip. func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { publicIPSpec, ok := spec.(*Spec) if !ok { diff --git a/pkg/cloud/azure/services/publicloadbalancers/publicloadbalancers.go b/pkg/cloud/azure/services/publicloadbalancers/publicloadbalancers.go index 66689bede49..1787aa2c752 100644 --- a/pkg/cloud/azure/services/publicloadbalancers/publicloadbalancers.go +++ b/pkg/cloud/azure/services/publicloadbalancers/publicloadbalancers.go @@ -34,7 +34,7 @@ type Spec struct { PublicIPName string } -// Get provides information about a route table. +// Get provides information about a public load balancer. func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) { publicLBSpec, ok := spec.(*Spec) if !ok { @@ -49,7 +49,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) return lb, nil } -// CreateOrUpdate creates or updates a route table. +// CreateOrUpdate creates or updates a public load balancer. func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { publicLBSpec, ok := spec.(*Spec) if !ok { @@ -187,7 +187,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { return err } -// Delete deletes the route table with the provided name. +// Delete deletes the public load balancer with the provided name. func (s *Service) Delete(ctx context.Context, spec azure.Spec) error { publicLBSpec, ok := spec.(*Spec) if !ok { diff --git a/pkg/cloud/azure/services/routetables/routetables.go b/pkg/cloud/azure/services/routetables/routetables.go index 0aad26c5a4f..5be7dbb3dcc 100644 --- a/pkg/cloud/azure/services/routetables/routetables.go +++ b/pkg/cloud/azure/services/routetables/routetables.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure" ) -// Spec specification for routetable +// Spec specification for route table. type Spec struct { Name string } diff --git a/pkg/cloud/azure/services/securitygroups/securitygroups.go b/pkg/cloud/azure/services/securitygroups/securitygroups.go index 8eabdfea967..68b8ffcdf0a 100644 --- a/pkg/cloud/azure/services/securitygroups/securitygroups.go +++ b/pkg/cloud/azure/services/securitygroups/securitygroups.go @@ -32,7 +32,7 @@ type Spec struct { IsControlPlane bool } -// Get provides information about a route table. +// Get provides information about a network security group. func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) { nsgSpec, ok := spec.(*Spec) if !ok { @@ -47,7 +47,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) return securityGroup, nil } -// CreateOrUpdate creates or updates a route table. +// CreateOrUpdate creates or updates a network security group. func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { nsgSpec, ok := spec.(*Spec) if !ok { @@ -117,7 +117,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { return err } -// Delete deletes the route table with the provided name. +// Delete deletes the network security group with the provided name. func (s *Service) Delete(ctx context.Context, spec azure.Spec) error { nsgSpec, ok := spec.(*Spec) if !ok { diff --git a/pkg/cloud/azure/services/subnets/subnets.go b/pkg/cloud/azure/services/subnets/subnets.go index 12477c5866b..4cbffcbbffa 100644 --- a/pkg/cloud/azure/services/subnets/subnets.go +++ b/pkg/cloud/azure/services/subnets/subnets.go @@ -37,7 +37,7 @@ type Spec struct { SecurityGroupName string } -// Get provides information about a route table. +// Get provides information about a subnet. func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) { subnetSpec, ok := spec.(*Spec) if !ok { @@ -52,7 +52,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) return subnet, nil } -// CreateOrUpdate creates or updates a route table. +// CreateOrUpdate creates or updates a subnet. func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { subnetSpec, ok := spec.(*Spec) if !ok { @@ -115,7 +115,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { return err } -// Delete deletes the route table with the provided name. +// Delete deletes the subnet with the provided name. func (s *Service) Delete(ctx context.Context, spec azure.Spec) error { subnetSpec, ok := spec.(*Spec) if !ok { @@ -128,7 +128,7 @@ func (s *Service) Delete(ctx context.Context, spec azure.Spec) error { return nil } if err != nil { - return errors.Wrapf(err, "failed to delete route table %s in resource group %s", subnetSpec.Name, s.Scope.ClusterConfig.ResourceGroup) + return errors.Wrapf(err, "failed to delete subnet %s in resource group %s", subnetSpec.Name, s.Scope.ClusterConfig.ResourceGroup) } err = f.WaitForCompletionRef(ctx, s.Client.Client) diff --git a/pkg/cloud/azure/services/virtualmachineextensions/virtualmachineextensions.go b/pkg/cloud/azure/services/virtualmachineextensions/virtualmachineextensions.go index d3607fb7a11..8ec550846cc 100644 --- a/pkg/cloud/azure/services/virtualmachineextensions/virtualmachineextensions.go +++ b/pkg/cloud/azure/services/virtualmachineextensions/virtualmachineextensions.go @@ -33,7 +33,7 @@ type Spec struct { ScriptData string } -// Get provides information about a virtual network. +// Get provides information about a virtual machine extension. func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) { vmExtSpec, ok := spec.(*Spec) if !ok { @@ -48,7 +48,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) return vmExt, nil } -// CreateOrUpdate creates or updates a virtual network. +// CreateOrUpdate creates or updates a virtual machine extension. func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { vmExtSpec, ok := spec.(*Spec) if !ok { @@ -97,7 +97,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { return err } -// Delete deletes the virtual network with the provided name. +// Delete deletes the virtual machine extension with the provided name. func (s *Service) Delete(ctx context.Context, spec azure.Spec) error { vmExtSpec, ok := spec.(*Spec) if !ok { diff --git a/pkg/cloud/azure/services/virtualmachines/virtualmachines.go b/pkg/cloud/azure/services/virtualmachines/virtualmachines.go index 5e61da1e311..684e5437d0d 100644 --- a/pkg/cloud/azure/services/virtualmachines/virtualmachines.go +++ b/pkg/cloud/azure/services/virtualmachines/virtualmachines.go @@ -45,7 +45,7 @@ type Spec struct { OSDisk v1alpha1.OSDisk } -// Get provides information about a virtual network. +// Get provides information about a virtual machine. func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) { vmSpec, ok := spec.(*Spec) if !ok { @@ -60,7 +60,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) return vm, nil } -// CreateOrUpdate creates or updates a virtual network. +// CreateOrUpdate creates or updates a virtual machine. func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { vmSpec, ok := spec.(*Spec) if !ok { @@ -178,7 +178,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error { return err } -// Delete deletes the virtual network with the provided name. +// Delete deletes the virtual machine with the provided name. func (s *Service) Delete(ctx context.Context, spec azure.Spec) error { vmSpec, ok := spec.(*Spec) if !ok {