Documentation
¶
Index ¶
- Constants
- type Condition
- func Creating() Condition
- func Deleting() Condition
- func ExternalLeafRefValidationFailure() Condition
- func ExternalLeafRefValidationSuccess() Condition
- func InternalLeafRefValidationFailure() Condition
- func InternalLeafRefValidationSuccess() Condition
- func ParentValidationFailure() Condition
- func ParentValidationSuccess() Condition
- func ReconcileFailure() Condition
- func ReconcileSuccess() Condition
- func TargetFound() Condition
- func TargetNotFound() Condition
- type ConditionKind
- type ConditionReason
- type ConditionedStatus
- func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
- func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)
- func (s *ConditionedStatus) Equal(other *ConditionedStatus) bool
- func (s *ConditionedStatus) GetCondition(ck ConditionKind) Condition
- func (s *ConditionedStatus) SetConditions(c ...Condition)
- type DeviceType
- type Reference
- type Target
- type TypedReference
Constants ¶
const ( // labels TargetLabelKey = "target" TargetLabelValueAll = "all" // errors ErrTargetNotFound = "cannot find a valid target" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct { // Type of this condition. At most one of each condition type may apply to // a resource at any point in time. Kind ConditionKind `json:"kind"` // Status of this condition; is it currently True, False, or Unknown? Status corev1.ConditionStatus `json:"status"` // LastTransitionTime is the last time this condition transitioned from one // status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime"` // A Reason for this condition's last transition from one status to another. Reason ConditionReason `json:"reason"` // A Message containing details about this condition's last transition from // one status to another, if any. // +optional Message string `json:"message,omitempty"` }
A Condition that may apply to a resource
func Creating ¶
func Creating() Condition
Creating returns a condition that indicates the resource is currently being created.
func Deleting ¶
func Deleting() Condition
Deleting returns a condition that indicates the resource is currently being deleted.
func ExternalLeafRefValidationFailure ¶
func ExternalLeafRefValidationFailure() Condition
ExternalLeafRefValidationFailure returns a condition that indicates the resource leafreference(s) are missing
func ExternalLeafRefValidationSuccess ¶
func ExternalLeafRefValidationSuccess() Condition
ExternalLeafRefValidationSuccess returns a condition that indicates the resource leafreference(s) are found or no leafrefs exist
func InternalLeafRefValidationFailure ¶
func InternalLeafRefValidationFailure() Condition
InternalLeafRefValidationFailure returns a condition that indicates the resource leafreference(s) are missing
func InternalLeafRefValidationSuccess ¶
func InternalLeafRefValidationSuccess() Condition
InternalLeafRefValidationSuccess returns a condition that indicates the resource leafreference(s) are found or no leafrefs exist
func ParentValidationFailure ¶
func ParentValidationFailure() Condition
ExternalLeafRefValidationFailure returns a condition that indicates the resource leafreference(s) are missing
func ParentValidationSuccess ¶
func ParentValidationSuccess() Condition
ParentValidationFailure returns a condition that indicates the resource parent is found
func ReconcileFailure ¶
func ReconcileFailure() Condition
Unavailable returns a condition that indicates the resource is not currently available for use.
func ReconcileSuccess ¶
func ReconcileSuccess() Condition
ReconcileSuccess returns a condition that indicates the resource is currently successfully reconciled
func TargetFound ¶
func TargetFound() Condition
TargetFound returns a condition that indicates the resource has target(s) available for use.
func TargetNotFound ¶
func TargetNotFound() Condition
TargetNotFound returns a condition that indicates the resource has no target(s) available for use.
func (*Condition) DeepCopy ¶ added in v0.3.7
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶ added in v0.3.7
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Condition) Equal ¶
Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.
func (Condition) WithMessage ¶
WithMessage returns a condition by adding the provided message to existing condition.
type ConditionKind ¶
type ConditionKind string
A ConditionKind represents a condition kind for a resource
const ( // handled per resource ConditionKindInternalLeafRef ConditionKind = "InternalLeafrefValidationSuccess" // handled per target per resource ConditionKindExternalLeafRef ConditionKind = "ExternalLeafrefValidationSuccess" // handled per resource ConditionKindParent ConditionKind = "ParentValidationSuccess" // handled per resource ConditionKindTarget ConditionKind = "TargetFound" // handled per target per resource ConditionKindConfiguration ConditionKind = "ConfigurationSuccess" )
Condition Kinds.
type ConditionReason ¶
type ConditionReason string
A ConditionReason represents the reason a resource is in a condition.
const ( ConditionReasonSuccess ConditionReason = "Success" ConditionReasonFailed ConditionReason = "Failed" )
Reasons a resource validation is or is not ok
const ( ConditionReasonFound ConditionReason = "Target Found" ConditionReasonNotFound ConditionReason = "No valid target Found" )
Reasons a resource target is or is not ok
const ( ConditionReasonNone ConditionReason = "None" ConditionReasonCreating ConditionReason = "Creating" ConditionReasonDeleting ConditionReason = "Deleting" ConditionReasonReconcileSuccess ConditionReason = "ReconcileSuccess" ConditionReasonReconcileFailure ConditionReason = "ReconcileFailure" )
Reasons a resource is or is not ready wrt configuration
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 kind may exist.
func NewConditionedStatus ¶
func NewConditionedStatus(c ...Condition) *ConditionedStatus
NewConditionedStatus returns a stat with the supplied conditions set.
func (*ConditionedStatus) DeepCopy ¶ added in v0.3.7
func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionedStatus.
func (*ConditionedStatus) DeepCopyInto ¶ added in v0.3.7
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 (s *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 (s *ConditionedStatus) GetCondition(ck ConditionKind) Condition
GetCondition returns the condition for the given ConditionKind if exists, otherwise returns nil
func (*ConditionedStatus) SetConditions ¶
func (s *ConditionedStatus) SetConditions(c ...Condition)
SetConditions sets the supplied conditions, replacing any existing conditions of the same kind. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.
type DeviceType ¶ added in v0.3.38
type DeviceType string
const ( DeviceTypeUnknown DeviceType = "" DeviceTypeSRL DeviceType = "nokia-srl" DeviceTypeSROS DeviceType = "nokia-sros" )
func DeviceTypePtr ¶ added in v0.3.38
func DeviceTypePtr(c DeviceType) *DeviceType
type Reference ¶ added in v0.3.10
type Reference struct { // Name of the referenced object. Name string `json:"name"` }
A Reference to a named object.
func (*Reference) DeepCopy ¶ added in v0.3.10
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reference.
func (*Reference) DeepCopyInto ¶ added in v0.3.10
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TypedReference ¶ added in v0.3.24
type TypedReference struct { // APIVersion of the referenced object. APIVersion string `json:"apiVersion"` // Kind of the referenced object. Kind string `json:"kind"` // Name of the referenced object. Name string `json:"name"` // UID of the referenced object. // +optional UID types.UID `json:"uid,omitempty"` }
A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known.
func (*TypedReference) DeepCopy ¶ added in v0.3.24
func (in *TypedReference) DeepCopy() *TypedReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypedReference.
func (*TypedReference) DeepCopyInto ¶ added in v0.3.24
func (in *TypedReference) DeepCopyInto(out *TypedReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.