@@ -21,7 +21,7 @@ func (NutanixSpec) VariableSchema() clusterv1.VariableSchema {
21
21
Properties : map [string ]clusterv1.JSONSchemaProps {
22
22
"prismCentralEndpoint" : NutanixPrismCentralEndpointSpec {}.VariableSchema ().OpenAPIV3Schema ,
23
23
"controlPlaneEndpoint" : NutanixControlPlaneEndpointSpec {}.VariableSchema ().OpenAPIV3Schema ,
24
- // TODO "failureDomains": []NutanixFailureDomain {}.VariableSchema().OpenAPIV3Schema,
24
+ "failureDomains" : NutanixFailureDomains {}.VariableSchema ().OpenAPIV3Schema ,
25
25
},
26
26
},
27
27
}
@@ -85,6 +85,20 @@ func (NutanixControlPlaneEndpointSpec) VariableSchema() clusterv1.VariableSchema
85
85
}
86
86
}
87
87
88
+ type NutanixFailureDomains []NutanixFailureDomain
89
+
90
+ func (NutanixFailureDomains ) VariableSchema () clusterv1.VariableSchema {
91
+ resourceSchema := NutanixFailureDomain {}.VariableSchema ().OpenAPIV3Schema
92
+
93
+ return clusterv1.VariableSchema {
94
+ OpenAPIV3Schema : clusterv1.JSONSchemaProps {
95
+ Description : "Nutanix failure domains" ,
96
+ Type : "array" ,
97
+ Items : & resourceSchema ,
98
+ },
99
+ }
100
+ }
101
+
88
102
type NutanixFailureDomain struct {
89
103
// name defines the unique name of a failure domain.
90
104
// Name is required and must be at most 64 characters in length.
@@ -112,16 +126,32 @@ func (NutanixFailureDomain) VariableSchema() clusterv1.VariableSchema {
112
126
OpenAPIV3Schema : clusterv1.JSONSchemaProps {
113
127
Description : "Nutanix Failure Domain" ,
114
128
Type : "object" ,
115
- Properties : map [string ]clusterv1.JSONSchemaProps {
129
+ Properties : map [string ]clusterv1.JSONSchemaProps {
116
130
"name" : {
117
131
Description : "name of failure domain" ,
118
132
Type : "string" ,
119
133
},
120
- "cluster" : {
121
- Description : "" ,
122
- Type : "integer" ,
134
+ "cluster" : NutanixResourceIdentifier {}.VariableSchema ().OpenAPIV3Schema ,
135
+ "subnets" : NutanixResourceIdentifiers {}.VariableSchema ().OpenAPIV3Schema ,
136
+ "controlPlane" : {
137
+ Description : "indicates if a failure domain is suited for control plane nodes" ,
138
+ Type : "boolean" ,
123
139
},
124
- },
140
+ },
141
+ },
142
+ }
143
+ }
144
+
145
+ type NutanixResourceIdentifiers []NutanixResourceIdentifier
146
+
147
+ func (NutanixResourceIdentifiers ) VariableSchema () clusterv1.VariableSchema {
148
+ resourceSchema := NutanixResourceIdentifier {}.VariableSchema ().OpenAPIV3Schema
149
+
150
+ return clusterv1.VariableSchema {
151
+ OpenAPIV3Schema : clusterv1.JSONSchemaProps {
152
+ Description : "Nutanix resource identifier" ,
153
+ Type : "array" ,
154
+ Items : & resourceSchema ,
125
155
},
126
156
}
127
157
}
0 commit comments