Documentation
¶
Overview ¶
SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and IronCore contributors SPDX-License-Identifier: Apache-2.0
Index ¶
- func Providers() []string
- func Register(name string, provider ProviderFunc)
- type ACLProvider
- type BGPPeerProvider
- type BGPPeerStatus
- type BGPPeerStatusRequest
- type BGPProvider
- type BannerProvider
- type CertificateProvider
- type DNSProvider
- type DeleteACLRequest
- type DeleteBGPPeerRequest
- type DeleteBGPRequest
- type DeleteBannerRequest
- type DeleteCertificateRequest
- type DeleteISISRequest
- type DeleteOSPFRequest
- type DeletePIMRequest
- type DeleteRoutingPolicyRequest
- type DeleteSNMPRequest
- type DeleteUserRequest
- type DeviceInfo
- type DevicePort
- type DeviceProvider
- type EVPNInstanceProvider
- type EVPNInstanceRequest
- type EnsureACLRequest
- type EnsureBGPPeerRequest
- type EnsureBGPRequest
- type EnsureBannerRequest
- type EnsureCertificateRequest
- type EnsureDNSRequest
- type EnsureISISRequest
- type EnsureInterfaceRequest
- type EnsureManagementAccessRequest
- type EnsureNTPRequest
- type EnsureOSPFRequest
- type EnsurePIMRequest
- type EnsureRoutingPolicyRequest
- type EnsureSNMPRequest
- type EnsureSyslogRequest
- type EnsureUserRequest
- type IPv4
- type IPv4AddressList
- type IPv4Unnumbered
- type ISISProvider
- type InterfaceProvider
- type InterfaceRequest
- type InterfaceStatus
- type ManagementAccessProvider
- type MatchPrefixSetCondition
- type NTPProvider
- type NVEProvider
- type NVERequest
- type NVEStatus
- type OSPFInterface
- type OSPFNeighbor
- type OSPFProvider
- type OSPFStatus
- type OSPFStatusRequest
- type PIMInterface
- type PIMProvider
- type PolicyCondition
- type PolicyStatement
- type PrefixSetProvider
- type PrefixSetRequest
- type PrefixStats
- type Provider
- type ProviderConfig
- type ProviderFunc
- type ProvisioningProvider
- type RoutingPolicyProvider
- type SNMPProvider
- type SyslogProvider
- type UserProvider
- type VLANProvider
- type VLANRequest
- type VLANStatus
- type VRFProvider
- type VRFRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ACLProvider ¶
type ACLProvider interface {
Provider
// EnsureACL call is responsible for AccessControlList realization on the provider.
EnsureACL(context.Context, *EnsureACLRequest) 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 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
}
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 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 DeleteACLRequest ¶
type DeleteACLRequest struct {
Name string
ProviderConfig *ProviderConfig
}
type DeleteBGPPeerRequest ¶
type DeleteBGPPeerRequest struct {
BGPPeer *v1alpha1.BGPPeer
ProviderConfig *ProviderConfig
}
type DeleteBGPRequest ¶
type DeleteBGPRequest struct {
BGP *v1alpha1.BGP
ProviderConfig *ProviderConfig
}
type DeleteBannerRequest ¶
type DeleteBannerRequest struct {
Type v1alpha1.BannerType
}
type DeleteCertificateRequest ¶
type DeleteCertificateRequest struct {
ID string
ProviderConfig *ProviderConfig
}
type DeleteISISRequest ¶
type DeleteISISRequest struct {
ISIS *v1alpha1.ISIS
ProviderConfig *ProviderConfig
}
type DeleteOSPFRequest ¶
type DeleteOSPFRequest struct {
OSPF *v1alpha1.OSPF
ProviderConfig *ProviderConfig
}
type DeletePIMRequest ¶
type DeletePIMRequest struct {
PIM *v1alpha1.PIM
ProviderConfig *ProviderConfig
}
type DeleteRoutingPolicyRequest ¶
type DeleteRoutingPolicyRequest struct {
Name string
}
type DeleteSNMPRequest ¶
type DeleteSNMPRequest struct {
ProviderConfig *ProviderConfig
}
type DeleteUserRequest ¶
type DeleteUserRequest struct {
Username string
ProviderConfig *ProviderConfig
}
type DeviceInfo ¶
type DeviceInfo struct {
// 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)
// 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
// Reprovision prepares the device for reprovisioning by resetting it and reenabling provisioning mechanisms.
Reprovision(context.Context, *deviceutil.Connection) 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, *EVPNInstanceRequest) 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
}
type EnsureACLRequest ¶
type EnsureACLRequest struct {
ACL *v1alpha1.AccessControlList
ProviderConfig *ProviderConfig
}
type EnsureBGPPeerRequest ¶
type EnsureBGPPeerRequest struct {
BGPPeer *v1alpha1.BGPPeer
ProviderConfig *ProviderConfig
SourceInterface string
}
type EnsureBGPRequest ¶
type EnsureBGPRequest struct {
BGP *v1alpha1.BGP
ProviderConfig *ProviderConfig
}
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 EnsureISISRequest ¶
type EnsureISISRequest struct {
ISIS *v1alpha1.ISIS
Interfaces []*v1alpha1.Interface
ProviderConfig *ProviderConfig
}
type EnsureInterfaceRequest ¶
type EnsureInterfaceRequest struct {
Interface *v1alpha1.Interface
ProviderConfig *ProviderConfig
IPv4 IPv4
// 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
// 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 // #nosec G117
SSHKey string
Roles []string
ProviderConfig *ProviderConfig
}
type IPv4AddressList ¶
type IPv4Unnumbered ¶
type IPv4Unnumbered struct {
SourceInterface string
}
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, *InterfaceRequest) error
// GetInterfaceStatus call is responsible for retrieving the current status of the Interface from the provider.
GetInterfaceStatus(context.Context, *InterfaceRequest) (InterfaceStatus, 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 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) 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, *NVERequest) 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 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, *DeletePIMRequest) error
}
PIMProvider is the interface for the realization of the PIM objects over different providers.
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, *PrefixSetRequest) 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 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
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 {
// HashedPassword 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) (string, string, 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 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, *DeleteSNMPRequest) 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 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, *VLANRequest) 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, *VRFRequest) 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.
Directories
¶
| Path | Synopsis |
|---|---|
|
cisco
|
|
|
gnmiext/v2
Package gnmiext provides a gNMI client with device capability awareness and configuration management utilities.
|
Package gnmiext provides a gNMI client with device capability awareness and configuration management utilities. |
|
nxos
SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and IronCore contributors SPDX-License-Identifier: Apache-2.0
|
SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and IronCore contributors SPDX-License-Identifier: Apache-2.0 |
|
Package openconfig is a generated package which contains definitions of structs which represent a YANG schema.
|
Package openconfig is a generated package which contains definitions of structs which represent a YANG schema. |