Documentation
¶
Overview ¶
SPDX-FileCopyrightText: SAP SE or an SAP affiliate company and IronCore contributors SPDX-License-Identifier: Apache-2.0
Index ¶
- Variables
- func LoadProvider[T Provider](providerName string) (zero T, _ error)
- func Providers() []string
- func Register(name string, provider ProviderFunc)
- type AAAProvider
- type ACLProvider
- type ACLRequest
- type BGPPeerProvider
- type BGPPeerStatus
- type BGPPeerStatusRequest
- type BGPProvider
- type BannerProvider
- type CertificateProvider
- type ConfigBackupFile
- type ConfigBackupInventory
- type ConfigBackupProvider
- type ConfigBackupRequest
- type DHCPRelayProvider
- type DHCPRelayRequest
- type DNSProvider
- type DeleteAAARequest
- type DeleteACLRequest
- type DeleteBGPPeerRequest
- type DeleteBGPRequest
- type DeleteBannerRequest
- type DeleteCertificateRequest
- type DeleteDHCPRelayRequest
- type DeleteEVPNInstanceRequest
- type DeleteEthernetSegmentRequest
- type DeleteISISRequest
- type DeleteInterfaceRequest
- type DeleteManagementAccessRequest
- type DeleteOSPFRequest
- type DeletePrefixSetRequest
- type DeleteRoutingPolicyRequest
- type DeleteUserRequest
- type DeleteVLANRequest
- type DeleteVRFRequest
- type DeviceInfo
- type DevicePort
- type DeviceProvider
- type EVPNInstanceProvider
- type EVPNInstanceRequest
- type EnsureAAARequest
- type EnsureBGPPeerRequest
- type EnsureBGPRequest
- type EnsureBannerRequest
- type EnsureCertificateRequest
- type EnsureDNSRequest
- type EnsureEthernetSegmentRequest
- type EnsureISISRequest
- type EnsureInterfaceRequest
- type EnsureManagementAccessRequest
- type EnsureNTPRequest
- type EnsureOSPFRequest
- type EnsurePIMRequest
- type EnsureRoutingPolicyRequest
- type EnsureSNMPRequest
- type EnsureSyslogRequest
- type EnsureUserRequest
- type EthernetSegmentProvider
- type EthernetSegmentStatus
- type EthernetSegmentStatusRequest
- type IPv4
- type IPv4AddressList
- type IPv4Unnumbered
- type IPv6
- type IPv6AddressList
- type IPv6LinkLocalOnly
- type ISISProvider
- type InterfaceProvider
- type InterfaceRequest
- type InterfaceStatus
- type LLDPAdjacency
- type LLDPProvider
- type LLDPRequest
- type LLDPStatus
- type MACTableEntry
- type MACTableRequest
- type MaintenanceProvider
- type ManagementAccessProvider
- type MatchPrefixSetCondition
- type NTPProvider
- type NVEProvider
- type NVERequest
- type NVEStatus
- type NotFoundError
- type NotImplementedError
- type OSPFInterface
- type OSPFNeighbor
- type OSPFProvider
- type OSPFStatus
- type OSPFStatusRequest
- type PIMInterface
- type PIMProvider
- type PingRequest
- type PingStats
- type PolicyCondition
- type PolicyStatement
- type PrefixSetProvider
- type PrefixSetRequest
- type PrefixStats
- type ProbeProvider
- type Provider
- type ProviderConfig
- type ProviderFunc
- type ProvisioningProvider
- type RouteEntry
- type RouteTableRequest
- type RoutingPolicyProvider
- type SNMPProvider
- type SyslogProvider
- type TargetFirmware
- type UserProvider
- type VLANProvider
- type VLANRequest
- type VLANStatus
- type VRFProvider
- type VRFRequest
- type VTEPPeer
- type VTEPPeersRequest
Constants ¶
This section is empty.
Variables ¶
var ErrMaintenanceInProgress = errors.New("provider: maintenance in progress")
ErrMaintenanceInProgress is returned by MaintenanceProvider when it fails to fully complete a maintenance operation. The controller treats this as a signal to requeue and re-invoke rather than a hard failure.
Functions ¶
func LoadProvider ¶
LoadProvider returns a provider instance cast to the requested interface type T. Returns NotFoundError if the provider is not registered, NotImplementedError if it does not implement T.
func Providers ¶
func Providers() []string
Providers returns a slice of all registered provider names.
func Register ¶
func Register(name string, provider ProviderFunc)
Register registers a new provider with the given name. If a provider with the same name already exists, it panics.
Types ¶
type AAAProvider ¶
type AAAProvider interface {
Provider
// EnsureAAA call is responsible for AAA realization on the provider.
EnsureAAA(context.Context, *EnsureAAARequest) error
// DeleteAAA call is responsible for AAA deletion on the provider.
DeleteAAA(context.Context, *DeleteAAARequest) error
}
AAAProvider is the interface for the realization of the AAA objects over different providers.
type ACLProvider ¶
type ACLProvider interface {
Provider
// EnsureACL call is responsible for AccessControlList realization on the provider.
EnsureACL(context.Context, *ACLRequest) error
// DeleteACL call is responsible for AccessControlList deletion on the provider.
DeleteACL(context.Context, *DeleteACLRequest) error
}
ACLProvider is the interface for the realization of the AccessControlList objects over different providers.
type ACLRequest ¶
type ACLRequest struct {
ACL *v1alpha1.AccessControlList
ProviderConfig *ProviderConfig
}
type BGPPeerProvider ¶
type BGPPeerProvider interface {
Provider
// EnsureBGPPeer call is responsible for BGPPeer realization on the provider.
EnsureBGPPeer(context.Context, *EnsureBGPPeerRequest) error
// DeleteBGPPeer call is responsible for BGPPeer deletion on the provider.
DeleteBGPPeer(context.Context, *DeleteBGPPeerRequest) error
// GetPeerStatus call is responsible for retrieving the current status of the BGPPeer from the provider.
GetPeerStatus(context.Context, *BGPPeerStatusRequest) (BGPPeerStatus, error)
}
BGPPeerProvider is the interface for the realization of the BGPPeer objects over different providers.
type BGPPeerStatus ¶
type BGPPeerStatus struct {
SessionState v1alpha1.BGPPeerSessionState
LastEstablishedTime time.Time
AddressFamilies map[v1alpha1.BGPAddressFamilyType]*PrefixStats
}
type BGPPeerStatusRequest ¶
type BGPPeerStatusRequest struct {
BGPPeer *v1alpha1.BGPPeer
ProviderConfig *ProviderConfig
// VRF is the resolved VRF referenced by the BGP instance of this peer.
// When nil, the provider shall use the default VRF.
VRF *v1alpha1.VRF
}
type BGPProvider ¶
type BGPProvider interface {
Provider
// EnsureBGP call is responsible for BGP realization on the provider.
EnsureBGP(context.Context, *EnsureBGPRequest) error
// DeleteBGP call is responsible for BGP deletion on the provider.
DeleteBGP(context.Context, *DeleteBGPRequest) error
}
BGPProvider is the interface for the realization of the BGP objects over different providers.
type BannerProvider ¶
type BannerProvider interface {
Provider
// EnsureBanner call is responsible for Banner realization on the provider.
EnsureBanner(context.Context, *EnsureBannerRequest) error
// DeleteBanner call is responsible for Banner deletion on the provider.
DeleteBanner(context.Context, *DeleteBannerRequest) error
}
BannerProvider is the interface for the realization of the Banner objects over different providers.
type CertificateProvider ¶
type CertificateProvider interface {
Provider
// EnsureCertificate call is responsible for Certificate realization on the provider.
EnsureCertificate(context.Context, *EnsureCertificateRequest) error
// DeleteCertificate call is responsible for Certificate deletion on the provider.
DeleteCertificate(context.Context, *DeleteCertificateRequest) error
}
CertificateProvider is the interface for the realization of the Certificate objects over different providers.
type ConfigBackupFile ¶
type ConfigBackupInventory ¶
type ConfigBackupInventory struct {
// Backups contains only the backups managed by this ConfigBackup policy.
Backups []*ConfigBackupFile
// TotalBytes/UsedBytes/FreeBytes describe the underlying storage usage on the device
// and may include unrelated files outside Backups. A value of `nil` indicates that the
// provider does not support reporting storage usage.
TotalBytes *int64
UsedBytes *int64
FreeBytes *int64
}
func (*ConfigBackupInventory) FreePercent ¶
func (i *ConfigBackupInventory) FreePercent() *int32
FreePercent returns the free storage as a percentage (0-100), or nil if the inventory lacks the data to compute it.
func (*ConfigBackupInventory) ThresholdBreached ¶
func (i *ConfigBackupInventory) ThresholdBreached(threshold *v1alpha1.ConfigBackupStorageThreshold) bool
ThresholdBreached reports whether the inventory's free storage violates the given threshold. Returns false if threshold is nil or the inventory lacks the data to evaluate.
func (*ConfigBackupInventory) TotalBackupSizeBytes ¶
func (i *ConfigBackupInventory) TotalBackupSizeBytes() (total int64, ok bool)
TotalBackupSizeBytes returns the total size of all backups in the inventory, in bytes. If a backup's size is unknown (nil), it is ignored in the total. If all backups have unknown sizes, ok will be false.
type ConfigBackupProvider ¶
type ConfigBackupProvider interface {
Provider
// RunningConfig returns the current running configuration of the device
// in its provider-specific encoding.
RunningConfig(context.Context) ([]byte, error)
// CreateConfigBackup writes a new configuration backup to the device.
CreateConfigBackup(context.Context, *ConfigBackupRequest) (*ConfigBackupFile, error)
// ListConfigBackups lists the backups currently discovered for the ConfigBackup policy.
ListConfigBackups(context.Context, *ConfigBackupRequest) (*ConfigBackupInventory, error)
// DeleteConfigBackups removes the provided backups from the device.
DeleteConfigBackups(context.Context, ...*ConfigBackupFile) error
}
ConfigBackupProvider performs on-device configuration backup operations.
type ConfigBackupRequest ¶
type ConfigBackupRequest struct {
ConfigBackup *v1alpha1.ConfigBackup
ProviderConfig *ProviderConfig
}
type DHCPRelayProvider ¶
type DHCPRelayProvider interface {
Provider
// EnsureDHCPRelay realizes DHCP Relay configuration.
EnsureDHCPRelay(context.Context, *DHCPRelayRequest) error
// DeleteDHCPRelay deletes the DHCP Relay configuration.
DeleteDHCPRelay(context.Context, *DeleteDHCPRelayRequest) error
}
type DHCPRelayRequest ¶
type DNSProvider ¶
type DNSProvider interface {
Provider
// EnsureDNS call is responsible for DNS realization on the provider.
EnsureDNS(context.Context, *EnsureDNSRequest) error
// DeleteDNS call is responsible for DNS deletion on the provider.
DeleteDNS(context.Context) error
}
DNSProvider is the interface for the realization of the DNS objects over different providers.
type DeleteAAARequest ¶
type DeleteACLRequest ¶
type DeleteACLRequest struct {
ACL *v1alpha1.AccessControlList
}
type DeleteBGPPeerRequest ¶
type DeleteBGPRequest ¶
type DeleteBannerRequest ¶
type DeleteBannerRequest struct {
Type v1alpha1.BannerType
}
type DeleteCertificateRequest ¶
type DeleteCertificateRequest struct {
ID string
}
type DeleteDHCPRelayRequest ¶
type DeleteEVPNInstanceRequest ¶
type DeleteEVPNInstanceRequest struct {
EVPNInstance *v1alpha1.EVPNInstance
VRF *v1alpha1.VRF
}
type DeleteEthernetSegmentRequest ¶
type DeleteEthernetSegmentRequest struct {
EthernetSegment *v1alpha1.EthernetSegment
Interface *v1alpha1.Interface
}
type DeleteISISRequest ¶
type DeleteInterfaceRequest ¶
type DeleteManagementAccessRequest ¶
type DeleteManagementAccessRequest struct {
ManagementAccess *v1alpha1.ManagementAccess
}
type DeleteOSPFRequest ¶
type DeletePrefixSetRequest ¶
type DeleteRoutingPolicyRequest ¶
type DeleteRoutingPolicyRequest struct {
Name string
}
type DeleteUserRequest ¶
type DeleteUserRequest struct {
Username string
}
type DeleteVLANRequest ¶
type DeleteVRFRequest ¶
type DeviceInfo ¶
type DeviceInfo struct {
// Hostname is the hostname of the device.
Hostname string
// Manufacturer is the manufacturer of the device, e.g. "Cisco".
Manufacturer string
// Model is the model of the device, e.g. "N9K-C9332D-GX2B".
Model string
// SerialNumber is the serial number of the device.
SerialNumber string
// FirmwareVersion is the firmware version running on the device, e.g. "10.4(3)".
FirmwareVersion string
}
type DevicePort ¶
type DevicePort struct {
// ID is the unique identifier of the port on the device.
ID string
// Type is the type of the port, e.g. "10g".
Type string
// SupportedSpeedsGbps is the list of supported speeds for the port in Gbps.
SupportedSpeedsGbps []int32
// Trasceiver is the type of transceiver present on the port, e.g. "SFP" or "QSFP", if any.
Transceiver string
}
type DeviceProvider ¶
type DeviceProvider interface {
Provider
// ListPorts retrieves the list of available ports on the device.
// This can be used to validate port references in other resources.
ListPorts(context.Context) ([]DevicePort, error)
// GetDeviceInfo retrieves basic information about the device,
// such as manufacturer, model, serial number, and firmware version.
GetDeviceInfo(context.Context) (*DeviceInfo, error)
// GetLastRebootTime retrieves the timestamp of the last device reboot.
GetLastRebootTime(context.Context) (time.Time, error)
}
type EVPNInstanceProvider ¶
type EVPNInstanceProvider interface {
Provider
// EnsureEVPNInstance call is responsible for EVPNInstance realization on the provider.
EnsureEVPNInstance(context.Context, *EVPNInstanceRequest) error
// DeleteEVPNInstance call is responsible for EVPNInstance deletion on the provider.
DeleteEVPNInstance(context.Context, *DeleteEVPNInstanceRequest) error
}
EVPNInstanceProvider is the interface for the realization of the EVPNInstance objects over different providers.
type EVPNInstanceRequest ¶
type EVPNInstanceRequest struct {
EVPNInstance *v1alpha1.EVPNInstance
ProviderConfig *ProviderConfig
VLAN *v1alpha1.VLAN
VRF *v1alpha1.VRF
}
type EnsureAAARequest ¶
type EnsureAAARequest struct {
AAA *v1alpha1.AAA
ProviderConfig *ProviderConfig
// TACACSServerKeys contains the plain text keys for each TACACS+ server,
// keyed by server address.
TACACSServerKeys map[string]string
// RADIUSServerKeys contains the plain text shared secrets for each RADIUS server,
// keyed by server address.
RADIUSServerKeys map[string]string
}
type EnsureBGPPeerRequest ¶
type EnsureBGPPeerRequest struct {
BGPPeer *v1alpha1.BGPPeer
ProviderConfig *ProviderConfig
SourceInterface string
// BGP is the resolved BGP instance referenced by BGPPeer.Spec.BgpRef.
BGP *v1alpha1.BGP
// VRF is the resolved VRF referenced by BGP.Spec.VrfRef.
// When nil, the provider shall use the default VRF.
VRF *v1alpha1.VRF
// InboundRoutingPolicies maps each address family to the device-level name of
// the inbound routing policy to apply. Absent key means no policy is configured.
InboundRoutingPolicies map[v1alpha1.BGPAddressFamilyType]string
// OutboundRoutingPolicies maps each address family to the device-level name of
// the outbound routing policy to apply. Absent key means no policy is configured.
OutboundRoutingPolicies map[v1alpha1.BGPAddressFamilyType]string
}
type EnsureBGPRequest ¶
type EnsureBGPRequest struct {
BGP *v1alpha1.BGP
ProviderConfig *ProviderConfig
// VRF is the resolved VRF referenced by BGP.Spec.VrfRef.
// When nil, the provider shall use the default VRF.
VRF *v1alpha1.VRF
// RedistributeDirectRoutePolicies maps each address family to the resolved
// RoutingPolicy to apply when redistributing directly connected routes.
// Absent key means no redistribution is configured for that family.
RedistributeDirectRoutePolicies map[v1alpha1.BGPAddressFamilyType]*v1alpha1.RoutingPolicy
}
type EnsureBannerRequest ¶
type EnsureBannerRequest struct {
Message string
Type v1alpha1.BannerType
ProviderConfig *ProviderConfig
}
type EnsureCertificateRequest ¶
type EnsureCertificateRequest struct {
ID string
Certificate *tls.Certificate
ProviderConfig *ProviderConfig
}
type EnsureDNSRequest ¶
type EnsureDNSRequest struct {
DNS *v1alpha1.DNS
ProviderConfig *ProviderConfig
}
type EnsureEthernetSegmentRequest ¶
type EnsureEthernetSegmentRequest struct {
EthernetSegment *v1alpha1.EthernetSegment
Interface *v1alpha1.Interface
ProviderConfig *ProviderConfig
}
type EnsureISISRequest ¶
type EnsureISISRequest struct {
ISIS *v1alpha1.ISIS
Interfaces []*v1alpha1.Interface
ProviderConfig *ProviderConfig
}
type EnsureInterfaceRequest ¶
type EnsureInterfaceRequest struct {
Interface *v1alpha1.Interface
ProviderConfig *ProviderConfig
IPv4 IPv4
IPv6 IPv6
// Members is the list of member interfaces for aggregated interfaces.
// This field is only applicable if the interface type is Aggregate.
Members []*v1alpha1.Interface
// MultiChassisID is the multi-chassis identifier for multi-chassis link aggregation.
MultiChassisID *int16
// AggregateParent is the parent Aggregate interface when this interface is
// a member of an aggregated interface.
// This field is only applicable if the interface type is Physical.
AggregateParent *v1alpha1.Interface
// VLAN is the referenced VLAN for routed VLAN interfaces (SVI).
// This field is only applicable if the interface type is RoutedVLAN.
VLAN *v1alpha1.VLAN
// VRF is the VRF to which the interface belongs.
// If unset, the interface is part of the default VRF.
// Only applicable for layer3 interfaces.
VRF *v1alpha1.VRF
}
type EnsureManagementAccessRequest ¶
type EnsureManagementAccessRequest struct {
ManagementAccess *v1alpha1.ManagementAccess
ProviderConfig *ProviderConfig
}
type EnsureNTPRequest ¶
type EnsureNTPRequest struct {
NTP *v1alpha1.NTP
ProviderConfig *ProviderConfig
}
type EnsureOSPFRequest ¶
type EnsureOSPFRequest struct {
OSPF *v1alpha1.OSPF
ProviderConfig *ProviderConfig
Interfaces []OSPFInterface
}
type EnsurePIMRequest ¶
type EnsurePIMRequest struct {
PIM *v1alpha1.PIM
Interfaces []PIMInterface
ProviderConfig *ProviderConfig
}
type EnsureRoutingPolicyRequest ¶
type EnsureRoutingPolicyRequest struct {
Name string
Statements []PolicyStatement
ProviderConfig *ProviderConfig
}
type EnsureSNMPRequest ¶
type EnsureSNMPRequest struct {
SNMP *v1alpha1.SNMP
ProviderConfig *ProviderConfig
}
type EnsureSyslogRequest ¶
type EnsureSyslogRequest struct {
Syslog *v1alpha1.Syslog
ProviderConfig *ProviderConfig
}
type EnsureUserRequest ¶
type EnsureUserRequest struct {
Username string
Password string `json:"-"`
SSHKey string
Roles []string
ProviderConfig *ProviderConfig
}
type EthernetSegmentProvider ¶
type EthernetSegmentProvider interface {
Provider
// EnsureEthernetSegment is responsible for EthernetSegment realization on the provider.
EnsureEthernetSegment(context.Context, *EnsureEthernetSegmentRequest) error
// DeleteEthernetSegment is responsible for EthernetSegment deletion on the provider.
DeleteEthernetSegment(context.Context, *DeleteEthernetSegmentRequest) error
// GetEthernetSegmentStatus reads back the realized ESI from the device.
GetEthernetSegmentStatus(context.Context, *EthernetSegmentStatusRequest) (EthernetSegmentStatus, error)
}
type EthernetSegmentStatus ¶
type EthernetSegmentStatus struct {
// ESI is the realized 10-byte ESI in colon-separated hex, read from device operational state.
// For auto-derived ESI types this is the value generated by the device.
ESI string
// OperStatus indicates whether the Ethernet Segment is operationally up (true) or down (false).
OperStatus bool
}
type EthernetSegmentStatusRequest ¶
type EthernetSegmentStatusRequest struct {
EthernetSegment *v1alpha1.EthernetSegment
Interface *v1alpha1.Interface
ProviderConfig *ProviderConfig
}
type IPv4AddressList ¶
type IPv4Unnumbered ¶
type IPv4Unnumbered struct {
SourceInterface string
}
type IPv6AddressList ¶
type IPv6LinkLocalOnly ¶
type IPv6LinkLocalOnly struct{}
IPv6LinkLocalOnly configures the interface to use only its automatically generated IPv6 link-local address, without a global address.
type ISISProvider ¶
type ISISProvider interface {
Provider
// EnsureISIS call is responsible for ISIS realization on the provider.
EnsureISIS(context.Context, *EnsureISISRequest) error
// DeleteISIS call is responsible for ISIS deletion on the provider.
DeleteISIS(context.Context, *DeleteISISRequest) error
}
ISISProvider is the interface for the realization of the ISIS objects over different providers.
type InterfaceProvider ¶
type InterfaceProvider interface {
Provider
// EnsureInterface call is responsible for Interface realization on the provider.
EnsureInterface(context.Context, *EnsureInterfaceRequest) error
// DeleteInterface call is responsible for Interface deletion on the provider.
DeleteInterface(context.Context, *DeleteInterfaceRequest) error
// GetInterfaceStatus call is responsible for retrieving the current status of the Interface from the provider.
GetInterfaceStatus(context.Context, *InterfaceRequest) (InterfaceStatus, error)
// InterfaceNameEqual reports whether two interface names refer to the same interface on the provider.
InterfaceNameEqual(context.Context, string, string) (bool, error)
// LoopbackInterfaceName returns the vendor-specific interface name for a loopback with the given numeric ID.
LoopbackInterfaceName(id int) (string, error)
}
InterfaceProvider is the interface for the realization of the Interface objects over different providers.
type InterfaceRequest ¶
type InterfaceRequest struct {
Interface *v1alpha1.Interface
ProviderConfig *ProviderConfig
}
type InterfaceStatus ¶
type InterfaceStatus struct {
// OperStatus indicates whether the interface is operationally up (true) or down (false).
OperStatus bool
// OperMessage provides additional information about the operational status of the interface.
// Leave empty if the provider does not return any additional information.
OperMessage string
// LLDPAdjacencies provides information about the directly connected neighbors on this interface, if available.
LLDPAdjacencies []LLDPAdjacency
}
type LLDPAdjacency ¶
type LLDPAdjacency struct {
SysName string
SysDescription string
ChassisID string
ChassisIDType uint8
PortID string
PortIDType uint8
PortDescription string
TTL time.Duration
}
LLDPAdjacency represents information about a directly connected neighbor on an interface, as discovered through LLDP.
type LLDPProvider ¶
type LLDPProvider interface {
Provider
// EnsureLLDP realizes LLDP configuration.
EnsureLLDP(context.Context, *LLDPRequest) error
// DeleteLLDP deletes the LLDP configuration.
DeleteLLDP(context.Context) error
// GetLLDPStatus call retrieves the current status of the LLDP configuration.
GetLLDPStatus(context.Context, *LLDPRequest) (LLDPStatus, error)
}
LLDPProvider is an interface to configure LLDP on a device.
type LLDPRequest ¶
type LLDPRequest struct {
LLDP *v1alpha1.LLDP
ProviderConfig *ProviderConfig
// Interfaces are the Interface resources referenced by LLDP.Spec.InterfaceRefs.
Interfaces []*v1alpha1.Interface
}
type LLDPStatus ¶
type LLDPStatus struct {
// OperStatus indicates whether LLDP is operationally up (true) or down (false).
OperStatus bool
}
LLDPStatus represents the operational status of LLDP on the device. It does not include neighbor information; this is handled in a different resource.
type MACTableEntry ¶
type MACTableEntry struct {
// MACAddress is the MAC address (e.g., "00:1a:2b:3c:4d:5e").
MACAddress string
}
MACTableEntry represents a single entry in the device's MAC address table.
type MACTableRequest ¶
type MACTableRequest struct {
// VLAN constrains the lookup to a specific VLAN ID. Zero means no VLAN filter-w>=
VLAN int16
ProviderConfig *ProviderConfig
}
MACTableRequest contains the inputs for retrieving MAC table entries.
type MaintenanceProvider ¶
type MaintenanceProvider interface {
Provider
// Reboot initiates a reboot of the device.
Reboot(context.Context, *deviceutil.Connection) error
// FactoryReset performs a factory reset of the device.
FactoryReset(context.Context, *deviceutil.Connection) error
// UpgradeFirmware initiates a firmware upgrade on the device.
// The provider is responsible for applying the new firmware and rebooting the device as necessary.
UpgradeFirmware(context.Context, *deviceutil.Connection, TargetFirmware) error
}
MaintenanceProvider is the interface for disruptive device lifecycle operations.
type ManagementAccessProvider ¶
type ManagementAccessProvider interface {
Provider
// EnsureManagementAccess call is responsible for ManagementAccess realization on the provider.
EnsureManagementAccess(context.Context, *EnsureManagementAccessRequest) error
// DeleteManagementAccess call is responsible for ManagementAccess deletion on the provider.
DeleteManagementAccess(context.Context, *DeleteManagementAccessRequest) error
}
ManagementAccessProvider is the interface for the realization of the ManagementAccess objects over different providers.
type MatchPrefixSetCondition ¶
type NTPProvider ¶
type NTPProvider interface {
Provider
// EnsureNTP call is responsible for NTP realization on the provider.
EnsureNTP(context.Context, *EnsureNTPRequest) error
// DeleteNTP call is responsible for NTP deletion on the provider.
DeleteNTP(context.Context) error
}
NTPProvider is the interface for the realization of the NTP objects over different providers.
type NVEProvider ¶
type NVEProvider interface {
Provider
// EnsureVRF call is responsible for VRF realization on the provider.
EnsureNVE(context.Context, *NVERequest) error
// DeleteVRF call is responsible for VRF deletion on the provider.
DeleteNVE(context.Context) error
// GetInterfaceStatus call is responsible for retrieving the current status of the Interface from the provider.
GetNVEStatus(context.Context, *NVERequest) (NVEStatus, error)
}
type NVERequest ¶
type NVERequest struct {
NVE *v1alpha1.NetworkVirtualizationEdge
SourceInterface *v1alpha1.Interface
AnycastSourceInterface *v1alpha1.Interface
ProviderConfig *ProviderConfig
}
type NVEStatus ¶
type NVEStatus struct {
// OperStatus indicates whether the NVE is operationally up (true) or down (false).
OperStatus bool
// OperStatusSourceInterface indicates if the primary source interface is operationally up (true) or down (false).
OperStatusSourceInterface bool
// OperStatusAnycastSourceInterface indicates if the primary and anycast interfaces are operationally up (true) or down (false).
OperStatusAnycastSourceInterface bool
// SourceInterfaceName is the name of the interface configured as source interface in the remote device.
SourceInterfaceName string
// AnycastSourceInterfaceName is the name of the interface configured as anycast source interface in the remote device.
AnycastSourceInterfaceName string
// HostReachabilityType is the type of host reachability configured on the remote device.
HostReachabilityType string
}
type NotFoundError ¶
type NotFoundError struct {
ProviderName string
}
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
func (NotFoundError) Is ¶
func (e NotFoundError) Is(target error) bool
type NotImplementedError ¶
func (NotImplementedError[T]) Error ¶
func (e NotImplementedError[T]) Error() string
type OSPFInterface ¶
type OSPFNeighbor ¶
type OSPFProvider ¶
type OSPFProvider interface {
Provider
// EnsureOSPF call is responsible for OSPF realization on the provider.
EnsureOSPF(context.Context, *EnsureOSPFRequest) error
// DeleteOSPF call is responsible for OSPF deletion on the provider.
DeleteOSPF(context.Context, *DeleteOSPFRequest) error
// GetOSPFStatus call is responsible for retrieving the current status of the OSPF from the provider.
GetOSPFStatus(context.Context, *OSPFStatusRequest) (OSPFStatus, error)
}
OSPFProvider is the interface for the realization of the OSPF objects over different providers.
type OSPFStatus ¶
type OSPFStatus struct {
// OperStatus indicates whether the ospf instance is operationally up (true) or down (false).
OperStatus bool
// Neighbors is a list of OSPF neighbors and their adjacency states.
Neighbors []OSPFNeighbor
}
type OSPFStatusRequest ¶
type OSPFStatusRequest struct {
OSPF *v1alpha1.OSPF
ProviderConfig *ProviderConfig
Interfaces []OSPFInterface
}
type PIMInterface ¶
type PIMInterface struct {
Interface *v1alpha1.Interface
Mode v1alpha1.PIMInterfaceMode
}
type PIMProvider ¶
type PIMProvider interface {
Provider
// EnsurePIM call is responsible for PIM realization on the provider.
EnsurePIM(context.Context, *EnsurePIMRequest) error
// DeletePIM call is responsible for PIM deletion on the provider.
DeletePIM(context.Context) error
}
PIMProvider is the interface for the realization of the PIM objects over different providers.
type PingRequest ¶
type PingRequest struct {
// Address is the target IP to ping.
Address string
// SourceInterface is the resolved source interface name on the device. May be empty.
SourceInterface string
// VRF is the resolved VRF name on the device. May be empty for the default VRF.
VRF string
// Count is the number of ICMP echo requests to send.
Count int32
// PacketSize is the ICMP payload size in bytes. Zero means use device default.
PacketSize int32
// Timeout is the maximum time to wait for a reply per echo request. Zero means use device default.
Timeout time.Duration
ProviderConfig *ProviderConfig
}
PingRequest contains the inputs for executing a ping probe.
type PingStats ¶
type PingStats struct {
Sent int32
Received int32
MinTime time.Duration
AvgTime time.Duration
MaxTime time.Duration
}
PingStats contains the statistics returned by a Ping probe execution.
type PolicyCondition ¶
type PolicyCondition interface {
// contains filtered or unexported methods
}
type PolicyStatement ¶
type PolicyStatement struct {
Sequence int32
Conditions []PolicyCondition
Actions v1alpha1.PolicyActions
}
type PrefixSetProvider ¶
type PrefixSetProvider interface {
Provider
// EnsurePrefixSet call is responsible for PrefixSet realization on the provider.
EnsurePrefixSet(context.Context, *PrefixSetRequest) error
// DeletePrefixSet call is responsible for PrefixSet deletion on the provider.
DeletePrefixSet(context.Context, *DeletePrefixSetRequest) error
}
PrefixSetProvider is the interface for the realization of the PrefixSet objects over different providers.
type PrefixSetRequest ¶
type PrefixSetRequest struct {
PrefixSet *v1alpha1.PrefixSet
ProviderConfig *ProviderConfig
}
type PrefixStats ¶
type ProbeProvider ¶
type ProbeProvider interface {
Provider
// Ping sends ICMP echo requests from the device to a target address and returns the statistics.
Ping(context.Context, *PingRequest) (*PingStats, error)
// GetMACTable retrieves MAC table entries from the device, optionally filtered by VLAN and VRF.
GetMACTable(context.Context, *MACTableRequest) ([]MACTableEntry, error)
// GetRouteTable retrieves routing table entries for a VRF from the device.
GetRouteTable(context.Context, *RouteTableRequest) ([]RouteEntry, error)
// GetVTEPPeers retrieves the NVE/VXLAN peer list from the device.
GetVTEPPeers(context.Context, *VTEPPeersRequest) ([]VTEPPeer, error)
}
ProbeProvider executes probe assertions against a device.
type Provider ¶
type Provider interface {
Connect(context.Context, *deviceutil.Connection) error
Disconnect(context.Context, *deviceutil.Connection) error
}
Provider is the common interface used to establish and tear down connections to the provider.
type ProviderConfig ¶
type ProviderConfig struct {
// contains filtered or unexported fields
}
ProviderConfig is a wrapper around an unstructured.Unstructured object that represents a provider-specific configuration.
func GetProviderConfig ¶
func GetProviderConfig(ctx context.Context, r client.Reader, namespace string, ref *v1alpha1.TypedLocalObjectReference) (*ProviderConfig, error)
GetProviderConfig retrieves the provider-specific configuration resource for a given reference.
func (ProviderConfig) Into ¶
func (p ProviderConfig) Into(v any) error
Into converts the underlying unstructured object into the specified type.
type ProviderFunc ¶
type ProviderFunc func() Provider //nolint:revive // stutter is intentional; ProviderFunc is the established name used across all controllers
ProviderFunc returns a new Provider instance.
func Get ¶
func Get(name string) (ProviderFunc, error)
Get returns the provider with the given name. If the provider does not exist, it returns an error.
type ProvisioningProvider ¶
type ProvisioningProvider interface {
Provider
// Reprovision prepares the device for reprovisioning by resetting it and reenabling provisioning mechanisms.
Reprovision(context.Context, *deviceutil.Connection) error
// HashProvisioningPassword takes a plaintext password and returns the hashed password along with the hash type.
// This is necessary to securely provision user accounts on devices using a potentially insecure channel.
HashProvisioningPassword(password string) (hash string, algorithm string, err error)
// VerifyProvisioned checks if the provisioning process has been completed successfully on the device.
VerifyProvisioned(context.Context, *deviceutil.Connection, *v1alpha1.Device) bool
}
ProvisioningProvider is the interface for the realization of the provisioning-related operations over different providers.
type RouteEntry ¶
type RouteEntry struct {
// Prefix is the IP prefix (e.g., "10.100.0.0/16").
Prefix string
}
RouteEntry represents a single entry in the device's routing table.
type RouteTableRequest ¶
type RouteTableRequest struct {
// VRF is the resolved VRF name on the device. May be empty for the default VRF.
VRF string
ProviderConfig *ProviderConfig
}
RouteTableRequest contains the inputs for retrieving routing table entries.
type RoutingPolicyProvider ¶
type RoutingPolicyProvider interface {
Provider
// EnsureRoutingPolicy call is responsible for RoutingPolicy realization on the provider.
EnsureRoutingPolicy(context.Context, *EnsureRoutingPolicyRequest) error
// DeleteRoutingPolicy call is responsible for RoutingPolicy deletion on the provider.
DeleteRoutingPolicy(context.Context, *DeleteRoutingPolicyRequest) error
}
RoutingPolicyProvider is the interface for the realization of the RoutingPolicy objects over different providers.
type SNMPProvider ¶
type SNMPProvider interface {
Provider
// EnsureSNMP call is responsible for SNMP realization on the provider.
EnsureSNMP(context.Context, *EnsureSNMPRequest) error
// DeleteSNMP call is responsible for SNMP deletion on the provider.
DeleteSNMP(context.Context) error
}
SNMPProvider is the interface for the realization of the SNMP objects over different providers.
type SyslogProvider ¶
type SyslogProvider interface {
Provider
// EnsureSyslog call is responsible for Syslog realization on the provider.
EnsureSyslog(context.Context, *EnsureSyslogRequest) error
// DeleteSyslog call is responsible for Syslog deletion on the provider.
DeleteSyslog(context.Context) error
}
SyslogProvider is the interface for the realization of the Syslog objects over different providers.
type TargetFirmware ¶
type TargetFirmware struct {
// URL is the URL of the firmware image to be applied to the device.
URL string `json:"url"`
// MD5 is the MD5 checksum of the firmware image, if available.
MD5 string `json:"md5,omitempty"`
}
TargetFirmware represents the firmware image to be applied to the device, including its URL and optional checksum.
type UserProvider ¶
type UserProvider interface {
Provider
// EnsureUser call is responsible for User realization on the provider.
EnsureUser(context.Context, *EnsureUserRequest) error
// DeleteUser call is responsible for User deletion on the provider.
DeleteUser(context.Context, *DeleteUserRequest) error
}
UserProvider is the interface for the realization of the User objects over different providers.
type VLANProvider ¶
type VLANProvider interface {
Provider
// EnsureVLAN call is responsible for VLAN realization on the provider.
EnsureVLAN(context.Context, *VLANRequest) error
// DeleteVLAN call is responsible for VLAN deletion on the provider.
DeleteVLAN(context.Context, *DeleteVLANRequest) error
// GetVLANStatus call is responsible for retrieving the current status of the VLAN from the provider.
GetVLANStatus(context.Context, *VLANRequest) (VLANStatus, error)
}
VLANProvider is the interface for the realization of the VLAN objects over different providers.
type VLANRequest ¶
type VLANRequest struct {
VLAN *v1alpha1.VLAN
ProviderConfig *ProviderConfig
}
type VLANStatus ¶
type VLANStatus struct {
// OperStatus indicates whether the interface is operationally up (true) or down (false).
OperStatus bool
}
type VRFProvider ¶
type VRFProvider interface {
Provider
// EnsureVRF call is responsible for VRF realization on the provider.
EnsureVRF(context.Context, *VRFRequest) error
// DeleteVRF call is responsible for VRF deletion on the provider.
DeleteVRF(context.Context, *DeleteVRFRequest) error
}
VRFProvider is the interface for the realization of the VRF objects over different providers.
type VRFRequest ¶
type VRFRequest struct {
VRF *v1alpha1.VRF
ProviderConfig *ProviderConfig
}
VRFRequest is the request for handling a VRF on the provider.
type VTEPPeer ¶
type VTEPPeer struct {
// PeerIP is the remote VTEP IP address.
PeerIP string
// OperStatus indicates whether the peer is operationally up (true) or down (false).
OperStatus bool
}
VTEPPeer represents a single NVE/VXLAN peer entry from the device.
type VTEPPeersRequest ¶
type VTEPPeersRequest struct {
ProviderConfig *ProviderConfig
}
VTEPPeersRequest contains the inputs for retrieving VTEP peer information.
Directories
¶
| Path | Synopsis |
|---|---|
|
cisco
|
|
|
iosxr
SPDX-FileCopyrightText: SAP SE or an SAP affiliate company and IronCore contributors SPDX-License-Identifier: Apache-2.0
|
SPDX-FileCopyrightText: SAP SE or an SAP affiliate company and IronCore contributors SPDX-License-Identifier: Apache-2.0 |
|
nxos
SPDX-FileCopyrightText: SAP SE or an SAP affiliate company and IronCore contributors SPDX-License-Identifier: Apache-2.0
|
SPDX-FileCopyrightText: SAP SE or an SAP affiliate company and IronCore contributors SPDX-License-Identifier: Apache-2.0 |
|
Package openconfig implements provider support for OpenConfig-compliant devices using gNMI (e.g.
|
Package openconfig implements provider support for OpenConfig-compliant devices using gNMI (e.g. |