Documentation ¶
Index ¶
- Constants
- func SpecTextDiff(actual, desired []byte) ([]byte, error)
- type Action
- type Processor
- type Spec
- type SpecACL
- type SpecACLEntry
- type SpecACLEntryAction
- type SpecACLEntryProtocol
- type SpecACLInterface
- type SpecCommunityList
- type SpecDHCPRelay
- type SpecInterface
- type SpecInterfaceIP
- type SpecLLDP
- type SpecLLDPInterface
- type SpecLSTGroup
- type SpecLSTInterface
- type SpecMCLAGDomain
- type SpecMCLAGInterface
- type SpecNAT
- type SpecNATBinding
- type SpecNATEntry
- type SpecNATPool
- type SpecNATType
- type SpecNTP
- type SpecNTPServer
- type SpecPart
- type SpecPortBreakout
- type SpecPortChannelConfig
- type SpecPortGroup
- type SpecPrefixList
- type SpecPrefixListAction
- type SpecPrefixListEntry
- type SpecPrefixListPrefix
- type SpecRouteMap
- type SpecRouteMapConditions
- type SpecRouteMapResult
- type SpecRouteMapStatement
- type SpecSubinterface
- type SpecSuppressVLANNeigh
- type SpecUser
- type SpecVRF
- type SpecVRFBGP
- type SpecVRFBGPIPv4Unicast
- type SpecVRFBGPImportVRF
- type SpecVRFBGPL2VPNEVPN
- type SpecVRFBGPNeighbor
- type SpecVRFBGPNetwork
- type SpecVRFEVPNMH
- type SpecVRFEthernetSegment
- type SpecVRFInterface
- type SpecVRFStaticRoute
- type SpecVRFStaticRouteNextHop
- type SpecVRFTableConnection
- type SpecVRFVNIEntry
- type SpecVXLANEVPNNVO
- type SpecVXLANTunnel
- type SpecVXLANTunnelMap
Constants ¶
View Source
const ( SpecVRFBGPNeighborPeerTypeInternal = "internal" SpecVRFBGPNeighborPeerTypeExternal = "external" )
View Source
const ( SpecVRFBGPTableConnectionConnected = "connected" SpecVRFBGPTableConnectionStatic = "static" )
Variables ¶
This section is empty.
Functions ¶
func SpecTextDiff ¶
Types ¶
type Processor ¶
type Processor interface { EnsureControlLink(ctx context.Context, agent *agentapi.Agent) error WaitReady(ctx context.Context) error LoadActualState(ctx context.Context) (*Spec, error) PlanDesiredState(ctx context.Context, agent *agentapi.Agent) (*Spec, error) CalculateActions(ctx context.Context, actual, desired *Spec) ([]Action, error) ApplyActions(ctx context.Context, actions []Action) ([]string, error) // warnings UpdateSwitchState(ctx context.Context, agent *agentapi.Agent, reg *switchstate.Registry) error Reboot(ctx context.Context, force bool) error Reinstall(ctx context.Context) error FactoryReset(ctx context.Context) error }
type Spec ¶
type Spec struct { ZTP *bool `json:"ztp,omitempty"` Hostname *string `json:"hostname,omitempty"` LLDP *SpecLLDP `json:"lldp,omitempty"` LLDPInterfaces map[string]*SpecLLDPInterface `json:"lldpInterfaces,omitempty"` NTP *SpecNTP `json:"ntp,omitempty"` NTPServers map[string]*SpecNTPServer `json:"ntpServers,omitempty"` Users map[string]*SpecUser `json:"users,omitempty"` PortGroups map[string]*SpecPortGroup `json:"portGroupSpeeds,omitempty"` PortBreakouts map[string]*SpecPortBreakout `json:"portBreakouts,omitempty"` Interfaces map[string]*SpecInterface `json:"interfaces,omitempty"` MCLAGs map[uint32]*SpecMCLAGDomain `json:"mclags,omitempty"` MCLAGInterfaces map[string]*SpecMCLAGInterface `json:"mclagInterfaces,omitempty"` VRFs map[string]*SpecVRF `json:"vrfs,omitempty"` RouteMaps map[string]*SpecRouteMap `json:"routeMaps,omitempty"` PrefixLists map[string]*SpecPrefixList `json:"prefixLists,omitempty"` CommunityLists map[string]*SpecCommunityList `json:"communityLists,omitempty"` DHCPRelays map[string]*SpecDHCPRelay `json:"dhcpRelays,omitempty"` NATs map[uint32]*SpecNAT `json:"nats,omitempty"` ACLs map[string]*SpecACL `json:"acls,omitempty"` ACLInterfaces map[string]*SpecACLInterface `json:"aclInterfaces,omitempty"` VXLANTunnels map[string]*SpecVXLANTunnel `json:"vxlanTunnels,omitempty"` VXLANEVPNNVOs map[string]*SpecVXLANEVPNNVO `json:"vxlanEVPNNVOs,omitempty"` VXLANTunnelMap map[string]*SpecVXLANTunnelMap `json:"vxlanTunnelMap,omitempty"` // e.g. map_5011_Vlan1000 -> 5011 + Vlan1000 VRFVNIMap map[string]*SpecVRFVNIEntry `json:"vrfVNIMap,omitempty"` SuppressVLANNeighs map[string]*SpecSuppressVLANNeigh `json:"suppressVLANNeighs,omitempty"` PortChannelConfigs map[string]*SpecPortChannelConfig `json:"portChannelConfigs,omitempty"` LSTGroups map[string]*SpecLSTGroup `json:"lstGroups,omitempty"` LSTInterfaces map[string]*SpecLSTInterface `json:"lstInterfaces,omitempty"` }
func (*Spec) CleanupSensetive ¶
func (s *Spec) CleanupSensetive()
func (*Spec) MarshalYAML ¶
type SpecACL ¶
type SpecACL struct { Description *string `json:"description,omitempty"` Entries map[uint32]*SpecACLEntry `json:"entries,omitempty"` }
type SpecACLEntry ¶
type SpecACLEntry struct { Description *string `json:"description,omitempty"` Action SpecACLEntryAction `json:"action,omitempty"` Protocol SpecACLEntryProtocol `json:"protocol,omitempty"` SourceAddress *string `json:"sourceAddress,omitempty"` SourcePort *uint16 `json:"sourcePort,omitempty"` DestinationAddress *string `json:"destinationAddress,omitempty"` DestinationPort *uint16 `json:"destinationPort,omitempty"` }
func (*SpecACLEntry) IsNil ¶
func (s *SpecACLEntry) IsNil() bool
type SpecACLEntryAction ¶
type SpecACLEntryAction string
const ( SpecACLEntryActionAccept SpecACLEntryAction = "ACCEPT" // permit SpecACLEntryActionDrop SpecACLEntryAction = "DROP" // deny )
type SpecACLEntryProtocol ¶
type SpecACLEntryProtocol string
const ( SpecACLEntryProtocolUnset SpecACLEntryProtocol = "" SpecACLEntryProtocolUDP SpecACLEntryProtocol = "UDP" )
type SpecACLInterface ¶
type SpecACLInterface struct { Ingress *string `json:"ingress,omitempty"` Egress *string `json:"egress,omitempty"` }
func (*SpecACLInterface) IsNil ¶
func (s *SpecACLInterface) IsNil() bool
type SpecCommunityList ¶
type SpecCommunityList struct {
Members []string `json:"members,omitempty"`
}
func (*SpecCommunityList) IsNil ¶
func (s *SpecCommunityList) IsNil() bool
type SpecDHCPRelay ¶
type SpecDHCPRelay struct { SourceInterface *string `json:"sourceInterface,omitempty"` RelayAddress []string `json:"relayAddress,omitempty"` LinkSelect bool `json:"linkSelect,omitempty"` VRFSelect bool `json:"vrfSelect,omitempty"` }
func (*SpecDHCPRelay) IsNil ¶
func (s *SpecDHCPRelay) IsNil() bool
type SpecInterface ¶
type SpecInterface struct { Description *string `json:"description,omitempty"` Enabled *bool `json:"enabled,omitempty"` PortChannel *string `json:"portChannel,omitempty"` NATZone *uint8 `json:"natZone,omitempty"` AccessVLAN *uint16 `json:"accessVLAN,omitempty"` TrunkVLANs []string `json:"trunkVLANs,omitempty"` MTU *uint16 `json:"mtu,omitempty"` Speed *string `json:"speed,omitempty"` VLANIPs map[string]*SpecInterfaceIP `json:"vlanIPs,omitempty"` VLANAnycastGateway []string `json:"vlanAnycastGateway,omitempty"` Subinterfaces map[uint32]*SpecSubinterface `json:"subinterfaces,omitempty"` }
func (*SpecInterface) IsNil ¶
func (s *SpecInterface) IsNil() bool
type SpecInterfaceIP ¶
type SpecInterfaceIP struct { PrefixLen *uint8 `json:"prefixLen,omitempty"` Secondary *bool `json:"secondary,omitempty"` }
func (*SpecInterfaceIP) IsNil ¶
func (s *SpecInterfaceIP) IsNil() bool
type SpecLLDP ¶
type SpecLLDPInterface ¶
type SpecLLDPInterface struct { Enabled *bool `json:"enabled,omitempty"` ManagementIPv4 *string `json:"managementIPv4,omitempty"` }
func (*SpecLLDPInterface) IsNil ¶
func (s *SpecLLDPInterface) IsNil() bool
type SpecLSTGroup ¶
type SpecLSTGroup struct { AllEVPNESDownstream *bool `json:"allEvpnEsDownstream,omitempty"` Timeout *uint16 `json:"timeout,omitempty"` }
func (*SpecLSTGroup) IsNil ¶
func (s *SpecLSTGroup) IsNil() bool
type SpecLSTInterface ¶
type SpecLSTInterface struct {
Groups []string `json:"groups,omitempty"`
}
func (*SpecLSTInterface) IsNil ¶
func (s *SpecLSTInterface) IsNil() bool
type SpecMCLAGDomain ¶
type SpecMCLAGDomain struct { SourceIP string `json:"sourceIP,omitempty"` PeerIP string `json:"peerIP,omitempty"` PeerLink string `json:"peerLink,omitempty"` }
func (*SpecMCLAGDomain) IsNil ¶
func (s *SpecMCLAGDomain) IsNil() bool
type SpecMCLAGInterface ¶
type SpecMCLAGInterface struct {
DomainID uint32 `json:"domainID,omitempty"`
}
func (*SpecMCLAGInterface) IsNil ¶
func (s *SpecMCLAGInterface) IsNil() bool
type SpecNAT ¶
type SpecNAT struct { Enable *bool `json:"enable,omitempty"` Pools map[string]*SpecNATPool `json:"pools,omitempty"` Bindings map[string]*SpecNATBinding `json:"bindings,omitempty"` Static map[string]*SpecNATEntry `json:"static,omitempty"` // external -> internal }
type SpecNATBinding ¶
type SpecNATBinding struct { Pool *string `json:"pool,omitempty"` Type SpecNATType `json:"type,omitempty"` }
func (*SpecNATBinding) IsNil ¶
func (s *SpecNATBinding) IsNil() bool
type SpecNATEntry ¶
type SpecNATEntry struct { InternalAddress *string `json:"internalAddress,omitempty"` Type SpecNATType `json:"type,omitempty"` }
func (*SpecNATEntry) IsNil ¶
func (s *SpecNATEntry) IsNil() bool
type SpecNATPool ¶
type SpecNATPool struct {
Range *string `json:"range,omitempty"`
}
func (*SpecNATPool) IsNil ¶
func (s *SpecNATPool) IsNil() bool
type SpecNATType ¶
type SpecNATType string
const ( SpecNATTypeUnset SpecNATType = "" SpecNATTypeDNAT SpecNATType = "DNAT" SpecNATTypeSNAT SpecNATType = "SNAT" )
type SpecNTPServer ¶
type SpecNTPServer struct {
Prefer *bool `json:"prefer,omitempty"`
}
func (*SpecNTPServer) IsNil ¶
func (s *SpecNTPServer) IsNil() bool
type SpecPortBreakout ¶
type SpecPortBreakout struct {
Mode string `json:"mode,omitempty"`
}
func (*SpecPortBreakout) IsNil ¶
func (s *SpecPortBreakout) IsNil() bool
type SpecPortChannelConfig ¶
type SpecPortChannelConfig struct { SystemMAC *string `json:"systemMAC,omitempty"` Fallback *bool `json:"fallback,omitempty"` }
func (*SpecPortChannelConfig) IsNil ¶
func (s *SpecPortChannelConfig) IsNil() bool
type SpecPortGroup ¶
type SpecPortGroup struct {
Speed *string
}
func (*SpecPortGroup) IsNil ¶
func (s *SpecPortGroup) IsNil() bool
type SpecPrefixList ¶
type SpecPrefixList struct {
Prefixes map[uint32]*SpecPrefixListEntry `json:"prefixes,omitempty"`
}
func (*SpecPrefixList) IsNil ¶
func (s *SpecPrefixList) IsNil() bool
type SpecPrefixListAction ¶
type SpecPrefixListAction string
const ( SpecPrefixListActionUnset SpecPrefixListAction = "" SpecPrefixListActionPermit SpecPrefixListAction = "permit" SpecPrefixListActionDeny SpecPrefixListAction = "deny" )
type SpecPrefixListEntry ¶
type SpecPrefixListEntry struct { Prefix SpecPrefixListPrefix `json:"prefix,omitempty"` Action SpecPrefixListAction `json:"action,omitempty"` }
func (*SpecPrefixListEntry) IsNil ¶
func (s *SpecPrefixListEntry) IsNil() bool
type SpecPrefixListPrefix ¶
type SpecRouteMap ¶
type SpecRouteMap struct {
Statements map[string]*SpecRouteMapStatement `json:"statements,omitempty"`
}
func (*SpecRouteMap) IsNil ¶
func (s *SpecRouteMap) IsNil() bool
type SpecRouteMapConditions ¶
type SpecRouteMapConditions struct { DirectlyConnected *bool `json:"directlyConnected,omitempty"` MatchEVPNDefaultRoute *bool `json:"matchEvpnDefaultRoute,omitempty"` MatchEVPNVNI *uint32 `json:"matchEvpnVni,omitempty"` MatchPrefixList *string `json:"matchPrefixLists,omitempty"` MatchNextHopPrefixList *string `json:"matchNextHopPrefixLists,omitempty"` MatchCommunityList *string `json:"matchCommunityLists,omitempty"` MatchSourceVRF *string `json:"matchSourceVrf,omitempty"` Call *string `json:"call,omitempty"` }
type SpecRouteMapResult ¶
type SpecRouteMapResult string
const ( SpecRouteMapResultAccept SpecRouteMapResult = "accept" SpecRouteMapResultReject SpecRouteMapResult = "reject" )
type SpecRouteMapStatement ¶
type SpecRouteMapStatement struct { Conditions SpecRouteMapConditions `json:"conditions,omitempty"` SetCommunities []string `json:"setCommunities,omitempty"` SetLocalPreference *uint32 `json:"setLocalPreference,omitempty"` Result SpecRouteMapResult `json:"result,omitempty"` }
func (*SpecRouteMapStatement) IsNil ¶
func (s *SpecRouteMapStatement) IsNil() bool
type SpecSubinterface ¶
type SpecSubinterface struct { VLAN *uint16 `json:"vlan,omitempty"` IPs map[string]*SpecInterfaceIP `json:"ips,omitempty"` AnycastGateways []string `json:"anycastGateways,omitempty"` }
func (*SpecSubinterface) IsNil ¶
func (s *SpecSubinterface) IsNil() bool
type SpecSuppressVLANNeigh ¶
type SpecSuppressVLANNeigh struct{}
func (*SpecSuppressVLANNeigh) IsNil ¶
func (s *SpecSuppressVLANNeigh) IsNil() bool
type SpecUser ¶
type SpecVRF ¶
type SpecVRF struct { Enabled *bool `json:"enabled,omitempty"` Description *string `json:"description,omitempty"` AnycastMAC *string `json:"anycastMAC,omitempty"` Interfaces map[string]*SpecVRFInterface `json:"interfaces,omitempty"` BGP *SpecVRFBGP `json:"bgp,omitempty"` TableConnections map[string]*SpecVRFTableConnection `json:"tableConnections,omitempty"` StaticRoutes map[string]*SpecVRFStaticRoute `json:"staticRoutes,omitempty"` EthernetSegments map[string]*SpecVRFEthernetSegment `json:"ethernetSegments,omitempty"` EVPNMH SpecVRFEVPNMH `json:"evpnMH,omitempty"` }
type SpecVRFBGP ¶
type SpecVRFBGP struct { AS *uint32 `json:"as,omitempty"` RouterID *string `json:"routerID,omitempty"` NetworkImportCheck *bool `json:"networkImportCheck,omitempty"` IPv4Unicast SpecVRFBGPIPv4Unicast `json:"ipv4Unicast,omitempty"` L2VPNEVPN SpecVRFBGPL2VPNEVPN `json:"l2vpnEvpn,omitempty"` Neighbors map[string]*SpecVRFBGPNeighbor `json:"neighbors,omitempty"` }
func (*SpecVRFBGP) IsNil ¶
func (s *SpecVRFBGP) IsNil() bool
type SpecVRFBGPIPv4Unicast ¶
type SpecVRFBGPIPv4Unicast struct { Enabled bool `json:"enable,omitempty"` MaxPaths *uint32 `json:"maxPaths,omitempty"` MaxPathsIBGP *uint32 `json:"maxPathsIBGP,omitempty"` Networks map[string]*SpecVRFBGPNetwork `json:"networks,omitempty"` ImportVRFs map[string]*SpecVRFBGPImportVRF `json:"importVRFs,omitempty"` ImportPolicy *string `json:"importPolicy,omitempty"` TableMap *string `json:"tableMap,omitempty"` }
type SpecVRFBGPImportVRF ¶
type SpecVRFBGPImportVRF struct{}
func (*SpecVRFBGPImportVRF) IsNil ¶
func (s *SpecVRFBGPImportVRF) IsNil() bool
type SpecVRFBGPL2VPNEVPN ¶
type SpecVRFBGPL2VPNEVPN struct { Enabled bool `json:"enable,omitempty"` AdvertiseAllVNI *bool `json:"advertiseAllVnis,omitempty"` AdvertiseIPv4Unicast *bool `json:"advertiseIPv4Unicast,omitempty"` AdvertiseIPv4UnicastRouteMaps []string `json:"advertiseIPv4UnicastRouteMaps,omitempty"` AdvertiseDefaultGw *bool `json:"advertiseDefaultGw,omitempty"` }
type SpecVRFBGPNeighbor ¶
type SpecVRFBGPNeighbor struct { Enabled *bool `json:"enabled,omitempty"` Description *string `json:"description,omitempty"` RemoteAS *uint32 `json:"remoteAS,omitempty"` PeerType *string `json:"peerType,omitempty"` IPv4Unicast *bool `json:"ipv4Unicast,omitempty"` IPv4UnicastImportPolicies []string `json:"ipv4UnicastImportPolicies,omitempty"` IPv4UnicastExportPolicies []string `json:"ipv4UnicastExportPolicies,omitempty"` L2VPNEVPN *bool `json:"l2vpnEvpn,omitempty"` L2VPNEVPNImportPolicies []string `json:"l2vpnEvpnImportPolicies,omitempty"` L2VPNEVPNAllowOwnAS *bool `json:"l2vpnEvpnAllowOwnAS,omitempty"` }
func (*SpecVRFBGPNeighbor) IsNil ¶
func (s *SpecVRFBGPNeighbor) IsNil() bool
type SpecVRFBGPNetwork ¶
type SpecVRFBGPNetwork struct{}
func (*SpecVRFBGPNetwork) IsNil ¶
func (s *SpecVRFBGPNetwork) IsNil() bool
type SpecVRFEVPNMH ¶
type SpecVRFEthernetSegment ¶
type SpecVRFEthernetSegment struct {
ESI string `json:"esi,omitempty"`
}
func (*SpecVRFEthernetSegment) IsNil ¶
func (s *SpecVRFEthernetSegment) IsNil() bool
type SpecVRFInterface ¶
type SpecVRFInterface struct{}
func (*SpecVRFInterface) IsNil ¶
func (s *SpecVRFInterface) IsNil() bool
type SpecVRFStaticRoute ¶
type SpecVRFStaticRoute struct {
NextHops []SpecVRFStaticRouteNextHop `json:"nextHops,omitempty"`
}
func (*SpecVRFStaticRoute) IsNil ¶
func (s *SpecVRFStaticRoute) IsNil() bool
type SpecVRFTableConnection ¶
type SpecVRFTableConnection struct {
ImportPolicies []string `json:"importPolicies,omitempty"`
}
func (*SpecVRFTableConnection) IsNil ¶
func (s *SpecVRFTableConnection) IsNil() bool
type SpecVRFVNIEntry ¶
type SpecVRFVNIEntry struct {
VNI *uint32 `json:"vni,omitempty"`
}
func (*SpecVRFVNIEntry) IsNil ¶
func (s *SpecVRFVNIEntry) IsNil() bool
type SpecVXLANEVPNNVO ¶
type SpecVXLANEVPNNVO struct {
SourceVTEP *string `json:"sourceVtep,omitempty"`
}
func (*SpecVXLANEVPNNVO) IsNil ¶
func (s *SpecVXLANEVPNNVO) IsNil() bool
type SpecVXLANTunnel ¶
type SpecVXLANTunnel struct { SourceIP *string `json:"sourceIP,omitempty"` SourceInterface *string `json:"sourceInterface,omitempty"` }
func (*SpecVXLANTunnel) IsNil ¶
func (s *SpecVXLANTunnel) IsNil() bool
type SpecVXLANTunnelMap ¶
type SpecVXLANTunnelMap struct { VTEP *string `json:"vtep,omitempty"` // name VNI *uint32 `json:"vni,omitempty"` VLAN *uint16 `json:"vlan,omitempty"` }
func (*SpecVXLANTunnelMap) IsNil ¶
func (s *SpecVXLANTunnelMap) IsNil() bool
Click to show internal directories.
Click to hide internal directories.