Skip to content

Commit f79264b

Browse files
fix(deps): udpate CAPX to v1.7.0-beta.5 (#1241)
includes fixes for reconciling failure domain status on nutanixmachine after clusterctl move.
1 parent ada4eac commit f79264b

File tree

4 files changed

+41
-3
lines changed

4 files changed

+41
-3
lines changed

api/external/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanix_types.go

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ limitations under the License.
1616

1717
package v1beta1
1818

19+
import "fmt"
20+
1921
// NutanixIdentifierType is an enumeration of different resource identifier types.
2022
type NutanixIdentifierType string
2123

@@ -84,6 +86,22 @@ func (nri NutanixResourceIdentifier) String() string {
8486
return ""
8587
}
8688

89+
// DisplayString returns a human-readable string representation of the NutanixResourceIdentifier
90+
// that includes both the type and value, suitable for error messages and logging.
91+
func (nri NutanixResourceIdentifier) DisplayString() string {
92+
switch nri.Type {
93+
case NutanixIdentifierUUID:
94+
if nri.UUID != nil {
95+
return fmt.Sprintf("uuid=%q", *nri.UUID)
96+
}
97+
case NutanixIdentifierName:
98+
if nri.Name != nil {
99+
return fmt.Sprintf("name=%q", *nri.Name)
100+
}
101+
}
102+
return "unknown"
103+
}
104+
87105
func (nri NutanixResourceIdentifier) IsUUID() bool {
88106
return nri.Type == NutanixIdentifierUUID && nri.UUID != nil
89107
}
@@ -92,6 +110,25 @@ func (nri NutanixResourceIdentifier) IsName() bool {
92110
return nri.Type == NutanixIdentifierName && nri.Name != nil
93111
}
94112

113+
// EqualTo checks if two NutanixResourceIdentifiers are equal based on their type and value.
114+
func (nri NutanixResourceIdentifier) EqualTo(other *NutanixResourceIdentifier) bool {
115+
if other == nil {
116+
return false
117+
}
118+
if nri.Type != other.Type {
119+
return false
120+
}
121+
122+
switch nri.Type {
123+
case NutanixIdentifierName:
124+
return nri.Name != nil && other.Name != nil && *nri.Name == *other.Name
125+
case NutanixIdentifierUUID:
126+
return nri.UUID != nil && other.UUID != nil && *nri.UUID == *other.UUID
127+
}
128+
129+
return false
130+
}
131+
95132
type NutanixCategoryIdentifier struct {
96133
// key is the Key of category in PC.
97134
// +optional

api/external/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanixfailuredomain_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ type NutanixFailureDomainStatus struct {
5656
// +kubebuilder:resource:path=nutanixfailuredomains,shortName=nfd,scope=Namespaced,categories=cluster-api
5757
// +kubebuilder:subresource:status
5858
// +kubebuilder:storageversion
59+
// +kubebuilder:metadata:labels=clusterctl.cluster.x-k8s.io/move=
5960

6061
// NutanixFailureDomain is the Schema for the NutanixFailureDomain API.
6162
type NutanixFailureDomain struct {

hack/third-party/capx/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ go 1.24.0
77

88
toolchain go1.24.3
99

10-
require github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.0-beta.4
10+
require github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.0-beta.5
1111

1212
require (
1313
github.com/emicklei/go-restful/v3 v3.12.2 // indirect

hack/third-party/capx/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/
7676
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4=
7777
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
7878
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
79-
github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.0-beta.4 h1:SNfZlG/AJ/RUpEij0Lu1XbrIoOxk+tZvzQktFdPkGYc=
80-
github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.0-beta.4/go.mod h1:6AJwae8W/nGmITlnuTnvMxCxxztctEAUJulxC9z/jgU=
79+
github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.0-beta.5 h1:P3GCQbY5zynEgQLEn8KwG8ZicXSoX2z8ShFUnwkgE1s=
80+
github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.0-beta.5/go.mod h1:6AJwae8W/nGmITlnuTnvMxCxxztctEAUJulxC9z/jgU=
8181
github.com/nutanix-cloud-native/prism-go-client v0.5.0 h1:aSNuKDOK7+q676MQyetYXcySY41IjSvN2UmrDIU3+6s=
8282
github.com/nutanix-cloud-native/prism-go-client v0.5.0/go.mod h1:QhLX+sEep0cStzHVYU6mPgIlnA8U3DySskagrbDprRk=
8383
github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus=

0 commit comments

Comments
 (0)