Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit ea40055

Browse files
committed
fix: set allowed enums for Nutanix resource types
1 parent e5d9350 commit ea40055

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

api/v1alpha1/nutanix_node_types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
88

99
capxv1 "github.com/d2iq-labs/cluster-api-runtime-extensions-nutanix/api/external/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1"
10+
"github.com/d2iq-labs/cluster-api-runtime-extensions-nutanix/api/variables"
1011
)
1112

1213
type NutanixNodeSpec struct {
@@ -82,6 +83,10 @@ func (NutanixIdentifierType) VariableSchema() clusterv1.VariableSchema {
8283
OpenAPIV3Schema: clusterv1.JSONSchemaProps{
8384
Type: "string",
8485
Description: "NutanixIdentifierType is an enumeration of different resource identifier types",
86+
Enum: variables.MustMarshalValuesToEnumJSON(
87+
capxv1.NutanixIdentifierUUID,
88+
capxv1.NutanixIdentifierName,
89+
),
8590
},
8691
}
8792
}
@@ -94,6 +99,10 @@ func (NutanixBootType) VariableSchema() clusterv1.VariableSchema {
9499
OpenAPIV3Schema: clusterv1.JSONSchemaProps{
95100
Type: "string",
96101
Description: "NutanixBootType is an enumeration of different boot types.",
102+
Enum: variables.MustMarshalValuesToEnumJSON(
103+
capxv1.NutanixBootTypeLegacy,
104+
capxv1.NutanixBootTypeUEFI,
105+
),
97106
},
98107
}
99108
}

0 commit comments

Comments
 (0)