Skip to content

Commit 054530e

Browse files
Redundant calls and formatting
1 parent 27ac17f commit 054530e

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

docs/book/src/clustercloudstack/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ clusterctl generate cluster capc-cluster --flavor with-kube-vip > capc-cluster-s
146146
##### Option for Multiple Networks
147147
148148
Multiple networks can be specified at each node configuration in CloudStackMachineTemplate.
149-
This is configured under spec.template.spec.networks, where you can list one or more networks by name or id,
149+
This is configured under `spec.template.spec.networks`, where you can list one or more networks by name or id,
150150
and optionally assign static IP addresses.
151151
152-
When defining multiple networks for a VM in CAPC, the first network listed under spec.template.spec.networks is treated as
153-
the primary network. This primary network must match the network defined in the failure domain’s zone (failureDomains[].zone.network),
152+
When defining multiple networks for a VM in CAPC, the first network listed under `spec.template.spec.networks` is treated as
153+
the primary network. This primary network must match the network defined in the failure domain’s zone (`failureDomains[].zone.network`),
154154
either by name or by ID. It is used as the default NIC and is critical for VM boot and cluster communication.
155155
156156
Any networks listed after the primary are considered extra networks. These extra networks are attached as secondary NICs

pkg/cloud/instance.go

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -385,17 +385,9 @@ func (c *client) buildIPToNetworkList(csMachine *infrav1.CloudStackMachine) ([]m
385385
return nil, err
386386
}
387387

388-
var entry map[string]string
389-
if net.IP != "" {
390-
entry, err = c.buildIPEntry(resolvedNet, net.IP)
391-
if err != nil {
392-
return nil, err
393-
}
394-
} else {
395-
entry, err = c.buildIPEntry(resolvedNet, "")
396-
if err != nil {
397-
return nil, err
398-
}
388+
entry, err := c.buildIPEntry(resolvedNet, net.IP)
389+
if err != nil {
390+
return nil, err
399391
}
400392

401393
ipToNetworkList = append(ipToNetworkList, entry)

0 commit comments

Comments
 (0)