v1

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the netbox v1 API group +kubebuilder:object:generate=true +groupName=netbox.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "netbox.dev", Version: "v1"}

	// 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 ConditionIpAssignedFalse = metav1.Condition{
	Type:    "IPAssigned",
	Status:  "False",
	Reason:  "IPAddressCRNotCreated",
	Message: "Failed to fetch new IP from NetBox",
}
View Source
var ConditionIpAssignedTrue = metav1.Condition{
	Type:    "IPAssigned",
	Status:  "True",
	Reason:  "IPAddressCRCreated",
	Message: "New IP fetched from NetBox and IPAddress CR was created",
}
View Source
var ConditionIpClaimReadyFalse = metav1.Condition{
	Type:    "Ready",
	Status:  "False",
	Reason:  "IPAddressResourceNotReady",
	Message: "IPAddress Resource is not ready",
}
View Source
var ConditionIpClaimReadyTrue = metav1.Condition{
	Type:    "Ready",
	Status:  "True",
	Reason:  "IPAddressResourceReady",
	Message: "IPAddress Resource is ready",
}
View Source
var ConditionIpaddressReadyFalse = metav1.Condition{
	Type:    "Ready",
	Status:  "False",
	Reason:  "FailedToReserveIpInNetbox",
	Message: "Failed to reserve IP in NetBox",
}
View Source
var ConditionIpaddressReadyFalseDeletionFailed = metav1.Condition{
	Type:    "Ready",
	Status:  "False",
	Reason:  "FailedToDeleteIpInNetbox",
	Message: "Failed to delete IP in NetBox",
}
View Source
var ConditionIpaddressReadyTrue = metav1.Condition{
	Type:    "Ready",
	Status:  "True",
	Reason:  "IpReservedInNetbox",
	Message: "IP was reserved/updated in NetBox",
}
View Source
var ConditionParentPrefixSelectedFalse = metav1.Condition{
	Type:    "ParentPrefixSelected",
	Status:  "False",
	Reason:  "ParentPrefixNotSelected",
	Message: "The parent prefix was not able to be selected",
}
View Source
var ConditionParentPrefixSelectedTrue = metav1.Condition{
	Type:    "ParentPrefixSelected",
	Status:  "True",
	Reason:  "ParentPrefixSelected",
	Message: "The parent prefix was selected successfully",
}
View Source
var ConditionPrefixAssignedFalse = metav1.Condition{
	Type:    "PrefixAssigned",
	Status:  "False",
	Reason:  "PrefixCRNotCreated",
	Message: "Failed to fetch new Prefix from NetBox",
}
View Source
var ConditionPrefixAssignedTrue = metav1.Condition{
	Type:    "PrefixAssigned",
	Status:  "True",
	Reason:  "PrefixCRCreated",
	Message: "New prefix fetched from NetBox and prefix CR was created",
}
View Source
var ConditionPrefixClaimReadyFalse = metav1.Condition{
	Type:    "Ready",
	Status:  "False",
	Reason:  "PrefixClaimResourceNotReady",
	Message: "PrefixClaim Resource is not ready",
}
View Source
var ConditionPrefixClaimReadyTrue = metav1.Condition{
	Type:    "Ready",
	Status:  "True",
	Reason:  "PrefixClaimResourceReady",
	Message: "PrefixClaim Resource is ready",
}
View Source
var ConditionPrefixReadyFalse = metav1.Condition{
	Type:    "Ready",
	Status:  "False",
	Reason:  "FailedToReservePrefixInNetbox",
	Message: "Failed to reserve prefix in NetBox",
}
View Source
var ConditionPrefixReadyFalseDeletionFailed = metav1.Condition{
	Type:    "Ready",
	Status:  "False",
	Reason:  "FailedToDeletePrefixInNetbox",
	Message: "Failed to delete prefix in Netbox",
}
View Source
var ConditionPrefixReadyTrue = metav1.Condition{
	Type:    "Ready",
	Status:  "True",
	Reason:  "PrefixReservedInNetbox",
	Message: "Prefix was reserved in NetBox",
}

Functions

This section is empty.

Types

type IpAddress

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

	Spec   IpAddressSpec   `json:"spec,omitempty"`
	Status IpAddressStatus `json:"status,omitempty"`
}

IpAddress is the Schema for the ipaddresses API

func (*IpAddress) DeepCopy

func (in *IpAddress) DeepCopy() *IpAddress

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

func (*IpAddress) DeepCopyInto

func (in *IpAddress) DeepCopyInto(out *IpAddress)

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

func (*IpAddress) DeepCopyObject

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

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

type IpAddressClaim

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

	Spec   IpAddressClaimSpec   `json:"spec,omitempty"`
	Status IpAddressClaimStatus `json:"status,omitempty"`
}

IpAddressClaim is the Schema for the ipaddressclaims API

func (*IpAddressClaim) DeepCopy

func (in *IpAddressClaim) DeepCopy() *IpAddressClaim

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

func (*IpAddressClaim) DeepCopyInto

func (in *IpAddressClaim) DeepCopyInto(out *IpAddressClaim)

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

func (*IpAddressClaim) DeepCopyObject

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

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

type IpAddressClaimList

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

IpAddressClaimList contains a list of IpAddressClaim

func (*IpAddressClaimList) DeepCopy

func (in *IpAddressClaimList) DeepCopy() *IpAddressClaimList

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

func (*IpAddressClaimList) DeepCopyInto

func (in *IpAddressClaimList) DeepCopyInto(out *IpAddressClaimList)

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

func (*IpAddressClaimList) DeepCopyObject

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

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

type IpAddressClaimSpec

type IpAddressClaimSpec struct {

	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Format=cidr
	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'parentPrefix' is immutable"
	ParentPrefix string `json:"parentPrefix"`

	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'tenant' is immutable"
	Tenant string `json:"tenant,omitempty"`

	CustomFields map[string]string `json:"customFields,omitempty"`

	Comments string `json:"comments,omitempty"`

	Description string `json:"description,omitempty"`

	PreserveInNetbox bool `json:"preserveInNetbox,omitempty"`
}

IpAddressClaimSpec defines the desired state of IpAddressClaim

func (*IpAddressClaimSpec) DeepCopy

func (in *IpAddressClaimSpec) DeepCopy() *IpAddressClaimSpec

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

func (*IpAddressClaimSpec) DeepCopyInto

func (in *IpAddressClaimSpec) DeepCopyInto(out *IpAddressClaimSpec)

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

type IpAddressClaimStatus

type IpAddressClaimStatus struct {
	IpAddress string `json:"ipAddress,omitempty"`

	IpAddressDotDecimal string `json:"ipAddressDotDecimal,omitempty"`

	IpAddressName string `json:"ipAddressName,omitempty"`

	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

IpAddressClaimStatus defines the observed state of IpAddressClaim

func (*IpAddressClaimStatus) DeepCopy

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

func (*IpAddressClaimStatus) DeepCopyInto

func (in *IpAddressClaimStatus) DeepCopyInto(out *IpAddressClaimStatus)

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

type IpAddressList

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

IpAddressList contains a list of IpAddress

func (*IpAddressList) DeepCopy

func (in *IpAddressList) DeepCopy() *IpAddressList

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

func (*IpAddressList) DeepCopyInto

func (in *IpAddressList) DeepCopyInto(out *IpAddressList)

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

func (*IpAddressList) DeepCopyObject

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

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

type IpAddressSpec

type IpAddressSpec struct {

	//+kubebuilder:validation:Format=cidr
	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'ipAddress' is immutable"
	//+kubebuilder:validation:Required
	IpAddress string `json:"ipAddress"`

	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'tenant' is immutable"
	Tenant string `json:"tenant,omitempty"`

	CustomFields map[string]string `json:"customFields,omitempty"`

	Comments string `json:"comments,omitempty"`

	Description string `json:"description,omitempty"`

	PreserveInNetbox bool `json:"preserveInNetbox,omitempty"`
}

IpAddressSpec defines the desired state of IpAddress

func (*IpAddressSpec) DeepCopy

func (in *IpAddressSpec) DeepCopy() *IpAddressSpec

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

func (*IpAddressSpec) DeepCopyInto

func (in *IpAddressSpec) DeepCopyInto(out *IpAddressSpec)

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

type IpAddressStatus

type IpAddressStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	IpAddressId int64 `json:"id,omitempty"`

	IpAddressUrl string `json:"url,omitempty"`

	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

IpAddressStatus defines the observed state of IpAddress

func (*IpAddressStatus) DeepCopy

func (in *IpAddressStatus) DeepCopy() *IpAddressStatus

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

func (*IpAddressStatus) DeepCopyInto

func (in *IpAddressStatus) DeepCopyInto(out *IpAddressStatus)

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

type Prefix

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

	Spec   PrefixSpec   `json:"spec,omitempty"`
	Status PrefixStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Prefix",type=string,JSONPath=`.spec.prefix` +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status` +kubebuilder:printcolumn:name="ID",type=string,JSONPath=`.status.id` +kubebuilder:printcolumn:name="URL",type=string,JSONPath=`.status.url` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:resource:shortName=px Prefix is the Schema for the prefixes API

func (*Prefix) DeepCopy

func (in *Prefix) DeepCopy() *Prefix

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

func (*Prefix) DeepCopyInto

func (in *Prefix) DeepCopyInto(out *Prefix)

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

func (*Prefix) DeepCopyObject

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

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

type PrefixClaim

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

	Spec   PrefixClaimSpec   `json:"spec,omitempty"`
	Status PrefixClaimStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Prefix",type=string,JSONPath=`.status.prefix` +kubebuilder:printcolumn:name="PrefixAssigned",type=string,JSONPath=`.status.conditions[?(@.type=="PrefixAssigned")].status` +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:resource:shortName=pxc PrefixClaim is the Schema for the prefixclaims API

func (*PrefixClaim) DeepCopy

func (in *PrefixClaim) DeepCopy() *PrefixClaim

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

func (*PrefixClaim) DeepCopyInto

func (in *PrefixClaim) DeepCopyInto(out *PrefixClaim)

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

func (*PrefixClaim) DeepCopyObject

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

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

type PrefixClaimList

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

PrefixClaimList contains a list of PrefixClaim

func (*PrefixClaimList) DeepCopy

func (in *PrefixClaimList) DeepCopy() *PrefixClaimList

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

func (*PrefixClaimList) DeepCopyInto

func (in *PrefixClaimList) DeepCopyInto(out *PrefixClaimList)

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

func (*PrefixClaimList) DeepCopyObject

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

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

type PrefixClaimSpec

type PrefixClaimSpec struct {

	//+kubebuilder:validation:Format=cidr
	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'parentPrefix' is immutable"
	ParentPrefix string `json:"parentPrefix,omitempty"`

	// The `parentPrefixSelector` is a key-value map, where all the entries are of data type `<string-string>`
	// The map contains a set of query conditions for selecting a set of prefixes that can be used as the parent prefix
	// The query conditions will be chained by the AND operator, and exact match of the keys and values will be performed
	// The built-in fields `tenant`, `site`, and `family`, along with custom fields, can be used
	// For more information, please see ParentPrefixSelectorGuide.md
	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'parentPrefixSelector' is immutable"
	//+kubebuilder:validation:XValidation:rule="!has(self.family) || (self.family == 'IPv4' || self.family == 'IPv6')"
	ParentPrefixSelector map[string]string `json:"parentPrefixSelector,omitempty"`

	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Pattern=`^\/[0-9]|[1-9][0-9]|1[01][0-9]|12[0-8]$`
	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'prefixLength' is immutable"
	PrefixLength string `json:"prefixLength"`

	// Use the `name` value instead of the `slug` value
	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'site' is immutable"
	Site string `json:"site,omitempty"`

	// Use the `name` value instead of the `slug` value
	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'tenant' is immutable"
	Tenant string `json:"tenant,omitempty"`

	Description string `json:"description,omitempty"`

	Comments string `json:"comments,omitempty"`

	CustomFields map[string]string `json:"customFields,omitempty"`

	PreserveInNetbox bool `json:"preserveInNetbox,omitempty"`
}

PrefixClaimSpec defines the desired state of PrefixClaim TODO: The reason for using a workaround please see https://github.com/netbox-community/netbox-operator/pull/90#issuecomment-2402112475 +kubebuilder:validation:XValidation:rule="!has(oldSelf.site) || has(self.site)", message="Site is required once set" +kubebuilder:validation:XValidation:rule="(!has(self.parentPrefix) && has(self.parentPrefixSelector)) || (has(self.parentPrefix) && !has(self.parentPrefixSelector))"

func (*PrefixClaimSpec) DeepCopy

func (in *PrefixClaimSpec) DeepCopy() *PrefixClaimSpec

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

func (*PrefixClaimSpec) DeepCopyInto

func (in *PrefixClaimSpec) DeepCopyInto(out *PrefixClaimSpec)

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

type PrefixClaimStatus

type PrefixClaimStatus struct {

	// Due to the fact that the parent prefix can be specified directly in `ParentPrefix` or selected from `ParentPrefixSelector`,
	// we use this field to store exactly which parent prefix we are using for all subsequent reconcile loop calls,
	// as Spec.ParentPrefix is an immutable field, we can't overwrite it
	SelectedParentPrefix string             `json:"parentPrefix,omitempty"`
	Prefix               string             `json:"prefix,omitempty"`
	PrefixName           string             `json:"prefixName,omitempty"`
	Conditions           []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

PrefixClaimStatus defines the observed state of PrefixClaim

func (*PrefixClaimStatus) DeepCopy

func (in *PrefixClaimStatus) DeepCopy() *PrefixClaimStatus

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

func (*PrefixClaimStatus) DeepCopyInto

func (in *PrefixClaimStatus) DeepCopyInto(out *PrefixClaimStatus)

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

type PrefixList

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

PrefixList contains a list of Prefix

func (*PrefixList) DeepCopy

func (in *PrefixList) DeepCopy() *PrefixList

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

func (*PrefixList) DeepCopyInto

func (in *PrefixList) DeepCopyInto(out *PrefixList)

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

func (*PrefixList) DeepCopyObject

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

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

type PrefixSpec

type PrefixSpec struct {

	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Format=cidr
	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'prefix' is immutable"
	Prefix string `json:"prefix"`

	//+kubebuilder:validation:XValidation:rule="self == oldSelf || self != ”",message="Field 'site' is required once set"
	Site string `json:"site,omitempty"`

	//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'tenant' is immutable"
	Tenant string `json:"tenant,omitempty"`

	CustomFields map[string]string `json:"customFields,omitempty"`

	Description string `json:"description,omitempty"`

	Comments string `json:"comments,omitempty"`

	PreserveInNetbox bool `json:"preserveInNetbox,omitempty"`
}

PrefixSpec defines the desired state of Prefix +kubebuilder:validation:XValidation:rule="!has(oldSelf.site) || has(self.site)", message="Site is required once set"

func (*PrefixSpec) DeepCopy

func (in *PrefixSpec) DeepCopy() *PrefixSpec

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

func (*PrefixSpec) DeepCopyInto

func (in *PrefixSpec) DeepCopyInto(out *PrefixSpec)

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

type PrefixStatus

type PrefixStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// Prefix status: container, active, reserved , deprecated
	PrefixId int64 `json:"id,omitempty"`

	PrefixUrl string `json:"url,omitempty"`

	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

PrefixStatus defines the observed state of Prefix

func (*PrefixStatus) DeepCopy

func (in *PrefixStatus) DeepCopy() *PrefixStatus

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

func (*PrefixStatus) DeepCopyInto

func (in *PrefixStatus) DeepCopyInto(out *PrefixStatus)

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