Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/core/v1alpha1/interface_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ const (
// Switchport defines the switchport configuration for an interface.
// +kubebuilder:validation:XValidation:rule="self.mode != 'Access' || has(self.accessVlan)", message="accessVlan must be specified when mode is Access"
// +kubebuilder:validation:XValidation:rule="self.mode != 'Trunk' || has(self.nativeVlan)", message="nativeVlan must be specified when mode is Trunk"
// +kubebuilder:validation:XValidation:rule="self.mode != 'Trunk' || has(self.allowedVlans)", message="allowedVlans must be specified when mode is Trunk"
type Switchport struct {
// Mode defines the switchport mode, such as access or trunk.
// +required
Expand All @@ -138,6 +137,7 @@ type Switchport struct {
NativeVlan int32 `json:"nativeVlan,omitempty"`

// AllowedVlans is a list of VLAN IDs that are allowed on the trunk port.
// If not specified, all VLANs (1-4094) are allowed.
// Only applicable when Mode is set to "Trunk".
// +optional
// +kubebuilder:validation:MinItems=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ spec:
allowedVlans:
description: |-
AllowedVlans is a list of VLAN IDs that are allowed on the trunk port.
If not specified, all VLANs (1-4094) are allowed.
Only applicable when Mode is set to "Trunk".
items:
format: int32
Expand Down Expand Up @@ -325,8 +326,6 @@ spec:
rule: self.mode != 'Access' || has(self.accessVlan)
- message: nativeVlan must be specified when mode is Trunk
rule: self.mode != 'Trunk' || has(self.nativeVlan)
- message: allowedVlans must be specified when mode is Trunk
rule: self.mode != 'Trunk' || has(self.allowedVlans)
type:
description: Type indicates the type of the interface.
enum:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ spec:
allowedVlans:
description: |-
AllowedVlans is a list of VLAN IDs that are allowed on the trunk port.
If not specified, all VLANs (1-4094) are allowed.
Only applicable when Mode is set to "Trunk".
items:
format: int32
Expand Down Expand Up @@ -319,8 +320,6 @@ spec:
rule: self.mode != 'Access' || has(self.accessVlan)
- message: nativeVlan must be specified when mode is Trunk
rule: self.mode != 'Trunk' || has(self.nativeVlan)
- message: allowedVlans must be specified when mode is Trunk
rule: self.mode != 'Trunk' || has(self.allowedVlans)
type:
description: Type indicates the type of the interface.
enum:
Expand Down
Loading