Skip to content

Commit f347984

Browse files
alexeldeibk8s-ci-robot
authored andcommitted
fix: align comments to behavior (#179)
1 parent 0b7cf77 commit f347984

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

pkg/cloud/azure/services/internalloadbalancers/internalloadbalancers.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Spec struct {
3636
IPAddress string
3737
}
3838

39-
// Get provides information about a route table.
39+
// Get provides information about an internal load balancer.
4040
func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) {
4141
internalLBSpec, ok := spec.(*Spec)
4242
if !ok {
@@ -52,7 +52,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error)
5252
return lb, nil
5353
}
5454

55-
// CreateOrUpdate creates or updates a route table.
55+
// CreateOrUpdate creates or updates an internal load balancer.
5656
func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
5757
internalLBSpec, ok := spec.(*Spec)
5858
if !ok {
@@ -150,7 +150,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
150150
return err
151151
}
152152

153-
// Delete deletes the route table with the provided name.
153+
// Delete deletes the internal load balancer with the provided name.
154154
func (s *Service) Delete(ctx context.Context, spec azure.Spec) error {
155155
internalLBSpec, ok := spec.(*Spec)
156156
if !ok {

pkg/cloud/azure/services/publicips/publicips.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type Spec struct {
3232
Name string
3333
}
3434

35-
// Get provides information about a route table.
35+
// Get provides information about a public ip.
3636
func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) {
3737
publicIPSpec, ok := spec.(*Spec)
3838
if !ok {
@@ -47,7 +47,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error)
4747
return publicIP, nil
4848
}
4949

50-
// CreateOrUpdate creates or updates a public ip
50+
// CreateOrUpdate creates or updates a public ip.
5151
func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
5252
publicIPSpec, ok := spec.(*Spec)
5353
if !ok {

pkg/cloud/azure/services/publicloadbalancers/publicloadbalancers.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type Spec struct {
3434
PublicIPName string
3535
}
3636

37-
// Get provides information about a route table.
37+
// Get provides information about a public load balancer.
3838
func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) {
3939
publicLBSpec, ok := spec.(*Spec)
4040
if !ok {
@@ -49,7 +49,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error)
4949
return lb, nil
5050
}
5151

52-
// CreateOrUpdate creates or updates a route table.
52+
// CreateOrUpdate creates or updates a public load balancer.
5353
func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
5454
publicLBSpec, ok := spec.(*Spec)
5555
if !ok {
@@ -187,7 +187,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
187187
return err
188188
}
189189

190-
// Delete deletes the route table with the provided name.
190+
// Delete deletes the public load balancer with the provided name.
191191
func (s *Service) Delete(ctx context.Context, spec azure.Spec) error {
192192
publicLBSpec, ok := spec.(*Spec)
193193
if !ok {

pkg/cloud/azure/services/routetables/routetables.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure"
2727
)
2828

29-
// Spec specification for routetable
29+
// Spec specification for route table.
3030
type Spec struct {
3131
Name string
3232
}

pkg/cloud/azure/services/securitygroups/securitygroups.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type Spec struct {
3232
IsControlPlane bool
3333
}
3434

35-
// Get provides information about a route table.
35+
// Get provides information about a network security group.
3636
func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) {
3737
nsgSpec, ok := spec.(*Spec)
3838
if !ok {
@@ -47,7 +47,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error)
4747
return securityGroup, nil
4848
}
4949

50-
// CreateOrUpdate creates or updates a route table.
50+
// CreateOrUpdate creates or updates a network security group.
5151
func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
5252
nsgSpec, ok := spec.(*Spec)
5353
if !ok {
@@ -117,7 +117,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
117117
return err
118118
}
119119

120-
// Delete deletes the route table with the provided name.
120+
// Delete deletes the network security group with the provided name.
121121
func (s *Service) Delete(ctx context.Context, spec azure.Spec) error {
122122
nsgSpec, ok := spec.(*Spec)
123123
if !ok {

pkg/cloud/azure/services/subnets/subnets.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type Spec struct {
3737
SecurityGroupName string
3838
}
3939

40-
// Get provides information about a route table.
40+
// Get provides information about a subnet.
4141
func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) {
4242
subnetSpec, ok := spec.(*Spec)
4343
if !ok {
@@ -52,7 +52,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error)
5252
return subnet, nil
5353
}
5454

55-
// CreateOrUpdate creates or updates a route table.
55+
// CreateOrUpdate creates or updates a subnet.
5656
func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
5757
subnetSpec, ok := spec.(*Spec)
5858
if !ok {
@@ -115,7 +115,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
115115
return err
116116
}
117117

118-
// Delete deletes the route table with the provided name.
118+
// Delete deletes the subnet with the provided name.
119119
func (s *Service) Delete(ctx context.Context, spec azure.Spec) error {
120120
subnetSpec, ok := spec.(*Spec)
121121
if !ok {
@@ -128,7 +128,7 @@ func (s *Service) Delete(ctx context.Context, spec azure.Spec) error {
128128
return nil
129129
}
130130
if err != nil {
131-
return errors.Wrapf(err, "failed to delete route table %s in resource group %s", subnetSpec.Name, s.Scope.ClusterConfig.ResourceGroup)
131+
return errors.Wrapf(err, "failed to delete subnet %s in resource group %s", subnetSpec.Name, s.Scope.ClusterConfig.ResourceGroup)
132132
}
133133

134134
err = f.WaitForCompletionRef(ctx, s.Client.Client)

pkg/cloud/azure/services/virtualmachineextensions/virtualmachineextensions.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type Spec struct {
3333
ScriptData string
3434
}
3535

36-
// Get provides information about a virtual network.
36+
// Get provides information about a virtual machine extension.
3737
func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) {
3838
vmExtSpec, ok := spec.(*Spec)
3939
if !ok {
@@ -48,7 +48,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error)
4848
return vmExt, nil
4949
}
5050

51-
// CreateOrUpdate creates or updates a virtual network.
51+
// CreateOrUpdate creates or updates a virtual machine extension.
5252
func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
5353
vmExtSpec, ok := spec.(*Spec)
5454
if !ok {
@@ -97,7 +97,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
9797
return err
9898
}
9999

100-
// Delete deletes the virtual network with the provided name.
100+
// Delete deletes the virtual machine extension with the provided name.
101101
func (s *Service) Delete(ctx context.Context, spec azure.Spec) error {
102102
vmExtSpec, ok := spec.(*Spec)
103103
if !ok {

pkg/cloud/azure/services/virtualmachines/virtualmachines.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type Spec struct {
4545
OSDisk v1alpha1.OSDisk
4646
}
4747

48-
// Get provides information about a virtual network.
48+
// Get provides information about a virtual machine.
4949
func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error) {
5050
vmSpec, ok := spec.(*Spec)
5151
if !ok {
@@ -60,7 +60,7 @@ func (s *Service) Get(ctx context.Context, spec azure.Spec) (interface{}, error)
6060
return vm, nil
6161
}
6262

63-
// CreateOrUpdate creates or updates a virtual network.
63+
// CreateOrUpdate creates or updates a virtual machine.
6464
func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
6565
vmSpec, ok := spec.(*Spec)
6666
if !ok {
@@ -178,7 +178,7 @@ func (s *Service) CreateOrUpdate(ctx context.Context, spec azure.Spec) error {
178178
return err
179179
}
180180

181-
// Delete deletes the virtual network with the provided name.
181+
// Delete deletes the virtual machine with the provided name.
182182
func (s *Service) Delete(ctx context.Context, spec azure.Spec) error {
183183
vmSpec, ok := spec.(*Spec)
184184
if !ok {

0 commit comments

Comments
 (0)