Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: align comments to behavior #179

Merged
merged 1 commit into from
Apr 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cloud/azure/services/publicips/publicips.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/azure/services/routetables/routetables.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/cloud/azure/services/securitygroups/securitygroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions pkg/cloud/azure/services/subnets/subnets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions pkg/cloud/azure/services/virtualmachines/virtualmachines.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down