From 51292b6dd0d3de1bd448576f47fead181756fe36 Mon Sep 17 00:00:00 2001 From: Deng Yun Date: Wed, 26 Jun 2024 16:30:19 +0800 Subject: [PATCH] Format subnetset types filed and fix subnet types typo 1.Format subnetset types files to align struct var fields 2.Fix subnet type networkaddresses filed name typo --- build/yaml/crd/nsx.vmware.com_subnets.yaml | 2 +- pkg/apis/nsx.vmware.com/v1alpha1/subnet_types.go | 2 +- pkg/apis/nsx.vmware.com/v1alpha1/subnetset_types.go | 2 +- pkg/apis/v1alpha1/subnet_types.go | 2 +- pkg/apis/v1alpha1/subnetset_types.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/yaml/crd/nsx.vmware.com_subnets.yaml b/build/yaml/crd/nsx.vmware.com_subnets.yaml index fe7898881..4b3af9df8 100644 --- a/build/yaml/crd/nsx.vmware.com_subnets.yaml +++ b/build/yaml/crd/nsx.vmware.com_subnets.yaml @@ -128,7 +128,7 @@ spec: items: type: string type: array - networkAddreses: + networkAddresses: items: type: string type: array diff --git a/pkg/apis/nsx.vmware.com/v1alpha1/subnet_types.go b/pkg/apis/nsx.vmware.com/v1alpha1/subnet_types.go index d84391965..47553cd10 100644 --- a/pkg/apis/nsx.vmware.com/v1alpha1/subnet_types.go +++ b/pkg/apis/nsx.vmware.com/v1alpha1/subnet_types.go @@ -31,7 +31,7 @@ type SubnetSpec struct { // SubnetStatus defines the observed state of Subnet. type SubnetStatus struct { NSXResourcePath string `json:"nsxResourcePath,omitempty"` - NetworkAddresses []string `json:"networkAddreses,omitempty"` + NetworkAddresses []string `json:"networkAddresses,omitempty"` GatewayAddresses []string `json:"gatewayAddresses,omitempty"` DHCPServerAddresses []string `json:"DHCPServerAddresses,omitempty"` Conditions []Condition `json:"conditions,omitempty"` diff --git a/pkg/apis/nsx.vmware.com/v1alpha1/subnetset_types.go b/pkg/apis/nsx.vmware.com/v1alpha1/subnetset_types.go index 23df555bb..3d8883355 100644 --- a/pkg/apis/nsx.vmware.com/v1alpha1/subnetset_types.go +++ b/pkg/apis/nsx.vmware.com/v1alpha1/subnetset_types.go @@ -24,7 +24,7 @@ type SubnetSetSpec struct { // SubnetInfo defines the observed state of a single Subnet of a SubnetSet. type SubnetInfo struct { - NSXResourcePath string `json:"nsxResourcePath,omitempty"` + NSXResourcePath string `json:"nsxResourcePath,omitempty"` NetworkAddresses []string `json:"networkAddresses,omitempty"` GatewayAddresses []string `json:"gatewayAddresses,omitempty"` DHCPServerAddresses []string `json:"DHCPServerAddresses,omitempty"` diff --git a/pkg/apis/v1alpha1/subnet_types.go b/pkg/apis/v1alpha1/subnet_types.go index d84391965..47553cd10 100644 --- a/pkg/apis/v1alpha1/subnet_types.go +++ b/pkg/apis/v1alpha1/subnet_types.go @@ -31,7 +31,7 @@ type SubnetSpec struct { // SubnetStatus defines the observed state of Subnet. type SubnetStatus struct { NSXResourcePath string `json:"nsxResourcePath,omitempty"` - NetworkAddresses []string `json:"networkAddreses,omitempty"` + NetworkAddresses []string `json:"networkAddresses,omitempty"` GatewayAddresses []string `json:"gatewayAddresses,omitempty"` DHCPServerAddresses []string `json:"DHCPServerAddresses,omitempty"` Conditions []Condition `json:"conditions,omitempty"` diff --git a/pkg/apis/v1alpha1/subnetset_types.go b/pkg/apis/v1alpha1/subnetset_types.go index 23df555bb..3d8883355 100644 --- a/pkg/apis/v1alpha1/subnetset_types.go +++ b/pkg/apis/v1alpha1/subnetset_types.go @@ -24,7 +24,7 @@ type SubnetSetSpec struct { // SubnetInfo defines the observed state of a single Subnet of a SubnetSet. type SubnetInfo struct { - NSXResourcePath string `json:"nsxResourcePath,omitempty"` + NSXResourcePath string `json:"nsxResourcePath,omitempty"` NetworkAddresses []string `json:"networkAddresses,omitempty"` GatewayAddresses []string `json:"gatewayAddresses,omitempty"` DHCPServerAddresses []string `json:"DHCPServerAddresses,omitempty"`