Skip to content

Commit

Permalink
Merge pull request #31 from vmware-tanzu/topic/ecao/library-state-api…
Browse files Browse the repository at this point in the history
…-update3

add kubebuilder validation to the state enum
  • Loading branch information
ericvmw authored Oct 2, 2024
2 parents 02778b7 + 3aff1b9 commit 2d2a0a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
11 changes: 3 additions & 8 deletions api/v1alpha1/contentlibrary_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@ type PublishInfo struct {
URL string `json:"URL"`
}

// StateInfo provides the information about the state of a content library.
type StateInfo struct {
// State indicates the state of this library.
State State `json:"state"`
}

// ContentLibrarySpec defines the desired state of a ContentLibrary.
type ContentLibrarySpec struct {
// UUID is the identifier which uniquely identifies the library in vCenter. This field is immutable.
Expand Down Expand Up @@ -166,9 +160,10 @@ type ContentLibraryStatus struct {
// +optional
SecurityPolicyID string `json:"securityPolicyID,omitempty"`

// StateInfo provides the state information of this library.
// State indicates the state of this library.
// +kubebuilder:validation:Enum=Active;InMaintenance
// +optional
StateInfo *StateInfo `json:"stateInfo,omitempty"`
State State `json:"state,omitempty"`

// ServerGUID indicates the unique identifier of the vCenter server where the library exists.
// +optional
Expand Down
20 changes: 0 additions & 20 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2d2a0a0

Please sign in to comment.