Skip to content

Commit 9b929d1

Browse files
committed
Fix linting
1 parent 3d4b6c1 commit 9b929d1

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

internal/service/vmservice/ip.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ func handleDefaultDevice(ctx context.Context, machineScope *scope.MachineScope,
170170
return false, nil
171171
}
172172

173-
// nolint
174173
func handleAdditionalDevices(ctx context.Context, machineScope *scope.MachineScope, addresses map[string]infrav1.IPAddress) (bool, error) {
175174
// additional network devices.
176175
for _, net := range machineScope.ProxmoxMachine.Spec.Network.AdditionalDevices {
@@ -202,7 +201,6 @@ func handleAdditionalDevices(ctx context.Context, machineScope *scope.MachineSco
202201
addresses[net.Name] = infrav1.IPAddress{
203202
IPV6: "DHCP",
204203
}
205-
return false, nil
206204
} else {
207205
ip, err := handleIPAddressForDevice(ctx, machineScope, net.Name, infrav1.IPV6Format, net.IPv6PoolRef)
208206
if err != nil || ip == "" {

internal/service/vmservice/vm.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,7 @@ func reconcileMachineAddresses(ctx context.Context, scope *scope.MachineScope) e
242242
return nil
243243
}
244244

245-
// getMachineAddresses returns the ip addresses for the machine
246-
// nolint
245+
// getMachineAddresses returns the ip addresses for the machine.
247246
func getMachineAddresses(ctx context.Context, scope *scope.MachineScope) ([]clusterv1.MachineAddress, error) {
248247
if !machineHasIPAddress(scope.ProxmoxMachine) {
249248
return nil, errors.New("machine does not yet have an ip address")
@@ -297,14 +296,13 @@ func getMachineAddresses(ctx context.Context, scope *scope.MachineScope) ([]clus
297296

298297
setMachineAddresses(scope, &addresses, ipv4, ipv6)
299298
return addresses, nil
300-
} else {
301-
if scope.InfraCluster.ProxmoxCluster.Spec.IPv4Config != nil {
302-
ipv4 = scope.ProxmoxMachine.Status.IPAddresses[infrav1alpha1.DefaultNetworkDevice].IPV4
303-
}
299+
}
300+
if scope.InfraCluster.ProxmoxCluster.Spec.IPv4Config != nil {
301+
ipv4 = scope.ProxmoxMachine.Status.IPAddresses[infrav1alpha1.DefaultNetworkDevice].IPV4
302+
}
304303

305-
if scope.InfraCluster.ProxmoxCluster.Spec.IPv6Config != nil {
306-
ipv6 = scope.ProxmoxMachine.Status.IPAddresses[infrav1alpha1.DefaultNetworkDevice].IPV6
307-
}
304+
if scope.InfraCluster.ProxmoxCluster.Spec.IPv6Config != nil {
305+
ipv6 = scope.ProxmoxMachine.Status.IPAddresses[infrav1alpha1.DefaultNetworkDevice].IPV6
308306
}
309307

310308
setMachineAddresses(scope, &addresses, ipv4, ipv6)

0 commit comments

Comments
 (0)