|
8 | 8 | "github.com/validator-labs/validator/pkg/plugins" |
9 | 9 | "github.com/validator-labs/validator/pkg/validationrule" |
10 | 10 |
|
| 11 | + "github.com/validator-labs/validator-plugin-vsphere/api/vcenter" |
11 | 12 | "github.com/validator-labs/validator-plugin-vsphere/pkg/constants" |
12 | | - "github.com/validator-labs/validator-plugin-vsphere/pkg/vsphere" |
13 | 13 | ) |
14 | 14 |
|
15 | 15 | // VsphereValidatorSpec defines the desired state of VsphereValidator |
@@ -40,8 +40,8 @@ type VsphereAuth struct { |
40 | 40 | // SecretName is the name of the secret containing the vSphere credentials |
41 | 41 | SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"` |
42 | 42 |
|
43 | | - // Account is the vSphere account to use for authentication |
44 | | - Account *vsphere.Account `json:"account,omitempty" yaml:"account,omitempty"` |
| 43 | + // Account is the vCenter account to use for authentication |
| 44 | + Account *vcenter.Account `json:"account,omitempty" yaml:"account,omitempty"` |
45 | 45 | } |
46 | 46 |
|
47 | 47 | // NTPValidationRule defines the NTP validation rule |
@@ -81,8 +81,7 @@ type ComputeResourceRule struct { |
81 | 81 | ClusterName string `json:"clusterName,omitempty" yaml:"clusterName"` |
82 | 82 |
|
83 | 83 | // Scope is the scope of the compute resource validation rule |
84 | | - // +kubebuilder:validation:Enum=cluster;host;resourcepool |
85 | | - Scope string `json:"scope" yaml:"scope"` |
| 84 | + Scope vcenter.Entity `json:"scope" yaml:"scope"` |
86 | 85 |
|
87 | 86 | // EntityName is the name of the entity to validate |
88 | 87 | EntityName string `json:"entityName" yaml:"entityName"` |
@@ -117,8 +116,7 @@ type PrivilegeValidationRule struct { |
117 | 116 | ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"` |
118 | 117 |
|
119 | 118 | // EntityType is the type of the entity to validate |
120 | | - // +kubebuilder:validation:Enum=cluster;datacenter;datastore;folder;host;network;resourcepool;vapp;vcenterroot;vds;vm |
121 | | - EntityType string `json:"entityType" yaml:"entityType"` |
| 119 | + EntityType vcenter.Entity `json:"entityType" yaml:"entityType"` |
122 | 120 |
|
123 | 121 | // EntityName is the name of the entity to validate |
124 | 122 | EntityName string `json:"entityName" yaml:"entityName"` |
@@ -152,8 +150,7 @@ type TagValidationRule struct { |
152 | 150 | ClusterName string `json:"clusterName,omitempty" yaml:"clusterName"` |
153 | 151 |
|
154 | 152 | // EntityType is the type of the entity to validate |
155 | | - // +kubebuilder:validation:Enum=cluster;datacenter;folder;host;resourcepool;vm |
156 | | - EntityType string `json:"entityType" yaml:"entityType"` |
| 153 | + EntityType vcenter.Entity `json:"entityType" yaml:"entityType"` |
157 | 154 |
|
158 | 155 | // EntityName is the name of the entity to validate |
159 | 156 | EntityName string `json:"entityName" yaml:"entityName"` |
|
0 commit comments