rpc

package
v0.0.0-...-a4e6d7a Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

lahandler

Index

Constants

View Source
const DBName string = "UsrConfDb.db"

Variables

This section is empty.

Functions

func ConvertAdminStateStringToBool

func ConvertAdminStateStringToBool(s string) bool

func ConvertCdmMachineStateToYangState

func ConvertCdmMachineStateToYangState(state int) int32

func ConvertLaAggIntervalToLacpPeriod

func ConvertLaAggIntervalToLacpPeriod(interval time.Duration) int32

func ConvertLaAggModeToModelLacpMode

func ConvertLaAggModeToModelLacpMode(lacpMode uint32) int32

func ConvertLaAggTypeToModelLagType

func ConvertLaAggTypeToModelLagType(aggType uint32) int32

func ConvertModelLacpModeToLaAggMode

func ConvertModelLacpModeToLaAggMode(yangLacpMode int32) uint32

func ConvertModelLacpPeriodToLaAggInterval

func ConvertModelLacpPeriodToLaAggInterval(yangInterval int32) time.Duration

func ConvertModelLagTypeToLaAggType

func ConvertModelLagTypeToLaAggType(yangLagType int32) uint32

func ConvertModelSpeedToLaAggSpeed

func ConvertModelSpeedToLaAggSpeed(yangSpeed string) int

func ConvertMuxMachineStateToYangState

func ConvertMuxMachineStateToYangState(state int) int32

func ConvertRxMachineStateToYangState

func ConvertRxMachineStateToYangState(state int) int32

func ConvertSqlBooleanToBool

func ConvertSqlBooleanToBool(sqlbool string) bool

func ConvertStringToUint8Array

func ConvertStringToUint8Array(s string) [6]uint8

func GenerateKeyByAggName

func GenerateKeyByAggName(AggName string) uint16

func GetAddDelMembers

func GetAddDelMembers(orig []uint16, update []int32) (add, del []int32)

func GetKeyByAggName

func GetKeyByAggName(AggName string) uint16

func SetLaAggHashMode

func SetLaAggHashMode(conf *lacp.LaAggConfig) error

func SetLaAggMode

func SetLaAggMode(conf *lacp.LaAggConfig) error

SetLaAggPortMode will set the lacp mode of the port based on the model values

func SetLaAggPeriod

func SetLaAggPeriod(conf *lacp.LaAggConfig) error

func SetLaAggSystemInfo

func SetLaAggSystemInfo(conf *lacp.LaAggConfig) error

func SetLaAggType

func SetLaAggType(conf *lacp.LaAggConfig) error

SetLaAggType will set whether the agg is static or lacp enabled

func StartServer

func StartServer(logger *logging.Writer, handler *LACPDServiceHandler, paramDir string)

Types

type ClientJson

type ClientJson struct {
	Name string `json:Name`
	Port int    `json:Port`
}

type LACPDServiceHandler

type LACPDServiceHandler struct {
	// contains filtered or unexported fields
}

func NewLACPDServiceHandler

func NewLACPDServiceHandler(svr *server.LAServer) *LACPDServiceHandler

func (*LACPDServiceHandler) CreateDistributedRelay

func (la *LACPDServiceHandler) CreateDistributedRelay(config *lacpd.DistributedRelay) (bool, error)

func (*LACPDServiceHandler) CreateLaPortChannel

func (la *LACPDServiceHandler) CreateLaPortChannel(config *lacpd.LaPortChannel) (bool, error)

CreateLaPortChannel will create an lacp lag

1 : i32 	LagType  (0 == LACP, 1 == STATIC)
2 : string 	Description
3 : bool 	Enabled
4 : i16 	Mtu
5 : i16 	MinLinks
6 : string 	Type
7 : string 	NameKey
8 : i32 	Interval (0 == LONG, 1 == SHORT)
9 : i32 	LacpMode (0 == ACTIVE, 1 == PASSIVE)
10 : string SystemIdMac
11 : i16 	SystemPriority

func (*LACPDServiceHandler) CreateLacpGlobal

func (la *LACPDServiceHandler) CreateLacpGlobal(config *lacpd.LacpGlobal) (bool, error)

func (*LACPDServiceHandler) DeleteDistributedRelay

func (la *LACPDServiceHandler) DeleteDistributedRelay(config *lacpd.DistributedRelay) (bool, error)

func (*LACPDServiceHandler) DeleteLaPortChannel

func (la *LACPDServiceHandler) DeleteLaPortChannel(config *lacpd.LaPortChannel) (bool, error)

func (*LACPDServiceHandler) DeleteLacpGlobal

func (la *LACPDServiceHandler) DeleteLacpGlobal(config *lacpd.LacpGlobal) (bool, error)

can't delete an autocreated object

func (*LACPDServiceHandler) GetBulkDistributedRelayState

func (la *LACPDServiceHandler) GetBulkDistributedRelayState(fromIndex lacpd.Int, count lacpd.Int) (obj *lacpd.DistributedRelayStateGetInfo, err error)

func (*LACPDServiceHandler) GetBulkIppLinkState

func (la *LACPDServiceHandler) GetBulkIppLinkState(fromIndex lacpd.Int, count lacpd.Int) (obj *lacpd.IppLinkStateGetInfo, err error)

func (*LACPDServiceHandler) GetBulkLaPortChannelIntfRefListState

func (la *LACPDServiceHandler) GetBulkLaPortChannelIntfRefListState(fromIndex lacpd.Int, count lacpd.Int) (obj *lacpd.LaPortChannelIntfRefListStateGetInfo, err error)

GetBulkAggregationLacpMemberStateCounters will return the status of all the lag members.

func (*LACPDServiceHandler) GetBulkLaPortChannelState

func (la *LACPDServiceHandler) GetBulkLaPortChannelState(fromIndex lacpd.Int, count lacpd.Int) (obj *lacpd.LaPortChannelStateGetInfo, err error)

GetBulkLaAggrGroupState will return the status of all the lag groups All lag groups are stored in a map, thus we will assume that the order at which a for loop iterates over the map is preserved. It is assumed that at the time of this operation that no new aggragators are added, otherwise can get inconsistent results

func (*LACPDServiceHandler) GetBulkLacpGlobalState

func (la *LACPDServiceHandler) GetBulkLacpGlobalState(fromIndex lacpd.Int, count lacpd.Int) (obj *lacpd.LacpGlobalStateGetInfo, err error)

func (*LACPDServiceHandler) GetDistributedRelayState

func (la *LACPDServiceHandler) GetDistributedRelayState(drname string) (*lacpd.DistributedRelayState, error)

func (*LACPDServiceHandler) GetIppLinkState

func (la *LACPDServiceHandler) GetIppLinkState(intref, drnameref string) (obj *lacpd.IppLinkState, err error)

func (*LACPDServiceHandler) GetLaPortChannelIntfRefListState

func (la *LACPDServiceHandler) GetLaPortChannelIntfRefListState(intfref string) (*lacpd.LaPortChannelIntfRefListState, error)

func (*LACPDServiceHandler) GetLaPortChannelState

func (la *LACPDServiceHandler) GetLaPortChannelState(IntfRef string) (*lacpd.LaPortChannelState, error)

func (*LACPDServiceHandler) GetLacpGlobalState

func (la *LACPDServiceHandler) GetLacpGlobalState(vrf string) (*lacpd.LacpGlobalState, error)

func (*LACPDServiceHandler) HandleDbReadDistributedRelay

func (la *LACPDServiceHandler) HandleDbReadDistributedRelay(dbHdl *dbutils.DBUtil, del bool) error

func (*LACPDServiceHandler) HandleDbReadLaPortChannel

func (la *LACPDServiceHandler) HandleDbReadLaPortChannel(dbHdl *dbutils.DBUtil, del bool) error

func (*LACPDServiceHandler) HandleDbReadLacpGlobal

func (la *LACPDServiceHandler) HandleDbReadLacpGlobal(dbHdl *dbutils.DBUtil) error

func (*LACPDServiceHandler) ReadConfigFromDB

func (la *LACPDServiceHandler) ReadConfigFromDB(prevState int) error

func (*LACPDServiceHandler) SetPortLacpLogEnable

func (la *LACPDServiceHandler) SetPortLacpLogEnable(Id lacpd.Uint16, modStr string, ena bool) (lacpd.Int, error)

SetPortLacpLogEnable will enable on a per port basis logging modStr - PORT, RXM, TXM, PTXM, TXM, CDM, ALL modStr can be a string containing one or more of the above

func (*LACPDServiceHandler) UpdateDistributedRelay

func (la *LACPDServiceHandler) UpdateDistributedRelay(origconfig *lacpd.DistributedRelay, updateconfig *lacpd.DistributedRelay, attrset []bool, op []*lacpd.PatchOpInfo) (bool, error)

func (*LACPDServiceHandler) UpdateLaPortChannel

func (la *LACPDServiceHandler) UpdateLaPortChannel(origconfig *lacpd.LaPortChannel, updateconfig *lacpd.LaPortChannel, attrset []bool, op []*lacpd.PatchOpInfo) (bool, error)

func (*LACPDServiceHandler) UpdateLacpGlobal

func (la *LACPDServiceHandler) UpdateLacpGlobal(origconfig *lacpd.LacpGlobal, updateconfig *lacpd.LacpGlobal, attrset []bool, op []*lacpd.PatchOpInfo) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL