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

Commit 8380c67

Browse files
committed
fix: bring back NutanixMachineDetails
1 parent b75d42f commit 8380c67

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

api/v1alpha1/nutanix_node_types.go

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,23 @@ import (
1212
)
1313

1414
type NutanixNodeSpec struct {
15+
MachineDetails NutanixMachineDetails `json:"machineDetails"`
16+
}
17+
18+
func (NutanixNodeSpec) VariableSchema() clusterv1.VariableSchema {
19+
return clusterv1.VariableSchema{
20+
OpenAPIV3Schema: clusterv1.JSONSchemaProps{
21+
Description: "Nutanix Node configuration",
22+
Type: "object",
23+
Properties: map[string]clusterv1.JSONSchemaProps{
24+
"machineDetails": NutanixMachineDetails{}.VariableSchema().OpenAPIV3Schema,
25+
},
26+
Required: []string{"machineDetails"},
27+
},
28+
}
29+
}
30+
31+
type NutanixMachineDetails struct {
1532
// vcpusPerSocket is the number of vCPUs per socket of the VM
1633
VCPUsPerSocket int32 `json:"vcpusPerSocket"`
1734

@@ -45,10 +62,10 @@ type NutanixNodeSpec struct {
4562
SystemDiskSize resource.Quantity `json:"systemDiskSize"`
4663
}
4764

48-
func (NutanixNodeSpec) VariableSchema() clusterv1.VariableSchema {
65+
func (NutanixMachineDetails) VariableSchema() clusterv1.VariableSchema {
4966
return clusterv1.VariableSchema{
5067
OpenAPIV3Schema: clusterv1.JSONSchemaProps{
51-
Description: "Nutanix Node configuration",
68+
Description: "Nutanix Machine configuration",
5269
Type: "object",
5370
Properties: map[string]clusterv1.JSONSchemaProps{
5471
"vcpusPerSocket": {

api/v1alpha1/zz_generated.deepcopy.go

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

0 commit comments

Comments
 (0)