Skip to content

Commit 5f09ba2

Browse files
committed
Rename DependentResources to Resources
The intent of this structure is to hold all OpenStack resources created for the machine, including the server. 'dependent' was redundant.
1 parent cb99e17 commit 5f09ba2

20 files changed

+165
-165
lines changed

api/v1alpha5/conversion_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func TestConvertFrom(t *testing.T) {
8787
Spec: OpenStackMachineSpec{},
8888
ObjectMeta: metav1.ObjectMeta{
8989
Annotations: map[string]string{
90-
"cluster.x-k8s.io/conversion-data": "{\"spec\":{\"flavor\":\"\",\"image\":{}},\"status\":{\"dependentResources\":{},\"ready\":false,\"referencedResources\":{}}}",
90+
"cluster.x-k8s.io/conversion-data": `{"spec":{"flavor":"","image":{}},"status":{"ready":false,"referencedResources":{},"resources":{}}}`,
9191
},
9292
},
9393
},

api/v1alpha5/zz_generated.conversion.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha6/openstackcluster_conversion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@ func restorev1beta1ClusterStatus(previous *infrav1.OpenStackClusterStatus, dst *
370370
if previous.Bastion != nil {
371371
dst.Bastion.ReferencedResources = previous.Bastion.ReferencedResources
372372
}
373-
if previous.Bastion != nil && previous.Bastion.DependentResources.Ports != nil {
374-
dst.Bastion.DependentResources.Ports = previous.Bastion.DependentResources.Ports
373+
if previous.Bastion != nil && previous.Bastion.Resources.Ports != nil {
374+
dst.Bastion.Resources.Ports = previous.Bastion.Resources.Ports
375375
}
376376
}
377377

api/v1alpha6/openstackmachine_conversion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ var v1beta1OpenStackMachineRestorer = conversion.RestorerFor[*infrav1.OpenStackM
9090
restorev1beta1MachineSpec,
9191
),
9292
"depresources": conversion.UnconditionalFieldRestorer(
93-
func(c *infrav1.OpenStackMachine) *infrav1.DependentMachineResources {
94-
return &c.Status.DependentResources
93+
func(c *infrav1.OpenStackMachine) *infrav1.MachineResources {
94+
return &c.Status.Resources
9595
},
9696
),
9797
// No equivalent in v1alpha6

api/v1alpha6/zz_generated.conversion.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha7/openstackcluster_conversion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ func restorev1beta1ClusterStatus(previous *infrav1.OpenStackClusterStatus, dst *
353353
dst.Bastion.ReferencedResources = previous.Bastion.ReferencedResources
354354
}
355355

356-
if previous.Bastion != nil && previous.Bastion.DependentResources.Ports != nil {
357-
dst.Bastion.DependentResources.Ports = previous.Bastion.DependentResources.Ports
356+
if previous.Bastion != nil && previous.Bastion.Resources.Ports != nil {
357+
dst.Bastion.Resources.Ports = previous.Bastion.Resources.Ports
358358
}
359359
}
360360

api/v1alpha7/openstackmachine_conversion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ var v1beta1OpenStackMachineRestorer = conversion.RestorerFor[*infrav1.OpenStackM
7777
restorev1beta1MachineSpec,
7878
),
7979
"depresources": conversion.UnconditionalFieldRestorer(
80-
func(c *infrav1.OpenStackMachine) *infrav1.DependentMachineResources {
81-
return &c.Status.DependentResources
80+
func(c *infrav1.OpenStackMachine) *infrav1.MachineResources {
81+
return &c.Status.Resources
8282
},
8383
),
8484
// No equivalent in v1alpha7

api/v1alpha7/zz_generated.conversion.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta1/openstackmachine_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ type OpenStackMachineStatus struct {
129129
// ReferencedResources contains resolved references to resources that the machine depends on.
130130
ReferencedResources ReferencedMachineResources `json:"referencedResources,omitempty"`
131131

132-
// DependentResources contains resolved dependent resources that were created by the machine.
133-
DependentResources DependentMachineResources `json:"dependentResources,omitempty"`
132+
// Resources contains references to OpenStack resources created for the machine.
133+
Resources MachineResources `json:"resources,omitempty"`
134134

135135
FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"`
136136

api/v1beta1/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ type BastionStatus struct {
365365
IP string `json:"ip,omitempty"`
366366
FloatingIP string `json:"floatingIP,omitempty"`
367367
ReferencedResources ReferencedMachineResources `json:"referencedResources,omitempty"`
368-
DependentResources DependentMachineResources `json:"dependentResources,omitempty"`
368+
Resources MachineResources `json:"resources,omitempty"`
369369
}
370370

371371
type RootVolume struct {
@@ -673,7 +673,7 @@ type ReferencedMachineResources struct {
673673
Ports []ResolvedPortSpec `json:"ports,omitempty"`
674674
}
675675

676-
type DependentMachineResources struct {
676+
type MachineResources struct {
677677
// Ports is the status of the ports created for the machine.
678678
// +optional
679679
Ports []PortStatus `json:"ports,omitempty"`

0 commit comments

Comments
 (0)