v1alpha1

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the automation v1alpha1 API group +kubebuilder:object:generate=true +groupName=config.nephio.org

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "config.nephio.org", 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
)
View Source
var (
	NetworkKind             = reflect.TypeOf(Network{}).Name()
	NetworkGroupKind        = schema.GroupKind{Group: GroupVersion.Group, Kind: NetworkKind}.String()
	NetworkKindAPIVersion   = NetworkKind + "." + GroupVersion.String()
	NetworkGroupVersionKind = GroupVersion.WithKind(NetworkKind)
)

Network type metadata.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	metav1.Condition `json:",inline" yaml:",inline"`
}

func Failed

func Failed(msg string) Condition

Failed returns a condition that indicates the resource failed to get reconciled.

func Ready

func Ready() Condition

Ready returns a condition that indicates the resource is ready for use.

func Unknown

func Unknown() Condition

Unknown returns a condition that indicates the resource is in an unknown status.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Condition) Equal

func (c Condition) Equal(other Condition) bool

Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.

func (Condition) WithMessage

func (c Condition) WithMessage(msg string) Condition

WithMessage returns a condition by adding the provided message to existing condition.

type ConditionReason

type ConditionReason string

A ConditionReason represents the reason a resource is in a condition.

const (
	ConditionReasonReady   ConditionReason = "Ready"
	ConditionReasonFailed  ConditionReason = "Failed"
	ConditionReasonUnknown ConditionReason = "Unknown"
)

Reasons a resource is ready or not

type ConditionType

type ConditionType string

A ConditionType represents a condition type for a given KRM resource

const (
	// ConditionTypeReady represents the resource ready condition
	ConditionTypeReady ConditionType = "Ready"
)

Condition Types.

type ConditionedStatus

type ConditionedStatus struct {
	// Conditions of the resource.
	// +optional
	Conditions []Condition `json:"conditions,omitempty"`
}

A ConditionedStatus reflects the observed status of a resource. Only one condition of each type may exist.

func NewConditionedStatus

func NewConditionedStatus(c ...Condition) *ConditionedStatus

NewConditionedStatus returns a stat with the supplied conditions set.

func (*ConditionedStatus) DeepCopy

func (in *ConditionedStatus) DeepCopy() *ConditionedStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionedStatus.

func (*ConditionedStatus) DeepCopyInto

func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConditionedStatus) Equal

func (r *ConditionedStatus) Equal(other *ConditionedStatus) bool

Equal returns true if the status is identical to the supplied status, ignoring the LastTransitionTimes and order of statuses.

func (*ConditionedStatus) GetCondition

func (r *ConditionedStatus) GetCondition(t ConditionType) Condition

GetCondition returns the condition for the given ConditionKind if exists, otherwise returns nil

func (*ConditionedStatus) SetConditions

func (r *ConditionedStatus) SetConditions(c ...Condition)

SetConditions sets the supplied conditions, replacing any existing conditions of the same type. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.

type Network

type Network struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NetworkSpec   `json:"spec,omitempty"`
	Status NetworkStatus `json:"status,omitempty"`
}

Network is the Schema for the Network API

func BuildNetworkConfig

func BuildNetworkConfig(meta metav1.ObjectMeta, spec NetworkSpec, status NetworkStatus) *Network

BuildNetworkConfig returns a Network from a client Object a crName and an Network Spec/Status

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Network) DeepCopyObject

func (in *Network) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Network) GetCondition

func (r *Network) GetCondition(t ConditionType) Condition

GetCondition returns the condition based on the condition kind

func (*Network) SetConditions

func (r *Network) SetConditions(c ...Condition)

SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions to be set at once

type NetworkList

type NetworkList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Network `json:"items"`
}

NetworkList contains a list of Repositories

func (*NetworkList) DeepCopy

func (in *NetworkList) DeepCopy() *NetworkList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkList.

func (*NetworkList) DeepCopyInto

func (in *NetworkList) DeepCopyInto(out *NetworkList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NetworkList) DeepCopyObject

func (in *NetworkList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NetworkSpec

type NetworkSpec struct {
	// Lifecycle determines the lifecycle policies the resource e.g. delete is orphan or delete
	// will follow
	Lifecycle commonv1alpha1.Lifecycle `json:"lifecycle,omitempty" yaml:"lifecycle,omitempty"`
	// Config defines the configuration to be applied to a target device
	//+kubebuilder:pruning:PreserveUnknownFields
	Config runtime.RawExtension `json:"config,omitempty" yaml:"config,omitempty"`
}

NetworkSpec defines the desired state of Network Configuration

func (*NetworkSpec) DeepCopy

func (in *NetworkSpec) DeepCopy() *NetworkSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec.

func (*NetworkSpec) DeepCopyInto

func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkStatus

type NetworkStatus struct {
	// ConditionedStatus provides the status of the Readiness using conditions
	// if the condition is true the other attributes in the status are meaningful
	ConditionedStatus `json:",inline" yaml:",inline"`
	// LastAppliedConfig defines the configuration that was last applied to the target device
	//+kubebuilder:pruning:PreserveUnknownFields
	LastAppliedConfig runtime.RawExtension `json:"lastAppliedConfig,omitempty" yaml:"lastAppliedConfig,omitempty"`
}

NetworkStatus defines the observed state of Network

func (*NetworkStatus) DeepCopy

func (in *NetworkStatus) DeepCopy() *NetworkStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatus.

func (*NetworkStatus) DeepCopyInto

func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL