Documentation ¶
Index ¶
- Constants
- Variables
- func AddIPAddress(ifp Interface, ipaddrs []IPv4Addr)
- func AddVlans(ifp Interface, vlans []Vlan)
- func CalculateAddressChanges(oldAddresses []IPv4Addr, newAddresses []IPv4Addr) ([]IPv4Addr, []IPv4Addr)
- func CalculateVlanChanges(oldVlans []Vlan, newVlans []Vlan) ([]Vlan, []Vlan)
- func CaseEntry(e *yang.Entry) *yang.Entry
- func ClearGobgpGrpcEndpoint()
- func ClearVrfCache()
- func Commands() string
- func Commit() error
- func CompChoice(ent *yang.Entry, comps cmd.CompSlice) cmd.CompSlice
- func CompConfig(config *Config, comps cmd.CompSlice) cmd.CompSlice
- func CompDir(ent *yang.Entry, comps cmd.CompSlice) cmd.CompSlice
- func CompHasName(comps cmd.CompSlice, name string) bool
- func CompKey(ent *yang.Entry, index int) cmd.CompSlice
- func CompKeyMatched(ent *yang.Entry, comps cmd.CompSlice) cmd.CompSlice
- func CompLeaf(ent *yang.Entry) cmd.CompSlice
- func CompValue(config *Config, comps cmd.CompSlice, index int) cmd.CompSlice
- func Compare() string
- func CompareCommand() string
- func ConfigDiscard() bool
- func ConfigDump(c *Config, depth int, keynode bool)
- func ConfigDumpCandidate()
- func ConfigDumpTool(c *Config)
- func ConfigLookupVrf(ifName string) string
- func ConfigureGobgpGrpcEndpointApi(set bool, args []interface{})
- func Delete(c *Config, leaf bool)
- func DhcpExitFunc()
- func DhcpJsonConfig(path []string, str string) error
- func DhcpLeaseGet(poolConfig *DhcpIpPool) (string, error)
- func DhcpLocalAddrLookup(ifName string) string
- func DhcpServerExec(dhcp *Dhcp, poolConfig *DhcpIpPool)
- func DhcpServerStart(config string, pid string, lease string, ifName string, arg ...string)
- func DhcpStatusUpdate()
- func DhcpVrf(config *Dhcp) string
- func DhcpVrfClear(vrfId int, cfg *VrfsConfig)
- func DhcpVrfDelete(vrfId int)
- func DhcpVrfSync(vrfId int, cfg *VrfsConfig)
- func DirMatch(e *yang.Entry, s string) *yang.Entry
- func DiscardConfigChange()
- func DistributeListDelete(vrfId int)
- func DistributeListExit()
- func DistributeListSync(vrfId int, cfg *VrfsConfig)
- func DynamicCompletion(commands []string, module string, args []string) []string
- func DynamicCompletionLocal(commands []string, module string, args []string) []string
- func EntryDump(e *yang.Entry, depth int)
- func EntryExpandable(e *yang.Entry) bool
- func EntryExpanded(e *yang.Entry) []string
- func EntryLookup(e *yang.Entry, p []string) *yang.Entry
- func EntryNextState(e *yang.Entry) int
- func Env(key string) string
- func EnvAll() map[string]string
- func EtcdDeletePath(etcdEndpoints []string, etcdPath string)
- func EtcdEndpointsAdd(endPoint string)
- func EtcdEndpointsApi(set bool, Args []interface{})
- func EtcdEndpointsDelete(endPoint string)
- func EtcdEndpointsShow() (str string)
- func EtcdKeyDelete(key []byte)
- func EtcdKeyValueParse(key []byte, value []byte)
- func EtcdLock(etcdClient clientv3.Client, lockPath string, myID string, block bool) (error, clientv3.LeaseID)
- func EtcdPathApi(set bool, Args []interface{})
- func EtcdUnlock(etcdClient clientv3.Client, lockPath string, leaseID clientv3.LeaseID) error
- func EtcdVrfAddressAdd(vrfId int, vrf *VrfsConfig)
- func EtcdVrfAddressClear(vrfId int, vrf *VrfsConfig)
- func EtcdVrfCommand(cmd *Command) bool
- func EtcdVrfDelete(vrfId int, vrfIfDelete bool)
- func EtcdVrfDeleteCacheCheck(str string) bool
- func EtcdVrfDeleteCacheRegister(cmd *Command)
- func EtcdVrfStaticClear(vrfId int)
- func EtcdVrfStaticUpdate(vrfId int, vrf *VrfsConfig)
- func EtcdVrfSync(vrfId int, vrf *VrfsConfig)
- func EtcdVrfVlanSubinterfacesAdd(vrf *VrfsConfig)
- func EtcdVrfVlanSubinterfacesDelete(vrf *VrfsConfig)
- func EtcdWatchStop()
- func EtcdWatchUpdate()
- func ExecCmd(c *Command)
- func ExecLine(line string) string
- func ExecLineWaitIfNoMatch(command string)
- func ExtHelp(e *yang.Entry) string
- func GobgpAddGlobalPolicy(client *client.Client, direction string, policyNames []string, ...) error
- func GobgpAddPolicyDefinition(client *client.Client, cfg bgpconfig.PolicyDefinition)
- func GobgpAddVrf(client *client.Client, c *VrfConfig) error
- func GobgpClearAll()
- func GobgpClearApi(Args []string) (inst int, instStr string)
- func GobgpClearDefinedSet(client *client.Client)
- func GobgpClearGlobal(client *client.Client)
- func GobgpClearGlobalPolicy(client *client.Client)
- func GobgpClearNeighbor(client *client.Client)
- func GobgpClearPolicyDefinition(client *client.Client)
- func GobgpClearVrf(client *client.Client)
- func GobgpClearVrfRib(c *VrfConfig) error
- func GobgpDeleteGlobalPolicy(client *client.Client, direction string, policyNames []string) error
- func GobgpDeletePolicyDefinition(client *client.Client, cfg bgpconfig.PolicyDefinition)
- func GobgpHubDelete(vrfId int)
- func GobgpHubUpdate(vrfConfig VrfConfig)
- func GobgpNeighborAdd(id string, jsonStr string)
- func GobgpNeighborDelete(id string)
- func GobgpNeighborUpdate(ncfg *bgpconfig.Neighbor, add bool)
- func GobgpParse(jsonStr string)
- func GobgpReset(cfg *GobgpConfig) error
- func GobgpResetApi(Args []string) (inst int, instStr string)
- func GobgpRouterIdRegister(routerId string)
- func GobgpSetDefinedSet(client *client.Client, cfg *GobgpConfig)
- func GobgpSetGlobal(client *client.Client, cfg *GobgpConfig)
- func GobgpSetGlobalPolicy(client *client.Client, cfg *GobgpConfig) error
- func GobgpSetNeighbor(client *client.Client, cfg *GobgpConfig)
- func GobgpSetPolicyDefinition(client *client.Client, cfg *GobgpConfig)
- func GobgpSetRib(client *client.Client, cfg *GobgpConfig)
- func GobgpSetVrf(client *client.Client, cfg *GobgpConfig)
- func GobgpSetZebra(client *client.Client, cfg *GobgpConfig, version uint8)
- func GobgpSetZebraRoutine() error
- func GobgpSoftresetNeighbor(client *client.Client, cfg *GobgpConfig)
- func GobgpStaticPath(s *Route) (*table.Path, error)
- func GobgpStatus() (string, error)
- func GobgpStatusGlobal(stat *GobgpStat) error
- func GobgpStatusNeighbor(stat *GobgpStat) error
- func GobgpStatusRib(stat *GobgpStat) error
- func GobgpStatusUpdate()
- func GobgpUpdate(cfg *GobgpConfig, withReset bool) error
- func GobgpUpdateNeighbor(client *client.Client, cfg *GobgpConfig)
- func GobgpUpdateVrf(client *client.Client, cfg *GobgpConfig)
- func GobgpVrfDelete(vrfId int)
- func GobgpVrfEqual(ribs []VrfRib, rib VrfRib) bool
- func GobgpVrfPath(c *VrfRib) (*table.Path, error)
- func GobgpVrfRibSync(name string, old, new []VrfRib)
- func GobgpVrfUpdate(vrfConfig VrfConfig)
- func GobgpWanConfig(cfg *GobgpConfig)
- func GobgpWanExit()
- func GobgpWanParse(jsonStr string, local bool)
- func GobgpWanStop(local bool)
- func HasKey(e *yang.Entry) bool
- func HostnameApi(set bool, Args []interface{})
- func HostnameSet(hostName string)
- func HostnameUnset()
- func IsAdditive(e *yang.Entry) bool
- func IsCompDir(e *yang.Entry) bool
- func IsEmptyLeaf(e *yang.Entry) bool
- func IsMandatory(e *yang.Entry) bool
- func IsPresenceContainer(e *yang.Entry) bool
- func IsRibdAsync(module string) bool
- func JsonFlatten(paths []string, v reflect.Value, f func([]string))
- func JsonMarshal() string
- func JsonParse(jsonString string) ([]string, error)
- func KeyEntry(ent *yang.Entry, index int) *yang.Entry
- func KeyIncludeValue(key, value string) bool
- func KeyIndexString(key string, index int) string
- func KeyLength(ent *yang.Entry) int
- func KeySlice(key string) []string
- func Load(path string) error
- func LoadConfig(reader io.Reader) error
- func LocalAddrLookup(ifName string) string
- func LocalCidrLookup(ifName string) string
- func MatchChoice(ent *yang.Entry, str string, status *YMatchState)
- func MatchConfig(config *Config, val string, str string, s *YMatchState)
- func MatchConfigDir(config *Config, str string, s *YMatchState)
- func MatchConfigValue(config *Config, str string, s *YMatchState)
- func MatchDir(ent *yang.Entry, str string, status *YMatchState)
- func MatchEntry(matchType int, ent *yang.Entry, typ *yang.YangType, name string, str string, ...)
- func MatchKey(ent *yang.Entry, str string, status *YMatchState)
- func MatchKeyMatched(ent *yang.Entry, str string, status *YMatchState)
- func MatchLeaf(e *yang.Entry, str string, state *YMatchState)
- func MatchNumber(str string, e *yang.Entry) (pos int, match cmd.MatchType)
- func MatchString(str string, e *yang.Entry, typ *yang.YangType) (pos int, match cmd.MatchType)
- func MatchType(e *yang.Entry, typ *yang.YangType, str string, state *YMatchState)
- func ModuleStart()
- func NewGobgpClient() (*client.Client, error)
- func NexthopWalkerUpdate()
- func OspfExec(vrfId int, ospfArray *OspfArray)
- func OspfStatusNeighbor(vrfName string, stat *OspfVrfStat) error
- func OspfStatusRoute(vrfName string, stat *OspfVrfStat) error
- func OspfStatusUpdate()
- func OspfVrfDelete(vrfId int)
- func OspfVrfExit()
- func OspfVrfStop(vrfId int)
- func OspfVrfSync(vrfId int, cfg *VrfsConfig)
- func Parse(cmds []string, ent *yang.Entry, config *Config, s *YMatchState) (int, cmd.Callback, []interface{}, cmd.CompSlice)
- func ParseDelete(cmds []string, config *Config, s *YMatchState) (int, cmd.Callback, []interface{}, cmd.CompSlice)
- func PathDump(path *Path, depth int)
- func PathRegisterCommand(p *Path, c *Command, sync bool)
- func ProcessDelete(config *Config)
- func ProcessInterfacesAdd(vrfId int, ifaces []Interface)
- func ProcessInterfacesDelete(vrfId int, ifaces []Interface)
- func ProcessQuaggaConfigDelete(vrfId int, instanceName string)
- func ProcessVrfInterfaceChanges(vrfId int, currentConfig *VrfsConfig, newConfig *VrfsConfig)
- func ProcessVrfUpdate(vrfId int, vrf *VrfsConfig)
- func QuaggaConfigSync(jsonStr string, vrfId int, instanceName string)
- func QuaggaDelete(vrfId int)
- func QuaggaExec(vrfId int, interfaceName string, configStr string)
- func QuaggaExit()
- func QuaggaStatusBgpSummary(vrf string, stat *GobgpStat) error
- func QuaggaStatusRib(vrf string, stat *GobgpStat) error
- func QuaggaStatusUpdate()
- func QuaggaStatusVrf(vrf string, stats *QuaggaStat)
- func QuaggaVrfDelete(vrfId int)
- func QuaggaVrfSync(vrfId int, cfg *VrfsConfig)
- func RelayAdd(ifName, group string)
- func RelayApi(set bool, Args []interface{})
- func RelayDelete(ifName, group string)
- func RelayExitFunc()
- func RelayGroupExec(instance *RelayInstance, group *RelayGroup, vrf string) func()
- func RelayGroupUpdate(dhcp *Dhcp)
- func RemoveIPAddress(ifp Interface, ipaddrs []IPv4Addr)
- func RemoveVlans(ifp Interface, vlans []Vlan)
- func RollbackCompletion(commands []string) []string
- func RollbackDetailFetch(fileName string) string
- func RollbackRevisionIncrement() error
- func SetGobgpGrpcEndpoint(grpcEndpoint string)
- func SubscribeAdd(stream rpc.Config_DoConfigServer, req *rpc.ConfigRequest)
- func SubscribeDelete(stream rpc.Config_DoConfigServer) error
- func SubscribeDump()
- func SubscribeHostLookup(name string) string
- func SubscribeLocalAdd(path []string, json SubPathJsonCallback)
- func SubscribePortLookup(name string) uint32
- func SubscribeRemoteAdd(stream rpc.Config_DoConfigServer, req *rpc.ConfigRequest)
- func SubscribeRemoteAddMulti(stream rpc.Config_DoConfigServer, req *rpc.ConfigRequest)
- func SubscribeSync() bool
- func SubscribeValidateProcess(stream rpc.Config_DoConfigServer, typ rpc.ConfigType)
- func SubscribeValidateResult() bool
- func UnQuote(args []string)
- func UnregisterPath(p *Path)
- func Validate() bool
- func VrfDelete(vrfId int, vrfIfDelete bool)
- func VrfGetIPv4localRoutes(vrf string) ([]netlink.Route, error)
- func VrfGetRoutes(vrf string, family int, tableType int) ([]netlink.Route, error)
- func VrfIdByName(vrf string) (int, error)
- func VrfName(vrfId int) string
- func VrfParse(vrfId int, jsonStr string)
- func VrfQuaggaGet(vrf string, prog string, pass string, timeout time.Duration, in []string) ([]string, error)
- func VrrpJsonConfig(path []string, str string) error
- func VrrpServerExec(vrrp *Vrrp, vrf string) *process.Process
- func VrrpServerStart(config string, pid string, vrrpPid string, vrf string) *process.Process
- func VrrpServerStopAll()
- func VrrpStateDelete(ifName string)
- func VrrpVrfDelete(vrfId int)
- func VrrpVrfSync(vrfId int, cfg *VrfsConfig)
- func YEntryJson(e *yang.Entry) string
- func YParseDelete(param *cmd.Param) (int, cmd.Callback, []interface{}, cmd.CompSlice)
- func YParseSet(param *cmd.Param) (int, cmd.Callback, []interface{}, cmd.CompSlice)
- func YangConfigPull(Args []string)
- func YangConfigPush(Args []string)
- func YangDelete(Args []string) (inst int, instStr string)
- func YangJsonParse()
- func YangSet(Args []string) (inst int, instStr string)
- type ClasslessRoutes
- type CliComponent
- type Command
- type Config
- func (c *Config) Command() *Command
- func (c *Config) CommandLine() []string
- func (c *Config) CommandList(list []*Config) []*Config
- func (c *Config) CommandPath() []string
- func (c *Config) CommandString() string
- func (c *Config) Copy(parent *Config) *Config
- func (c *Config) Delete(n *Config)
- func (c *Config) DeleteKey(n *Config)
- func (c *Config) DisplayEntry() bool
- func (c *Config) Empty() bool
- func (c *Config) HasDir() bool
- func (c *Config) IsContainer() bool
- func (c *Config) IsKeyConfig() bool
- func (c *Config) IsLeaf() bool
- func (c *Config) IsPresenceContainer() bool
- func (c *Config) IsValueLeaf() bool
- func (c *Config) JsonMarshal() string
- func (c *Config) LookupByPath(path []string) *Config
- func (c *Config) MandatoryCheck() error
- func (c *Config) PrefixWrite(out io.Writer)
- func (c *Config) Priority() int
- func (c *Config) Set(e *yang.Entry) *Config
- func (c *Config) SetKey(e *yang.Entry, key string, prefix string, last bool) *Config
- func (c *Config) SetLeafList(e *yang.Entry) *Config
- func (c *Config) SetListValue(value string) *Config
- func (c *Config) SetValue(value string) *Config
- func (c *Config) Signature(out io.Writer, via string)
- func (c *Config) String() string
- func (c *Config) WriteCommandTo(path string)
- func (c *Config) WriteTo(path string, by ...string)
- type ConfigComponent
- type ConfigSlice
- type Dhcp
- type DhcpIpPool
- type DhcpLeaseStatus
- type DhcpRange
- type DistributeList
- type DistributeListEntry
- type DomainNameServers
- type EtcdVrfStaticRoute
- type EtcdWatcher
- type GobgpConfig
- type GobgpStat
- type GobgpStatGlobal
- type GobgpStatNeighbor
- type GobgpStatRib
- type Host
- type Hub
- type IPv4
- type IPv4Addr
- type Interface
- type InterfaceIp
- type Interfaces
- type Interfacex
- type Ip
- type JsonBody
- type LeaseMap
- type LeaseValue
- type NeighborConfig
- type Nexthop
- type NtpServers
- type OpenBgpConfig
- type Option
- type Ospf
- type OspfArray
- type OspfIfParam
- type OspfIp
- type OspfJSONRoutes
- type OspfNeighbor
- type OspfNexthop
- type OspfRoute
- type OspfStat
- type OspfVrfStat
- type Path
- type PathMap
- type PriorityConfig
- type QuaggaAccess
- type QuaggaBgp
- type QuaggaInstanceConfig
- type QuaggaInstanceManager
- func (qim QuaggaInstanceManager) LockLocalCache()
- func (qim QuaggaInstanceManager) ProcessConfigDelete(vrfId int, quaggaConfigMap QuaggaInterfaceConfigs)
- func (qim QuaggaInstanceManager) ProcessQuaggaConfigAdd(vrfId int, quaggaConfigMap QuaggaInterfaceConfigs)
- func (qim QuaggaInstanceManager) ProcessQuaggaConfigDelete(vrfId int)
- func (qim QuaggaInstanceManager) ProcessVrfQuaggaConfigDelete(vrfId int)
- func (qim QuaggaInstanceManager) QuaggaBgpConfigDiff(oldQuaggaConfig QuaggaInterfaceConfigs, newQuaggaConfig QuaggaInterfaceConfigs) (QuaggaInterfaceConfigs, QuaggaInterfaceConfigs, QuaggaInterfaceConfigs)
- func (qim QuaggaInstanceManager) QuaggaCleanup()
- func (qim QuaggaInstanceManager) QuaggaConfigSync(jsonStr string, vrfId int)
- func (qim QuaggaInstanceManager) SpawnQuagga(vrfId int, interfaceName string, configStr string)
- func (qim QuaggaInstanceManager) UnLockLocalCache()
- type QuaggaInterfaceConfigs
- type QuaggaManager
- type QuaggaStat
- type Range
- type RelayGroup
- type RelayInstance
- type Rollback
- type RollbackList
- type Route
- type RpcComponent
- type Server
- type ServerAddress
- type ServerGroup
- type ServerGroupList
- type SipServers
- type State
- type Static
- type SubPath
- type SubPathBase
- func (subPath *SubPathBase) Append(path []string, cmd *Command)
- func (subPath *SubPathBase) CommandClear()
- func (subPath *SubPathBase) Commit()
- func (subPath *SubPathBase) Len() int
- func (subPath *SubPathBase) Path() *Path
- func (subPath *SubPathBase) RegisterPath(paths []string)
- func (subPath *SubPathBase) Sync() bool
- type SubPathJsonCallback
- type SubPathLocal
- type SubPathRemote
- type Subscriber
- func (sub *Subscriber) CommandClear()
- func (sub *Subscriber) Commit()
- func (sub *Subscriber) CommitEnd()
- func (sub *Subscriber) CommitStart()
- func (sub *Subscriber) HasCommand() bool
- func (sub *Subscriber) SendCommand(cmd *Command)
- func (sub *Subscriber) SendJSON(path []string, json string)
- func (sub *Subscriber) SendMessage(typ rpc.ConfigType, path []string)
- func (sub *Subscriber) Validate()
- func (sub *Subscriber) ValidateEnd()
- func (sub *Subscriber) ValidateStart()
- type UnicastPeer
- type Vlan
- type VoipTftpServers
- type VrfConfig
- type VrfRib
- type VrfsConfig
- type Vrrp
- type VrrpConfig
- type VrrpInstance
- type VrrpState
- type YMatchState
- type YangComponent
Constants ¶
const ( CliSuccess = iota CliSuccessExec CliSuccessShow CliSuccessModule CliSuccessRedirect CliSuccessRedirectShow )
const ( StateDir = iota StateDirMatched StateKey StateKeyMatched StateLeaf StateLeafMatched StateLeafList StateLeafListMatched )
const ( YMatchTypeKeyword = iota YMatchTypeNumber YMatchTypeString )
Variables ¶
var ( GobgpNeighborMap = map[string]bgpconfig.Neighbor{} GobgpNeighborMutex sync.Mutex )
Map for configured neighbor. TODO: Revisit this. At present this is mostly redundant. Neighbor add/delete can be simplified
var ( Hostname string HostnameConfigured bool )
var ( OspfEtcdEndpoints = []string{"http://127.0.0.1:2379"} OspfEtcdStatusPath = "/state/services/ospf" )
var ( RelayInstanceMap = map[string]*RelayInstance{} RelayGroupMap = map[string]*RelayGroup{} )
var ( RootPath = &Path{Map: PathMap{}} SubscribeMap = map[*Subscriber]*Subscriber{} SubscribeWg sync.WaitGroup SubscribeMutex sync.RWMutex ValidateCount int RibdAsyncUpdate = false ApiSyncCh chan interface{} )
var ( VrrpEtcdEndpoints = []string{"http://127.0.0.1:2379"} VrrpEtcdPath = "/state/services/port/vrrp" )
var ConfigDir = "/usr/local/etc"
var ConfigRevisionMax = 50
var DefaultPolicyTypeToIntMap = map[bgpconfig.DefaultPolicyType]int{ bgpconfig.DEFAULT_POLICY_TYPE_ACCEPT_ROUTE: 1, bgpconfig.DEFAULT_POLICY_TYPE_REJECT_ROUTE: 2, }
mapping provided by gobgp config is incorrect
var DhcpProcessList = process.ProcessSlice{}
var DistributeListMap = map[int]DistributeList{}
var ( // Mutex for serializing etcd event handling EtcdEventMutex sync.RWMutex )
var EtcdVrfMap = map[int]VrfsConfig{}
var EtcdVrfStaticMap = map[int]*EtcdVrfStaticRoute{}
var GobgpHubNode = map[int]string{}
var GobgpHubProcessList = map[int]*process.Process{}
var GobgpWanProcess *process.Process
GoBGP WAN Process
var GobgpZebraRetry bool
var GrpcModuleMap = map[string]string{}
var IntToStateMap = map[int]State{ 0: STATE_MASTER, 1: STATE_BACKUP, }
var OspfProcessMap = map[int]*process.Process{}
var OspfVrfMap = map[int]OspfArray{}
var Parser *cmd.Node
var QuaggaConfigDir = "/etc/quagga/"
var QuaggaProc = map[int]process.ProcessSlice{}
var (
RIBD_SYNCHRONIZED bool
)
var StateStr = map[int]string{ StateDir: "StateDir", StateDirMatched: "StateDirMatched", StateKey: "StateKey", StateKeyMatched: "StateKeyMatched", StateLeaf: "StateLeaf", StateLeafMatched: "StateLeafMatched", StateLeafList: "StateLeafList", StateLeafListMatched: "StateLeafListMatched", }
var StateToIntMap = map[State]int{ STATE_MASTER: 0, STATE_BACKUP: 1, }
var TopCmd *cmd.Cmd
var VrfIfDeleteCache = map[string]bool{}
var VrrpInstanceMap = map[string][]*VrrpInstance{}
Functions ¶
func AddIPAddress ¶
func CalculateAddressChanges ¶
func CalculateVlanChanges ¶
func ClearGobgpGrpcEndpoint ¶ added in v0.8.1
func ClearGobgpGrpcEndpoint()
func ClearVrfCache ¶
func ClearVrfCache()
func CompareCommand ¶
func CompareCommand() string
func ConfigDiscard ¶
func ConfigDiscard() bool
func ConfigDump ¶
func ConfigDumpCandidate ¶
func ConfigDumpCandidate()
func ConfigDumpTool ¶
func ConfigDumpTool(c *Config)
func ConfigLookupVrf ¶
func ConfigureGobgpGrpcEndpointApi ¶ added in v0.8.1
func ConfigureGobgpGrpcEndpointApi(set bool, args []interface{})
func DhcpExitFunc ¶
func DhcpExitFunc()
func DhcpJsonConfig ¶
func DhcpLeaseGet ¶
func DhcpLeaseGet(poolConfig *DhcpIpPool) (string, error)
func DhcpLocalAddrLookup ¶
func DhcpServerExec ¶
func DhcpServerExec(dhcp *Dhcp, poolConfig *DhcpIpPool)
func DhcpServerStart ¶
func DhcpStatusUpdate ¶
func DhcpStatusUpdate()
func DhcpVrfClear ¶
func DhcpVrfClear(vrfId int, cfg *VrfsConfig)
func DhcpVrfDelete ¶
func DhcpVrfDelete(vrfId int)
func DhcpVrfSync ¶
func DhcpVrfSync(vrfId int, cfg *VrfsConfig)
func DiscardConfigChange ¶ added in v0.8.1
func DiscardConfigChange()
func DistributeListDelete ¶ added in v0.8.1
func DistributeListDelete(vrfId int)
func DistributeListExit ¶ added in v0.8.1
func DistributeListExit()
func DistributeListSync ¶ added in v0.8.1
func DistributeListSync(vrfId int, cfg *VrfsConfig)
func DynamicCompletion ¶
func DynamicCompletionLocal ¶
func EntryExpandable ¶
func EntryExpanded ¶
func EntryNextState ¶
func EtcdDeletePath ¶
func EtcdEndpointsApi ¶
func EtcdEndpointsApi(set bool, Args []interface{})
func EtcdEndpointsShow ¶
func EtcdEndpointsShow() (str string)
func EtcdKeyDelete ¶
func EtcdKeyDelete(key []byte)
func EtcdKeyValueParse ¶
func EtcdPathApi ¶
func EtcdPathApi(set bool, Args []interface{})
func EtcdUnlock ¶
func EtcdVrfAddressAdd ¶
func EtcdVrfAddressAdd(vrfId int, vrf *VrfsConfig)
func EtcdVrfAddressClear ¶
func EtcdVrfAddressClear(vrfId int, vrf *VrfsConfig)
func EtcdVrfCommand ¶
func EtcdVrfDelete ¶
func EtcdVrfDeleteCacheCheck ¶
func EtcdVrfDeleteCacheRegister ¶
func EtcdVrfDeleteCacheRegister(cmd *Command)
func EtcdVrfStaticClear ¶
func EtcdVrfStaticClear(vrfId int)
func EtcdVrfStaticUpdate ¶
func EtcdVrfStaticUpdate(vrfId int, vrf *VrfsConfig)
func EtcdVrfSync ¶
func EtcdVrfSync(vrfId int, vrf *VrfsConfig)
func EtcdVrfVlanSubinterfacesAdd ¶
func EtcdVrfVlanSubinterfacesAdd(vrf *VrfsConfig)
func EtcdVrfVlanSubinterfacesDelete ¶
func EtcdVrfVlanSubinterfacesDelete(vrf *VrfsConfig)
func EtcdWatchStop ¶
func EtcdWatchStop()
func EtcdWatchUpdate ¶
func EtcdWatchUpdate()
func ExecLineWaitIfNoMatch ¶
func ExecLineWaitIfNoMatch(command string)
TODO: Return failure if we finally fail. TODO: Generic failure recovery mechanism for any configuration set
func GobgpAddGlobalPolicy ¶
func GobgpAddPolicyDefinition ¶
func GobgpAddPolicyDefinition(client *client.Client, cfg bgpconfig.PolicyDefinition)
func GobgpClearAll ¶
func GobgpClearAll()
func GobgpClearApi ¶
configure# clear gobgp
func GobgpClearDefinedSet ¶
func GobgpClearGlobal ¶
func GobgpClearGlobalPolicy ¶
func GobgpClearNeighbor ¶
func GobgpClearVrf ¶
func GobgpClearVrfRib ¶
func GobgpDeleteGlobalPolicy ¶
func GobgpDeletePolicyDefinition ¶
func GobgpDeletePolicyDefinition(client *client.Client, cfg bgpconfig.PolicyDefinition)
func GobgpHubDelete ¶
func GobgpHubDelete(vrfId int)
func GobgpHubUpdate ¶
func GobgpHubUpdate(vrfConfig VrfConfig)
func GobgpNeighborAdd ¶
func GobgpNeighborDelete ¶
func GobgpNeighborDelete(id string)
func GobgpNeighborUpdate ¶ added in v0.8.1
func GobgpParse ¶
func GobgpParse(jsonStr string)
func GobgpReset ¶
func GobgpReset(cfg *GobgpConfig) error
func GobgpResetApi ¶
configure# reset gobgp
func GobgpRouterIdRegister ¶
func GobgpRouterIdRegister(routerId string)
func GobgpSetDefinedSet ¶
func GobgpSetDefinedSet(client *client.Client, cfg *GobgpConfig)
func GobgpSetGlobal ¶
func GobgpSetGlobal(client *client.Client, cfg *GobgpConfig)
func GobgpSetGlobalPolicy ¶
func GobgpSetGlobalPolicy(client *client.Client, cfg *GobgpConfig) error
func GobgpSetNeighbor ¶
func GobgpSetNeighbor(client *client.Client, cfg *GobgpConfig)
func GobgpSetPolicyDefinition ¶
func GobgpSetPolicyDefinition(client *client.Client, cfg *GobgpConfig)
func GobgpSetRib ¶
func GobgpSetRib(client *client.Client, cfg *GobgpConfig)
func GobgpSetVrf ¶
func GobgpSetVrf(client *client.Client, cfg *GobgpConfig)
func GobgpSetZebra ¶
func GobgpSetZebra(client *client.Client, cfg *GobgpConfig, version uint8)
func GobgpSetZebraRoutine ¶
func GobgpSetZebraRoutine() error
func GobgpSoftresetNeighbor ¶
func GobgpSoftresetNeighbor(client *client.Client, cfg *GobgpConfig)
func GobgpStatus ¶
func GobgpStatusGlobal ¶
func GobgpStatusNeighbor ¶
func GobgpStatusRib ¶
func GobgpStatusUpdate ¶
func GobgpStatusUpdate()
func GobgpUpdate ¶
func GobgpUpdate(cfg *GobgpConfig, withReset bool) error
func GobgpUpdateNeighbor ¶
func GobgpUpdateNeighbor(client *client.Client, cfg *GobgpConfig)
func GobgpUpdateVrf ¶
func GobgpUpdateVrf(client *client.Client, cfg *GobgpConfig)
func GobgpVrfDelete ¶
func GobgpVrfDelete(vrfId int)
func GobgpVrfEqual ¶
func GobgpVrfRibSync ¶
func GobgpVrfUpdate ¶
func GobgpVrfUpdate(vrfConfig VrfConfig)
func GobgpWanExit ¶
func GobgpWanExit()
func GobgpWanStop ¶
func GobgpWanStop(local bool)
func HostnameApi ¶
func HostnameApi(set bool, Args []interface{})
func HostnameSet ¶
func HostnameSet(hostName string)
func HostnameUnset ¶
func HostnameUnset()
func IsAdditive ¶ added in v0.8.1
func IsEmptyLeaf ¶
func IsMandatory ¶
func IsPresenceContainer ¶
func IsRibdAsync ¶
func JsonMarshal ¶
func JsonMarshal() string
func KeyIncludeValue ¶
func KeyIndexString ¶
func LoadConfig ¶
func LocalAddrLookup ¶
func LocalCidrLookup ¶
func MatchChoice ¶
func MatchChoice(ent *yang.Entry, str string, status *YMatchState)
func MatchConfig ¶
func MatchConfig(config *Config, val string, str string, s *YMatchState)
func MatchConfigDir ¶
func MatchConfigDir(config *Config, str string, s *YMatchState)
func MatchConfigValue ¶
func MatchConfigValue(config *Config, str string, s *YMatchState)
func MatchEntry ¶
func MatchKeyMatched ¶
func MatchKeyMatched(ent *yang.Entry, str string, status *YMatchState)
func MatchString ¶
func ModuleStart ¶
func ModuleStart()
func NewGobgpClient ¶ added in v0.8.1
func NexthopWalkerUpdate ¶ added in v0.8.1
func NexthopWalkerUpdate()
func OspfStatusNeighbor ¶
func OspfStatusNeighbor(vrfName string, stat *OspfVrfStat) error
func OspfStatusRoute ¶
func OspfStatusRoute(vrfName string, stat *OspfVrfStat) error
func OspfStatusUpdate ¶
func OspfStatusUpdate()
func OspfVrfDelete ¶
func OspfVrfDelete(vrfId int)
func OspfVrfExit ¶
func OspfVrfExit()
func OspfVrfStop ¶
func OspfVrfStop(vrfId int)
func OspfVrfSync ¶
func OspfVrfSync(vrfId int, cfg *VrfsConfig)
func ParseDelete ¶
func PathRegisterCommand ¶
func ProcessDelete ¶
func ProcessDelete(config *Config)
func ProcessInterfacesAdd ¶
func ProcessInterfacesDelete ¶
func ProcessQuaggaConfigDelete ¶ added in v0.8.1
func ProcessVrfInterfaceChanges ¶
func ProcessVrfInterfaceChanges(vrfId int, currentConfig *VrfsConfig, newConfig *VrfsConfig)
func ProcessVrfUpdate ¶
func ProcessVrfUpdate(vrfId int, vrf *VrfsConfig)
func QuaggaConfigSync ¶ added in v0.8.1
func QuaggaDelete ¶
func QuaggaDelete(vrfId int)
func QuaggaExec ¶
func QuaggaExit ¶
func QuaggaExit()
func QuaggaStatusBgpSummary ¶
func QuaggaStatusRib ¶
func QuaggaStatusUpdate ¶
func QuaggaStatusUpdate()
func QuaggaStatusVrf ¶
func QuaggaStatusVrf(vrf string, stats *QuaggaStat)
func QuaggaVrfDelete ¶
func QuaggaVrfDelete(vrfId int)
func QuaggaVrfSync ¶
func QuaggaVrfSync(vrfId int, cfg *VrfsConfig)
func RelayDelete ¶
func RelayDelete(ifName, group string)
func RelayExitFunc ¶
func RelayExitFunc()
func RelayGroupExec ¶
func RelayGroupExec(instance *RelayInstance, group *RelayGroup, vrf string) func()
func RelayGroupUpdate ¶
func RelayGroupUpdate(dhcp *Dhcp)
func RemoveIPAddress ¶
func RemoveVlans ¶
func RollbackCompletion ¶
func RollbackDetailFetch ¶
func RollbackRevisionIncrement ¶
func RollbackRevisionIncrement() error
func SetGobgpGrpcEndpoint ¶ added in v0.8.1
func SetGobgpGrpcEndpoint(grpcEndpoint string)
func SubscribeAdd ¶ added in v0.8.1
func SubscribeAdd(stream rpc.Config_DoConfigServer, req *rpc.ConfigRequest)
func SubscribeDelete ¶
func SubscribeDelete(stream rpc.Config_DoConfigServer) error
func SubscribeDump ¶
func SubscribeDump()
func SubscribeHostLookup ¶ added in v0.8.3
func SubscribeLocalAdd ¶
func SubscribeLocalAdd(path []string, json SubPathJsonCallback)
func SubscribePortLookup ¶
func SubscribeRemoteAdd ¶
func SubscribeRemoteAdd(stream rpc.Config_DoConfigServer, req *rpc.ConfigRequest)
func SubscribeRemoteAddMulti ¶
func SubscribeRemoteAddMulti(stream rpc.Config_DoConfigServer, req *rpc.ConfigRequest)
func SubscribeSync ¶
func SubscribeSync() bool
func SubscribeValidateProcess ¶
func SubscribeValidateProcess(stream rpc.Config_DoConfigServer, typ rpc.ConfigType)
func SubscribeValidateResult ¶
func SubscribeValidateResult() bool
func UnregisterPath ¶
func UnregisterPath(p *Path)
func VrfGetIPv4localRoutes ¶ added in v0.8.1
func VrfGetRoutes ¶ added in v0.8.1
func VrfIdByName ¶ added in v0.8.1
func VrfQuaggaGet ¶ added in v0.8.1
func VrrpServerStart ¶
func VrrpServerStopAll ¶
func VrrpServerStopAll()
func VrrpStateDelete ¶
func VrrpStateDelete(ifName string)
func VrrpVrfDelete ¶
func VrrpVrfDelete(vrfId int)
func YEntryJson ¶
func YParseDelete ¶
func YangConfigPull ¶
func YangConfigPull(Args []string)
func YangConfigPush ¶
func YangConfigPush(Args []string)
func YangDelete ¶
Types ¶
type ClasslessRoutes ¶
type ClasslessRoutes struct { // original -> dhcp:prefix //dhcp:prefix's original type is inet:ipv4-prefix Prefix string `mapstructure:"prefix" json:"prefix,omitempty"` // original -> dhcp:nexthop //dhcp:nexthop's original type is inet:ipv4-address Nexthop string `mapstructure:"nexthop" json:"nexthop,omitempty"` }
struct for container dhcp:classless-routes
func (*ClasslessRoutes) Equal ¶
func (lhs *ClasslessRoutes) Equal(rhs *ClasslessRoutes) bool
type CliComponent ¶
type CliComponent struct{}
CLI component.
func (*CliComponent) Start ¶
func (this *CliComponent) Start() component.Component
CLI component start method.
func (*CliComponent) Stop ¶
func (this *CliComponent) Stop() component.Component
type Config ¶
type Config struct { Name string Entry *yang.Entry Parent *Config KeyConfig bool KeyOnlyConfig bool HasValue bool HasListValue bool Configs ConfigSlice Keys ConfigSlice Value string ValueList []string Prefix string Case *yang.Entry }
func (*Config) CommandLine ¶
func (*Config) CommandList ¶
func (*Config) CommandPath ¶
func (*Config) CommandString ¶
func (*Config) DisplayEntry ¶
func (*Config) IsContainer ¶
func (*Config) IsKeyConfig ¶
func (*Config) IsPresenceContainer ¶
func (*Config) IsValueLeaf ¶
func (*Config) JsonMarshal ¶
func (*Config) LookupByPath ¶
func (*Config) MandatoryCheck ¶
func (*Config) PrefixWrite ¶
func (*Config) SetListValue ¶
func (*Config) WriteCommandTo ¶
type ConfigComponent ¶
type ConfigComponent struct { ConfigActiveFile string ConfigFileDir string TwoPhaseCommit bool ZeroConfig bool }
Config component.
func (*ConfigComponent) Start ¶
func (this *ConfigComponent) Start() component.Component
Config component start method.
func (*ConfigComponent) Stop ¶
func (this *ConfigComponent) Stop() component.Component
Config component stop method.
type ConfigSlice ¶
type ConfigSlice []*Config
func (ConfigSlice) Less ¶
func (configs ConfigSlice) Less(i, j int) bool
func (ConfigSlice) Swap ¶
func (configs ConfigSlice) Swap(i, j int)
type Dhcp ¶
type Dhcp struct { // original -> dhcp:server Server Server `mapstructure:"server" json:"server,omitempty"` // original -> dhcp:relay Relay ServerGroupList `mapstructure:"relay" json:"relay,omitempty"` }
struct for container dhcp:dhcp
type DhcpIpPool ¶
type DhcpIpPool struct { // original -> dhcp:ip-pool-name IpPoolName string `mapstructure:"ip-pool-name" json:"ip-pool-name,omitempty"` // original -> dhcp:interface Interface string `mapstructure:"interface" json:"interface,omitempty"` // original -> dhcp:subnet //dhcp:subnet's original type is inet:ipv4-prefix Subnet string `mapstructure:"subnet" json:"subnet,omitempty"` // original -> dhcp:gateway-ip //dhcp:gateway-ip's original type is inet:ipv4-address GatewayIp string `mapstructure:"gateway-ip" json:"gateway-ip,omitempty"` // original -> dhcp:default-lease-time DefaultLeaseTime uint32 `mapstructure:"default-lease-time" json:"default-lease-time,omitempty"` // original -> dhcp:max-lease-time MaxLeaseTime uint32 `mapstructure:"max-lease-time" json:"max-lease-time,omitempty"` // original -> dhcp:host HostList []Host `mapstructure:"host" json:"host,omitempty"` // original -> dhcp:range RangeList []Range `mapstructure:"range" json:"range,omitempty"` // original -> dhcp:option Option Option `mapstructure:"option" json:"option,omitempty"` // original -> dhcp:failover-role FailoverRole string `mapstructure:"failover-role" json:"failover-role,omitempty"` // original -> dhcp:failover-peer-address //dhcp:failover-peer-address's original type is inet:ipv4-address FailoverPeerAddress string `mapstructure:"failover-peer-address" json:"failover-peer-address,omitempty"` }
struct for container dhcp:dhcp-ip-pool
func (*DhcpIpPool) Equal ¶
func (lhs *DhcpIpPool) Equal(rhs *DhcpIpPool) bool
type DhcpLeaseStatus ¶
type DhcpLeaseStatus struct { LeaseTime uint32 `json:"lease-time"` Range []DhcpRange `json:"range"` Lease []LeaseValue `json:"lease"` }
type DistributeList ¶ added in v0.8.1
type DistributeList struct { Primary []DistributeListEntry Backup []DistributeListEntry }
type DistributeListEntry ¶ added in v0.8.1
type DomainNameServers ¶
type DomainNameServers struct { // original -> dhcp:server //dhcp:server's original type is inet:ipv4-address Server string `mapstructure:"server" json:"server,omitempty"` }
struct for container dhcp:domain-name-servers
func (*DomainNameServers) Equal ¶
func (lhs *DomainNameServers) Equal(rhs *DomainNameServers) bool
type EtcdVrfStaticRoute ¶
type EtcdWatcher ¶ added in v0.8.2
type EtcdWatcher struct {
// contains filtered or unexported fields
}
func NewWatcher ¶ added in v0.8.2
func (*EtcdWatcher) Close ¶ added in v0.8.2
func (watcher *EtcdWatcher) Close() error
func (*EtcdWatcher) ResyncAndWatch ¶ added in v0.8.2
type GobgpConfig ¶
type GobgpConfig struct { Global bgpconfig.Global `mapstructure:"global"` Neighbors []bgpconfig.Neighbor `mapstructure:"neighbors"` Zebra bgpconfig.Zebra `mapstructure:"zebra"` Vrfs []VrfConfig `mapstructure:"vrfs"` DefinedSets bgpconfig.DefinedSets `mapstructure:"defined_sets"` PolicyDefinitions []bgpconfig.PolicyDefinition `mapstructure:"policy_definitions"` Ribs []VrfRib `mapstructure:"ribs" json:"ribs,omitempty" json:"ribs"` Interfaces Interfaces `mapstructure:"interfaces" json:"interfaces,omitempty"` }
type GobgpStat ¶
type GobgpStat struct { Global GobgpStatGlobal `json:"global"` Neighbor []GobgpStatNeighbor `json:"neighbors"` Ribs []GobgpStatRib `json:"ribs"` Vrf string `json:"vrf,omitempty"` }
type GobgpStatGlobal ¶
type GobgpStatNeighbor ¶
type GobgpStatRib ¶
type Host ¶
type Host struct { // original -> dhcp:host-name HostName string `mapstructure:"host-name" json:"host-name,omitempty"` // original -> dhcp:mac-address MacAddress string `mapstructure:"mac-address" json:"mac-address,omitempty"` // original -> dhcp:ip-address //dhcp:ip-address's original type is inet:ipv4-address IpAddress string `mapstructure:"ip-address" json:"ip-address,omitempty"` }
struct for container dhcp:host
type IPv4 ¶
type IPv4 struct {
Address []IPv4Addr `mapstructure:"address" json:"address,omitempty"`
}
type Interface ¶
type Interface struct { IPv4 IPv4 `mapstructure:"ipv4" json:"ipv4,omitempty"` Vlans []Vlan `mapstructure:"vlans" json:"vlans,omitempty"` Name string `mapstructure:"name" json:"name,omitempty"` Duplex string `mapstructure:"duplex" json:"duplex,omitempty"` Speed string `mapstructure:"speed" json:"speed,omitempty"` DhcpRelayGroup string `mapstructure:"dhcp-relay-group" json:"dhcp-relay-group,omitempty"` }
type InterfaceIp ¶ added in v0.8.1
type InterfaceIp struct { // original -> coreswitch:name Name string `mapstructure:"name" json:"name,omitempty"` // original -> coreswitch:ip Ip Ip `mapstructure:"ip" json:"ip,omitempty"` }
struct for container coreswitch:interface
func (*InterfaceIp) Equal ¶ added in v0.8.1
func (lhs *InterfaceIp) Equal(rhs *InterfaceIp) bool
type Interfaces ¶
type Interfaces struct {
Interface []Interface `mapstructure:"interface" json:"interface,omitempty"`
}
func (Interfaces) Len ¶
func (i Interfaces) Len() int
func (Interfaces) Less ¶
func (i Interfaces) Less(j, k int) bool
func (Interfaces) Swap ¶
func (i Interfaces) Swap(j, k int)
type Interfacex ¶
type Interfacex struct { // original -> static:ifname Ifname string `mapstructure:"ifname" json:"ifname,omitempty"` }
struct for container static:interface
func (*Interfacex) Equal ¶
func (lhs *Interfacex) Equal(rhs *Interfacex) bool
type Ip ¶ added in v0.8.1
type Ip struct { // original -> coreswitch:ospf OspfIp OspfIp `mapstructure:"ospf" json:"ospf,omitempty"` }
struct for container coreswitch:ip
type LeaseMap ¶
type LeaseMap map[string]*LeaseValue
type LeaseValue ¶
type NeighborConfig ¶
type Nexthop ¶
type Nexthop struct { // original -> static:address //static:address's original type is inet:ipv4-address Address string `mapstructure:"address" json:"address,omitempty"` }
struct for container static:nexthop
type NtpServers ¶
type NtpServers struct { // original -> dhcp:server //dhcp:server's original type is inet:ipv4-address Server string `mapstructure:"server" json:"server,omitempty"` }
struct for container dhcp:ntp-servers
func (*NtpServers) Equal ¶
func (lhs *NtpServers) Equal(rhs *NtpServers) bool
type OpenBgpConfig ¶ added in v0.8.1
type Option ¶
type Option struct { // original -> dhcp:dhcp-server-identifier //dhcp:dhcp-server-identifier's original type is inet:ipv4-address DhcpServerIdentifier string `mapstructure:"dhcp-server-identifier" json:"dhcp-server-identifier,omitempty"` // original -> dhcp:domain-name DomainName string `mapstructure:"domain-name" json:"domain-name,omitempty"` // original -> dhcp:domain-name-servers DomainNameServersList []DomainNameServers `mapstructure:"domain-name-servers" json:"domain-name-servers,omitempty"` // original -> dhcp:ntp-servers NtpServersList []NtpServers `mapstructure:"ntp-servers" json:"ntp-servers,omitempty"` // original -> dhcp:interface-mtu InterfaceMtu uint32 `mapstructure:"interface-mtu" json:"interface-mtu,omitempty"` // original -> dhcp:netbios-name-server //dhcp:netbios-name-server's original type is inet:ip-address NetbiosNameServer string `mapstructure:"netbios-name-server" json:"netbios-name-server,omitempty"` // original -> dhcp:netbios-node-type NetbiosNodeType uint32 `mapstructure:"netbios-node-type" json:"netbios-node-type,omitempty"` // original -> dhcp:netbios-scope NetbiosScope string `mapstructure:"netbios-scope" json:"netbios-scope,omitempty"` // original -> dhcp:tftp-server-name TftpServerName string `mapstructure:"tftp-server-name" json:"tftp-server-name,omitempty"` // original -> dhcp:bootfile-name BootfileName string `mapstructure:"bootfile-name" json:"bootfile-name,omitempty"` // original -> dhcp:voip-tftp-servers VoipTftpServersList []VoipTftpServers `mapstructure:"voip-tftp-servers" json:"voip-tftp-servers,omitempty"` // original -> dhcp:sip-servers SipServersList []SipServers `mapstructure:"sip-servers" json:"sip-servers,omitempty"` // original -> dhcp:classless-routes ClasslessRoutesList []ClasslessRoutes `mapstructure:"classless-routes" json:"classless-routes,omitempty"` // original -> dhcp:time-offset TimeOffset int32 `mapstructure:"time-offset" json:"time-offset,omitempty"` }
struct for container dhcp:option
type Ospf ¶
type Ospf struct { Network string `mapstructure:"network" json:"network,omitempty"` Area uint32 `mapstructure:"area" json:"area,omitempty"` InterfaceIps []InterfaceIp `mapstructure:"interfaces" json:"interfaces,omitempty"` Interface string `mapstructure:"interface" json:"interface,omitempty"` // Deplicated from 2.4 PrimaryList []DistributeListEntry `mapstructure:"distribute-list" json:"distribute-list,omitempty"` BackupList []DistributeListEntry `mapstructure:"backup-distribute-list" json:"backup-distribute-list,omitempty"` }
type OspfIfParam ¶ added in v0.8.1
type OspfIfParam struct { // original -> coreswitch:interfaces InterfaceIps []InterfaceIp `mapstructure:"interfaces" json:"interfaces,omitempty"` }
struct for container coreswitch:ospf-if-param
func (*OspfIfParam) Equal ¶ added in v0.8.1
func (lhs *OspfIfParam) Equal(rhs *OspfIfParam) bool
type OspfIp ¶ added in v0.8.1
type OspfIp struct { // original -> coreswitch:authentication-key AuthenticationKey string `mapstructure:"authentication-key" json:"authentication-key,omitempty"` // original -> coreswitch:cost Cost uint16 `mapstructure:"cost" json:"cost,omitempty"` // original -> coreswitch:dead-interval DeadInterval uint16 `mapstructure:"dead-interval" json:"dead-interval,omitempty"` // original -> coreswitch:hello-interval HelloInterval uint16 `mapstructure:"hello-interval" json:"hello-interval,omitempty"` // original -> coreswitch:priority Priority string `mapstructure:"priority" json:"priority,omitempty"` // original -> coreswitch:retransmit-interval RetransmitInterval uint16 `mapstructure:"retransmit-interval" json:"retransmit-interval,omitempty"` // original -> coreswitch:transmit-delay TransmitDelay uint16 `mapstructure:"transmit-delay" json:"transmit-delay,omitempty"` }
struct for container coreswitch:ospf
type OspfJSONRoutes ¶
type OspfJSONRoutes struct { Prefix string `mapstructure:"prefix"` Nexthops []OspfNexthop `mapstructure:"nexthops"` Metric int `mapstructure:"metric"` Distance int `mapstructure:"distance"` Type string `mapstructure:"type"` }
Only used for JSON parse.
type OspfNeighbor ¶
type OspfNexthop ¶
type OspfRoute ¶
type OspfRoute struct { Network string `json:"network"` Nexthops []OspfNexthop `json:"next-hop"` }
type OspfStat ¶
type OspfStat struct {
Ospf []OspfVrfStat `json:"ospf"`
}
type OspfVrfStat ¶
type OspfVrfStat struct { Vrf string `json:"vrf"` Neighbors []OspfNeighbor `json:"neighbors"` Routes []OspfRoute `json:"routes"` }
func OspfStatusVrf ¶
func OspfStatusVrf(vrfName string) *OspfVrfStat
type PriorityConfig ¶ added in v0.8.1
type PriorityConfig struct {
Priority string `mapstructure:"priority" json:"priority,omitempty"`
}
type QuaggaAccess ¶ added in v0.8.1
func VrfQuaggaAccess ¶ added in v0.8.1
func (*QuaggaAccess) Auth ¶ added in v0.8.1
func (qa *QuaggaAccess) Auth(pass string) error
func (*QuaggaAccess) Batch ¶ added in v0.8.1
func (qa *QuaggaAccess) Batch(in []string) []string
func (*QuaggaAccess) Close ¶ added in v0.8.1
func (qa *QuaggaAccess) Close()
func (*QuaggaAccess) GetTempFileName ¶ added in v0.8.1
func (qa *QuaggaAccess) GetTempFileName() string
type QuaggaInstanceConfig ¶ added in v0.8.1
type QuaggaInstanceManager ¶ added in v0.8.1
type QuaggaInstanceManager struct { QuaggaProcMap map[int]map[string]process.ProcessSlice QuaggaConfigCache map[int]QuaggaInterfaceConfigs LocalCacheLock *sync.Mutex QuaggaConfigDir string }
func GetInstanceManager ¶ added in v0.8.1
func GetInstanceManager(instanceName string) *QuaggaInstanceManager
func GetOrCreateInstanceManager ¶ added in v0.8.1
func GetOrCreateInstanceManager(instanceName string) *QuaggaInstanceManager
func NewQuaggaManager ¶ added in v0.8.1
func NewQuaggaManager() *QuaggaInstanceManager
func (QuaggaInstanceManager) LockLocalCache ¶ added in v0.8.1
func (qim QuaggaInstanceManager) LockLocalCache()
func (QuaggaInstanceManager) ProcessConfigDelete ¶ added in v0.8.1
func (qim QuaggaInstanceManager) ProcessConfigDelete(vrfId int, quaggaConfigMap QuaggaInterfaceConfigs)
func (QuaggaInstanceManager) ProcessQuaggaConfigAdd ¶ added in v0.8.1
func (qim QuaggaInstanceManager) ProcessQuaggaConfigAdd(vrfId int, quaggaConfigMap QuaggaInterfaceConfigs)
func (QuaggaInstanceManager) ProcessQuaggaConfigDelete ¶ added in v0.8.1
func (qim QuaggaInstanceManager) ProcessQuaggaConfigDelete(vrfId int)
func (QuaggaInstanceManager) ProcessVrfQuaggaConfigDelete ¶ added in v0.8.1
func (qim QuaggaInstanceManager) ProcessVrfQuaggaConfigDelete(vrfId int)
func (QuaggaInstanceManager) QuaggaBgpConfigDiff ¶ added in v0.8.1
func (qim QuaggaInstanceManager) QuaggaBgpConfigDiff(oldQuaggaConfig QuaggaInterfaceConfigs, newQuaggaConfig QuaggaInterfaceConfigs) (QuaggaInterfaceConfigs, QuaggaInterfaceConfigs, QuaggaInterfaceConfigs)
func (QuaggaInstanceManager) QuaggaCleanup ¶ added in v0.8.1
func (qim QuaggaInstanceManager) QuaggaCleanup()
func (QuaggaInstanceManager) QuaggaConfigSync ¶ added in v0.8.1
func (qim QuaggaInstanceManager) QuaggaConfigSync(jsonStr string, vrfId int)
func (QuaggaInstanceManager) SpawnQuagga ¶ added in v0.8.1
func (qim QuaggaInstanceManager) SpawnQuagga(vrfId int, interfaceName string, configStr string)
func (QuaggaInstanceManager) UnLockLocalCache ¶ added in v0.8.1
func (qim QuaggaInstanceManager) UnLockLocalCache()
type QuaggaInterfaceConfigs ¶ added in v0.8.1
type QuaggaInterfaceConfigs map[string][]QuaggaInstanceConfig
type QuaggaManager ¶ added in v0.8.1
type QuaggaManager interface { SetConfig() DeleteConfig() Destroy() }
type QuaggaStat ¶
type QuaggaStat struct {
Stats []GobgpStat `json:"bgp_lan"`
}
type Range ¶
type Range struct { // original -> dhcp:range-index RangeIndex uint16 `mapstructure:"range-index" json:"range-index,omitempty"` // original -> dhcp:range-start-ip //dhcp:range-start-ip's original type is inet:ipv4-address RangeStartIp string `mapstructure:"range-start-ip" json:"range-start-ip,omitempty"` // original -> dhcp:range-end-ip //dhcp:range-end-ip's original type is inet:ipv4-address RangeEndIp string `mapstructure:"range-end-ip" json:"range-end-ip,omitempty"` }
struct for container dhcp:range
type RelayGroup ¶
type RelayGroup struct {
Server []string
}
type RelayInstance ¶
type Rollback ¶
func RollbackListGet ¶
type RollbackList ¶
type RollbackList []*Rollback
func (RollbackList) Len ¶
func (rlist RollbackList) Len() int
func (RollbackList) Less ¶
func (rlist RollbackList) Less(i, j int) bool
func (RollbackList) Swap ¶
func (rlist RollbackList) Swap(i, j int)
type Route ¶
type Route struct { // original -> static:prefix //static:prefix's original type is inet:ipv4-prefix Prefix string `mapstructure:"prefix" json:"prefix,omitempty"` // original -> static:nexthop NexthopList []Nexthop `mapstructure:"nexthop" json:"nexthop,omitempty"` // original -> static:interface InterfaceList []Interfacex `mapstructure:"interface" json:"interface,omitempty"` // original -> static:distance Distance uint8 `mapstructure:"distance" json:"distance,omitempty"` }
struct for container static:route
type RpcComponent ¶
type RpcComponent struct {
GrpcEndpoint string
}
RPC component.
func (*RpcComponent) Start ¶
func (this *RpcComponent) Start() component.Component
RPC component start method.
func (*RpcComponent) Stop ¶
func (this *RpcComponent) Stop() component.Component
type Server ¶
type Server struct { // original -> dhcp:default-lease-time DefaultLeaseTime uint32 `mapstructure:"default-lease-time" json:"default-lease-time,omitempty"` // original -> dhcp:max-lease-time MaxLeaseTime uint32 `mapstructure:"max-lease-time" json:"max-lease-time,omitempty"` // original -> dhcp:ping-check //dhcp:ping-check's original type is boolean PingCheck bool `mapstructure:"ping-check" json:"ping-check,omitempty"` // original -> dhcp:option Option Option `mapstructure:"option" json:"option,omitempty"` // original -> dhcp:dhcp-ip-pool DhcpIpPoolList []DhcpIpPool `mapstructure:"dhcp-ip-pool" json:"dhcp-ip-pool,omitempty"` }
struct for container dhcp:server
type ServerAddress ¶
type ServerAddress struct { // original -> dhcp:address //dhcp:address's original type is inet:ipv4-address Address string `mapstructure:"address" json:"address,omitempty"` }
struct for container dhcp:server-address
func (*ServerAddress) Equal ¶
func (lhs *ServerAddress) Equal(rhs *ServerAddress) bool
type ServerGroup ¶
type ServerGroup struct { // original -> dhcp:server-group-name ServerGroupName string `mapstructure:"server-group-name" json:"server-group-name,omitempty"` // original -> dhcp:server-address ServerAddressList []ServerAddress `mapstructure:"server-address" json:"server-address,omitempty"` }
struct for container dhcp:server-group
func (*ServerGroup) Equal ¶
func (lhs *ServerGroup) Equal(rhs *ServerGroup) bool
type ServerGroupList ¶
type ServerGroupList struct {
ServerGroupList []ServerGroup `mapstructure:"server-group" json:"server-group,omitempty"`
}
type SipServers ¶
type SipServers struct { // original -> dhcp:server //dhcp:server's original type is inet:ipv4-address Server string `mapstructure:"server" json:"server,omitempty"` }
struct for container dhcp:sip-servers
func (*SipServers) Equal ¶
func (lhs *SipServers) Equal(rhs *SipServers) bool
type SubPathBase ¶
type SubPathBase struct {
// contains filtered or unexported fields
}
func (*SubPathBase) Append ¶
func (subPath *SubPathBase) Append(path []string, cmd *Command)
func (*SubPathBase) CommandClear ¶
func (subPath *SubPathBase) CommandClear()
func (*SubPathBase) Commit ¶
func (subPath *SubPathBase) Commit()
func (*SubPathBase) Len ¶
func (subPath *SubPathBase) Len() int
func (*SubPathBase) Path ¶
func (subPath *SubPathBase) Path() *Path
func (*SubPathBase) RegisterPath ¶
func (subPath *SubPathBase) RegisterPath(paths []string)
func (*SubPathBase) Sync ¶
func (subPath *SubPathBase) Sync() bool
type SubPathJsonCallback ¶
type SubPathLocal ¶
type SubPathLocal struct { SubPathBase // contains filtered or unexported fields }
func (*SubPathLocal) Commit ¶
func (subPath *SubPathLocal) Commit()
type SubPathRemote ¶
type SubPathRemote struct { SubPathBase // contains filtered or unexported fields }
func (*SubPathRemote) Commit ¶
func (subPath *SubPathRemote) Commit()
type Subscriber ¶
type Subscriber struct { Type int Module string Port uint32 Host string SubPath []SubPath // contains filtered or unexported fields }
func SubscribeLookup ¶
func SubscribeLookup(stream rpc.Config_DoConfigServer) *Subscriber
func (*Subscriber) CommandClear ¶
func (sub *Subscriber) CommandClear()
func (*Subscriber) Commit ¶
func (sub *Subscriber) Commit()
func (*Subscriber) CommitEnd ¶
func (sub *Subscriber) CommitEnd()
func (*Subscriber) CommitStart ¶
func (sub *Subscriber) CommitStart()
func (*Subscriber) HasCommand ¶
func (sub *Subscriber) HasCommand() bool
func (*Subscriber) SendCommand ¶
func (sub *Subscriber) SendCommand(cmd *Command)
func (*Subscriber) SendJSON ¶ added in v0.8.1
func (sub *Subscriber) SendJSON(path []string, json string)
func (*Subscriber) SendMessage ¶
func (sub *Subscriber) SendMessage(typ rpc.ConfigType, path []string)
func (*Subscriber) Validate ¶
func (sub *Subscriber) Validate()
func (*Subscriber) ValidateEnd ¶
func (sub *Subscriber) ValidateEnd()
func (*Subscriber) ValidateStart ¶
func (sub *Subscriber) ValidateStart()
type UnicastPeer ¶
type UnicastPeer struct { // original -> vrrp:address //vrrp:address's original type is inet:ipv4-address Address string `mapstructure:"address" json:"address,omitempty"` }
struct for container vrrp:unicast-peer
func (*UnicastPeer) Equal ¶
func (lhs *UnicastPeer) Equal(rhs *UnicastPeer) bool
type VoipTftpServers ¶
type VoipTftpServers struct { // original -> dhcp:server //dhcp:server's original type is inet:ipv4-address Server string `mapstructure:"server" json:"server,omitempty"` }
struct for container dhcp:voip-tftp-servers
func (*VoipTftpServers) Equal ¶
func (lhs *VoipTftpServers) Equal(rhs *VoipTftpServers) bool
type VrfConfig ¶
type VrfConfig struct { Name string `mapstructure:"name" json:"name,omitempty"` VrfId int `mapstructure:"vrf-id" json:"vrf-id,omitempty"` Rd string `mapstructure:"rd" json:"rd,omitempty"` RtImport string `mapstructure:"rt-import" json:"rt-import,omitempty"` RtExport string `mapstructure:"rt-export" json:"rt-export,omitempty"` RtBoth string `mapstructure:"rt-both" json:"rt-both,omitempty"` VrfRibs []VrfRib `mapstructure:"ribs" json:"ribs,omitempty"` Hubs []Hub `mapstructure:"hubs" json:"hubs,omitempty"` HubNode string `mapstructure:"hub_node" json:"hub_node,omitempty"` Static Static }
type VrfRib ¶
type VrfsConfig ¶
type VrfsConfig struct { Name string `mapstructure:"name" json:"name,omitempty"` Id int `mapstructure:"vrf_id" json:"vrf_id,omitempty"` Rd string `mapstructure:"rd" json:"rd,omitempty"` RtImport string `mapstructure:"rt_import" json:"rt_import,omitempty"` RtExport string `mapstructure:"rt_export" json:"rt_export,omitempty"` RtBoth string `mapstructure:"rt_both" json:"rt_both,omitempty"` VrfRibs []VrfRib `mapstructure:"ribs" json:"ribs,omitempty"` Hubs []Hub `mapstructure:"hubs" json:"hubs,omitempty"` HubNode string `mapstructure:"hub_node" json:"hub_node,omitempty"` Interfaces Interfaces `mapstructure:"interfaces" json:"interfaces,omitempty"` Vrrp []Vrrp `mapstructure:"vrrp" json:"vrrp,omitempty"` Dhcp Dhcp `mapstructure:"dhcp" json:"dhcp,omitempty"` Static Static `mapstructure:"static" json:"static,omitempty"` Bgp []QuaggaBgp `mapstructure:"bgp" json:"bgp,omitempty"` Ospf OspfArray `mapstructure:"ospf" json:"ospf,omitempty"` Pair PriorityConfig `mapstructure:"pair" json:"pair,omitempty"` Gateway PriorityConfig `mapstructure:"gateway" json:"gateway,omitempty"` }
func (*VrfsConfig) Copy ¶
func (vrf *VrfsConfig) Copy() VrfConfig
type Vrrp ¶
type Vrrp struct { // original -> vrrp:vrid Vrid uint8 `mapstructure:"vrid" json:"vrid,omitempty"` // original -> vrrp:interface Interface string `mapstructure:"interface" json:"interface,omitempty"` // original -> vrrp:vrrp-state State State `mapstructure:"state" json:"state,omitempty"` // original -> vrrp:virtual-address //vrrp:virtual-address's original type is inet:ipv4-address VirtualAddress string `mapstructure:"virtual-address" json:"virtual-address,omitempty"` // original -> vrrp:priority Priority uint8 `mapstructure:"priority" json:"priority,omitempty"` // original -> vrrp:advertisement-interval AdvertisementInterval uint8 `mapstructure:"advertisement-interval" json:"advertisement-interval,omitempty"` // original -> vrrp:unicast-peer UnicastPeerList []UnicastPeer `mapstructure:"unicast-peer" json:"unicast-peer,omitempty"` // original -> vrrp:authentication-key AuthenticationKey string `mapstructure:"authentication-key" json:"authentication-key,omitempty"` // original -> vrrp:preempt //vrrp:preempt's original type is empty Preempt bool `mapstructure:"preempt" json:"preempt,omitempty"` // manual addition. Vrf string `mapstructure:"vrf" json:"vrf,omitempty"` //Manual addition Name string `mapstructure:"name" json:"name,omitempty"` }
struct for container vrrp:vrrp
type VrrpConfig ¶
type VrrpConfig []Vrrp
type YMatchState ¶
type YMatchState struct {
// contains filtered or unexported fields
}
type YangComponent ¶
Yang component.
func (*YangComponent) Start ¶
func (this *YangComponent) Start() component.Component
Yang component start method.
func (*YangComponent) Stop ¶
func (this *YangComponent) Stop() component.Component
Yang component stop method.
Source Files ¶
- command.go
- compare.go
- config.go
- dhcp-config.go
- dhcp-status.go
- dhcp.go
- dlist.go
- environ.go
- etcd.go
- etcdwatcher.go
- gobgp-status.go
- gobgp.go
- grpc.go
- hostname.go
- json.go
- load.go
- module.go
- ospf-if-config.go
- ospf-status.go
- ospf.go
- quagga-status.go
- quagga.go
- quagga_access.go
- quagga_manager.go
- relay.go
- rollback.go
- static-config.go
- subscribe.go
- vrf.go
- vrrp-config.go
- vrrp.go
- yang.go