Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the metal3.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=metal3.io
Index ¶
- Constants
- Variables
- type ACL
- type AnsibleSwitch
- type AnsibleSwitchList
- type AnsibleSwitchSpec
- type AnsibleSwitchStatus
- type Port
- type Switch
- type SwitchList
- type SwitchPort
- func (in *SwitchPort) DeepCopy() *SwitchPort
- func (in *SwitchPort) DeepCopyInto(out *SwitchPort)
- func (in *SwitchPort) DeepCopyObject() runtime.Object
- func (sp *SwitchPort) FetchOwnerReference(ctx context.Context, client client.Client) (*Switch, error)
- func (sp *SwitchPort) GetState() machine.StateType
- func (sp *SwitchPort) SetError(err error)
- func (sp *SwitchPort) SetState(state machine.StateType)
- type SwitchPortConfiguration
- type SwitchPortConfigurationList
- type SwitchPortConfigurationReference
- func (in *SwitchPortConfigurationReference) DeepCopy() *SwitchPortConfigurationReference
- func (in *SwitchPortConfigurationReference) DeepCopyInto(out *SwitchPortConfigurationReference)
- func (ref *SwitchPortConfigurationReference) Fetch(ctx context.Context, client client.Client) (*SwitchPortConfiguration, error)
- type SwitchPortConfigurationSpec
- type SwitchPortConfigurationStatus
- type SwitchPortList
- type SwitchPortReference
- type SwitchPortSpec
- type SwitchPortStatus
- type SwitchProviderRef
- type SwitchSpec
- type SwitchStatus
Constants ¶
const ( // SwitchNone means the CR has just been created SwitchNone machine.StateType = "" // SwitchVerify means we are verifying the connection of switch SwitchVerify machine.StateType = "Verifying" // SwitchConfiguring means we are creating SwitchPort SwitchConfiguring machine.StateType = "Configuring" // SwitchRunning means all of SwitchPort have been created SwitchRunning machine.StateType = "Running" // SwitchDeleting means we are deleting SwitchPort SwitchDeleting machine.StateType = "Deleting" )
const ( // SwitchPortNone means the CR has just been created SwitchPortNone machine.StateType = "" // SwitchPortIdle means we are wait for configuration for the port SwitchPortIdle machine.StateType = "Idle" // SwitchPortVerifying means we are verify the configuration for the port SwitchPortVerifying machine.StateType = "Verifying" // SwitchPortConfiguring means we are removing configuration from the port SwitchPortConfiguring machine.StateType = "Configuring" // SwitchPortActive means the port have been configured, you can use it now SwitchPortActive machine.StateType = "Active" // SwitchPortCleaning means the port have been configured, you can use it now SwitchPortCleaning machine.StateType = "Cleaning" // SwitchPortDeleting means we are deleting this CR SwitchPortDeleting machine.StateType = "Deleting" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "metal3.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL struct { // +kubebuilder:validation:Enum=ipv4;ipv6 Type string `json:"type,omitempty"` // +kubebuilder:validation:Enum=allow;deny Action string `json:"action,omitempty"` // +kubebuilder:validation:Enum=TCP;UDP;ICMP;ALL Protocol string `json:"protocol,omitempty"` Src string `json:"src,omitempty"` // +kubebuilder:validation:Pattern=`([0-9]{1,})|([0-9]{1,}-[0-9]{1,})(,([0-9]{1,})|([0-9]{1,}-[0-9]{1,}))*` SrcPortRange string `json:"srcPortRange,omitempty"` Des string `json:"des,omitempty"` // +kubebuilder:validation:Pattern=`([0-9]{1,})|([0-9]{1,}-[0-9]{1,})(,([0-9]{1,})|([0-9]{1,}-[0-9]{1,}))*` DesPortRange string `json:"desPortRange,omitempty"` }
ACL describes the rules applied in the switch
func (*ACL) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACL.
func (*ACL) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AnsibleSwitch ¶
type AnsibleSwitch struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AnsibleSwitchSpec `json:"spec,omitempty"` Status AnsibleSwitchStatus `json:"status,omitempty"` }
AnsibleSwitch is the Schema for the ansibleswitches API
func (*AnsibleSwitch) DeepCopy ¶
func (in *AnsibleSwitch) DeepCopy() *AnsibleSwitch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnsibleSwitch.
func (*AnsibleSwitch) DeepCopyInto ¶
func (in *AnsibleSwitch) DeepCopyInto(out *AnsibleSwitch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AnsibleSwitch) DeepCopyObject ¶
func (in *AnsibleSwitch) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AnsibleSwitch) GetConfiguration ¶
func (a *AnsibleSwitch) GetConfiguration(ctx context.Context, client client.Client) (*provider.SwitchConfiguration, error)
GetConfiguration generate configuration from openvswitch switch
type AnsibleSwitchList ¶
type AnsibleSwitchList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []AnsibleSwitch `json:"items"` }
AnsibleSwitchList contains a list of AnsibleSwitch
func (*AnsibleSwitchList) DeepCopy ¶
func (in *AnsibleSwitchList) DeepCopy() *AnsibleSwitchList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnsibleSwitchList.
func (*AnsibleSwitchList) DeepCopyInto ¶
func (in *AnsibleSwitchList) DeepCopyInto(out *AnsibleSwitchList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AnsibleSwitchList) DeepCopyObject ¶
func (in *AnsibleSwitchList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AnsibleSwitchSpec ¶
type AnsibleSwitchSpec struct { // +kubebuilder:validation:Enum=openvswitch;junos;nxos;eos;enos;cumulus;dellos10;fos OS string `json:"os"` Host string `json:"host"` // OVS bridge Bridge string `json:"bridge,omitempty"` // The secret containing the switch credentials Secret *corev1.SecretReference `json:"secret"` }
AnsibleSwitchSpec defines the desired state of AnsibleSwitch
func (*AnsibleSwitchSpec) DeepCopy ¶
func (in *AnsibleSwitchSpec) DeepCopy() *AnsibleSwitchSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnsibleSwitchSpec.
func (*AnsibleSwitchSpec) DeepCopyInto ¶
func (in *AnsibleSwitchSpec) DeepCopyInto(out *AnsibleSwitchSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AnsibleSwitchStatus ¶
type AnsibleSwitchStatus struct { }
AnsibleSwitchStatus defines the observed state of AnsibleSwitch
func (*AnsibleSwitchStatus) DeepCopy ¶
func (in *AnsibleSwitchStatus) DeepCopy() *AnsibleSwitchStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnsibleSwitchStatus.
func (*AnsibleSwitchStatus) DeepCopyInto ¶
func (in *AnsibleSwitchStatus) DeepCopyInto(out *AnsibleSwitchStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Port ¶
type Port struct { // Describes the port name on the device Name string `json:"name"` // True if this port is not available, false otherwise Disabled bool `json:"disabled,omitempty"` // True if this port can be used as a trunk port, false otherwise TrunkDisabled bool `json:"trunkDisable,omitempty"` // Indicates the range of VLANs allowed by this port in the switch // +kubebuilder:validation:Pattern=`([0-9]{1,})|([0-9]{1,}-[0-9]{1,})(,([0-9]{1,})|([0-9]{1,}-[0-9]{1,}))*` // +kubebuilder:default:="1-4096" VLANRange string `json:"vlanRange,omitempty"` }
Port indicates the specific restriction on the port
func (*Port) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Port.
func (*Port) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Port) Verify ¶
func (p *Port) Verify(configuration *SwitchPortConfiguration) error
Verify configuration
type Switch ¶
type Switch struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SwitchSpec `json:"spec,omitempty"` Status SwitchStatus `json:"status,omitempty"` }
Switch is the Schema for the switches API
func (*Switch) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Switch.
func (*Switch) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Switch) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SwitchList ¶
type SwitchList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Switch `json:"items"` }
SwitchList contains a list of Switch
func (*SwitchList) DeepCopy ¶
func (in *SwitchList) DeepCopy() *SwitchList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchList.
func (*SwitchList) DeepCopyInto ¶
func (in *SwitchList) DeepCopyInto(out *SwitchList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SwitchList) DeepCopyObject ¶
func (in *SwitchList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SwitchPort ¶
type SwitchPort struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SwitchPortSpec `json:"spec,omitempty"` Status SwitchPortStatus `json:"status,omitempty"` }
SwitchPort is the Schema for the switchports API
func (*SwitchPort) DeepCopy ¶
func (in *SwitchPort) DeepCopy() *SwitchPort
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchPort.
func (*SwitchPort) DeepCopyInto ¶
func (in *SwitchPort) DeepCopyInto(out *SwitchPort)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SwitchPort) DeepCopyObject ¶
func (in *SwitchPort) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*SwitchPort) FetchOwnerReference ¶
func (sp *SwitchPort) FetchOwnerReference(ctx context.Context, client client.Client) (*Switch, error)
FetchOwnerReference fetch OwnerReference[0]
func (*SwitchPort) GetState ¶
func (sp *SwitchPort) GetState() machine.StateType
GetState gets the current state of the port
func (*SwitchPort) SetError ¶
func (sp *SwitchPort) SetError(err error)
SetError sets the error of the port
func (*SwitchPort) SetState ¶
func (sp *SwitchPort) SetState(state machine.StateType)
SetState sets the state of the port
type SwitchPortConfiguration ¶
type SwitchPortConfiguration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SwitchPortConfigurationSpec `json:"spec,omitempty"` Status SwitchPortConfigurationStatus `json:"status,omitempty"` }
SwitchPortConfiguration is the Schema for the switchportconfigurations API
func (*SwitchPortConfiguration) DeepCopy ¶
func (in *SwitchPortConfiguration) DeepCopy() *SwitchPortConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchPortConfiguration.
func (*SwitchPortConfiguration) DeepCopyInto ¶
func (in *SwitchPortConfiguration) DeepCopyInto(out *SwitchPortConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SwitchPortConfiguration) DeepCopyObject ¶
func (in *SwitchPortConfiguration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SwitchPortConfigurationList ¶
type SwitchPortConfigurationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SwitchPortConfiguration `json:"items"` }
SwitchPortConfigurationList contains a list of SwitchPortConfiguration
func (*SwitchPortConfigurationList) DeepCopy ¶
func (in *SwitchPortConfigurationList) DeepCopy() *SwitchPortConfigurationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchPortConfigurationList.
func (*SwitchPortConfigurationList) DeepCopyInto ¶
func (in *SwitchPortConfigurationList) DeepCopyInto(out *SwitchPortConfigurationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SwitchPortConfigurationList) DeepCopyObject ¶
func (in *SwitchPortConfigurationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SwitchPortConfigurationReference ¶
type SwitchPortConfigurationReference struct { Name string `json:"name"` // If empty use default namespace // +kubebuilder:default:="default" Namespace string `json:"namespace,omitempty"` }
SwitchPortConfigurationReference is the reference for SwitchPortConfiguration CR
func (*SwitchPortConfigurationReference) DeepCopy ¶
func (in *SwitchPortConfigurationReference) DeepCopy() *SwitchPortConfigurationReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchPortConfigurationReference.
func (*SwitchPortConfigurationReference) DeepCopyInto ¶
func (in *SwitchPortConfigurationReference) DeepCopyInto(out *SwitchPortConfigurationReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SwitchPortConfigurationReference) Fetch ¶
func (ref *SwitchPortConfigurationReference) Fetch(ctx context.Context, client client.Client) (*SwitchPortConfiguration, error)
Fetch the instance
type SwitchPortConfigurationSpec ¶
type SwitchPortConfigurationSpec struct { // +kubebuilder:validation:MaxItems=10 ACLs []ACL `json:"acls,omitempty"` UntaggedVLAN *int `json:"untaggedVLAN,omitempty"` // The range of tagged vlans. You can use `-` to connect two numbers to express the range // or use separate numbers. You can use `,` to combine the above two methods, for example: // `1-10,11,13-20` // +kubebuilder:validation:Pattern=`([0-9]{1,})|([0-9]{1,}-[0-9]{1,})(,([0-9]{1,})|([0-9]{1,}-[0-9]{1,}))*` VLANs string `json:"vlans,omitempty"` // Disable port Disable bool `json:"disable,omitempty"` }
SwitchPortConfigurationSpec defines the desired state of SwitchPortConfiguration
func (*SwitchPortConfigurationSpec) DeepCopy ¶
func (in *SwitchPortConfigurationSpec) DeepCopy() *SwitchPortConfigurationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchPortConfigurationSpec.
func (*SwitchPortConfigurationSpec) DeepCopyInto ¶
func (in *SwitchPortConfigurationSpec) DeepCopyInto(out *SwitchPortConfigurationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwitchPortConfigurationStatus ¶
type SwitchPortConfigurationStatus struct { }
SwitchPortConfigurationStatus defines the observed state of SwitchPortConfiguration
func (*SwitchPortConfigurationStatus) DeepCopy ¶
func (in *SwitchPortConfigurationStatus) DeepCopy() *SwitchPortConfigurationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchPortConfigurationStatus.
func (*SwitchPortConfigurationStatus) DeepCopyInto ¶
func (in *SwitchPortConfigurationStatus) DeepCopyInto(out *SwitchPortConfigurationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwitchPortList ¶
type SwitchPortList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SwitchPort `json:"items"` }
SwitchPortList contains a list of SwitchPort
func (*SwitchPortList) DeepCopy ¶
func (in *SwitchPortList) DeepCopy() *SwitchPortList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchPortList.
func (*SwitchPortList) DeepCopyInto ¶
func (in *SwitchPortList) DeepCopyInto(out *SwitchPortList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SwitchPortList) DeepCopyObject ¶
func (in *SwitchPortList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SwitchPortReference ¶
type SwitchPortReference struct { Name string `json:"name"` // If empty use default namespace // +kubebuilder:default:="default" Namespace string `json:"namespace,omitempty"` }
SwitchPortReference is the reference for SwitchPort CR
func (*SwitchPortReference) DeepCopy ¶
func (in *SwitchPortReference) DeepCopy() *SwitchPortReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchPortReference.
func (*SwitchPortReference) DeepCopyInto ¶
func (in *SwitchPortReference) DeepCopyInto(out *SwitchPortReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SwitchPortReference) Fetch ¶
func (ref *SwitchPortReference) Fetch(ctx context.Context, client client.Client) (*SwitchPort, error)
Fetch the instance
type SwitchPortSpec ¶
type SwitchPortSpec struct { // The reference of PortConfiguration CR Configuration *SwitchPortConfigurationReference `json:"configuration,omitempty"` }
SwitchPortSpec defines the desired state of SwitchPort
func (*SwitchPortSpec) DeepCopy ¶
func (in *SwitchPortSpec) DeepCopy() *SwitchPortSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchPortSpec.
func (*SwitchPortSpec) DeepCopyInto ¶
func (in *SwitchPortSpec) DeepCopyInto(out *SwitchPortSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwitchPortStatus ¶
type SwitchPortStatus struct { // The current configuration status of the port State machine.StateType `json:"state,omitempty"` // The error message of the port Error string `json:"error,omitempty"` // The current Configuration of the port Configuration *SwitchPortConfiguration `json:"configuration,omitempty"` // The name of physics port PortName string `json:"portName,omitempty"` }
SwitchPortStatus defines the observed state of SwitchPort
func (*SwitchPortStatus) DeepCopy ¶
func (in *SwitchPortStatus) DeepCopy() *SwitchPortStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchPortStatus.
func (*SwitchPortStatus) DeepCopyInto ¶
func (in *SwitchPortStatus) DeepCopyInto(out *SwitchPortStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwitchProviderRef ¶
type SwitchProviderRef struct { // +kubebuilder:validation:Enum=AnsibleSwitch Kind string `json:"kind"` Name string `json:"name"` // If empty use default namespace. // +kubebuilder:default:="default" Namespace string `json:"namespace,omitempty"` }
SwitchProviderRef is the reference for SwitchProvider CR
func (*SwitchProviderRef) DeepCopy ¶
func (in *SwitchProviderRef) DeepCopy() *SwitchProviderRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchProviderRef.
func (*SwitchProviderRef) DeepCopyInto ¶
func (in *SwitchProviderRef) DeepCopyInto(out *SwitchProviderRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwitchSpec ¶
type SwitchSpec struct { // The reference of provider Provider *SwitchProviderRef `json:"provider"` // Restricted ports in the switch Ports map[string]*Port `json:"ports,omitempty"` }
SwitchSpec defines the desired state of Switch
func (*SwitchSpec) DeepCopy ¶
func (in *SwitchSpec) DeepCopy() *SwitchSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchSpec.
func (*SwitchSpec) DeepCopyInto ¶
func (in *SwitchSpec) DeepCopyInto(out *SwitchSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwitchStatus ¶
type SwitchStatus struct { // The current configuration status of the switch State machine.StateType `json:"state,omitempty"` // The reference of switch provider Provider *SwitchProviderRef `json:"provider,omitempty"` // Restricted ports in the switch Ports map[string]*Port `json:"ports,omitempty"` // The error message of the port Error string `json:"error,omitempty"` }
SwitchStatus defines the observed state of Switch
func (*SwitchStatus) DeepCopy ¶
func (in *SwitchStatus) DeepCopy() *SwitchStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchStatus.
func (*SwitchStatus) DeepCopyInto ¶
func (in *SwitchStatus) DeepCopyInto(out *SwitchStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.