Skip to content

Commit 186c5a7

Browse files
committed
rename Instance.AccessSubnet to Subnet
1 parent cf21de2 commit 186c5a7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

api/v1alpha3/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ type Instance struct {
132132
FailureDomain string `json:"failureDomain,omitempty"`
133133
SecurityGroups *[]string `json:"securigyGroups,omitempty"`
134134
Networks *[]Network `json:"networks,omitempty"`
135-
AccessSubnet string `json:"accessSubnet,omitempty"`
135+
Subnet string `json:"subnet,omitempty"`
136136
Tags []string `json:"tags,omitempty"`
137137
Image string `json:"image,omitempty"`
138138
Flavor string `json:"flavor,omitempty"`

pkg/cloud/services/compute/instance.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (s *Service) InstanceCreate(clusterName string, machine *clusterv1.Machine,
8080
ConfigDrive: openStackMachine.Spec.ConfigDrive,
8181
FailureDomain: *machine.Spec.FailureDomain,
8282
RootVolume: openStackMachine.Spec.RootVolume,
83-
AccessSubnet: openStackMachine.Spec.Subnet,
83+
Subnet: openStackMachine.Spec.Subnet,
8484
}
8585

8686
if openStackMachine.Spec.Trunk {
@@ -185,7 +185,7 @@ func createInstance(is *Service, clusterName string, i *infrav1.Instance) (*infr
185185
}
186186

187187
for _, fip := range port.FixedIPs {
188-
if fip.SubnetID == i.AccessSubnet {
188+
if fip.SubnetID == i.Subnet {
189189
accessIPv4 = fip.IPAddress
190190
}
191191
}
@@ -229,8 +229,8 @@ func createInstance(is *Service, clusterName string, i *infrav1.Instance) (*infr
229229
}
230230
}
231231
}
232-
if i.AccessSubnet != "" && accessIPv4 == "" {
233-
return nil, fmt.Errorf("no ports with fixed IPs found on AccessSubnet \"%s\"", i.AccessSubnet)
232+
if i.Subnet != "" && accessIPv4 == "" {
233+
return nil, fmt.Errorf("no ports with fixed IPs found on Subnet \"%s\"", i.Subnet)
234234
}
235235

236236
var serverCreateOpts servers.CreateOptsBuilder = servers.CreateOpts{

0 commit comments

Comments
 (0)