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: 13 Imported by: 0

Documentation

Overview

lahandler

Index

Constants

View Source
const DBName string = "UsrConfDb.db"

Variables

This section is empty.

Functions

func ConvertAddrToString

func ConvertAddrToString(mac [6]uint8) string

func ConvertBoolToInt32

func ConvertBoolToInt32(val bool) int32

converts bool to yang true(1)/false(2)

func ConvertBridgeIdToString

func ConvertBridgeIdToString(bridgeid stp.BridgeId) string

func ConvertInt32ToBool

func ConvertInt32ToBool(val int32) bool

converts yang true(1)/false(2) to bool

func ConvertThriftBrgConfigToStpBrgConfig

func ConvertThriftBrgConfigToStpBrgConfig(config *stpd.StpBridgeInstance, brgconfig *stp.StpBridgeConfig)

func ConvertThriftPortConfigToStpPortConfig

func ConvertThriftPortConfigToStpPortConfig(config *stpd.StpPort, portconfig *stp.StpPortConfig)

func GetPortState

func GetPortState(p *stp.StpPort) (state int32)

NOTE—The current IETF Bridge MIB (IETF RFC 1493) uses disabled, blocking, listening, learning, forwarding, and broken dot1dStpPortStates. The learning and forwarding states correspond exactly to the Learning and Forwarding Port States specified in this standard. Disabled, blocking, listening, and broken all correspond to the Discarding Port State — while those dot1dStpPortStates serve to distinguish reasons for discarding frames the operation of the Forwarding and Learning processes is the same for all of them. The dot1dStpPortState broken represents the failure or unavailability of the port’s MAC as indicated by MAC_Operational FALSE; disabled represents exclusion of the port from the active topology by management setting of the Administrative Port State to Disabled; blocking represents exclusion of the port from the active topology by the spanning tree algorithm [computing an Alternate or Backup Port Role (17.7)]; listening represents a port that the spanning tree algorithm has selected to be part of the active topology (computing a Root Port or Designated Port role) but is temporarily discarding frames to guard against loops or incorrect learning.

func StartServer

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

Types

type ClientJson

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

type STPDServiceHandler

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

func NewSTPDServiceHandler

func NewSTPDServiceHandler(svr *server.STPServer) *STPDServiceHandler

func (*STPDServiceHandler) CreateStpBridgeInstance

func (s *STPDServiceHandler) CreateStpBridgeInstance(config *stpd.StpBridgeInstance) (rv bool, err error)

CreateDot1dStpBridgeConfig

func (*STPDServiceHandler) CreateStpGlobal

func (s *STPDServiceHandler) CreateStpGlobal(config *stpd.StpGlobal) (rv bool, err error)

func (*STPDServiceHandler) CreateStpPort

func (s *STPDServiceHandler) CreateStpPort(config *stpd.StpPort) (rv bool, err error)

func (*STPDServiceHandler) DeleteStpBridgeInstance

func (s *STPDServiceHandler) DeleteStpBridgeInstance(config *stpd.StpBridgeInstance) (rv bool, err error)

func (*STPDServiceHandler) DeleteStpGlobal

func (s *STPDServiceHandler) DeleteStpGlobal(config *stpd.StpGlobal) (bool, error)

func (*STPDServiceHandler) DeleteStpPort

func (s *STPDServiceHandler) DeleteStpPort(config *stpd.StpPort) (rv bool, err error)

func (*STPDServiceHandler) GetBulkStpBridgeInstance

func (s *STPDServiceHandler) GetBulkStpBridgeInstance(fromIndex stpd.Int, count stpd.Int) (obj *stpd.StpBridgeInstanceGetInfo, err error)

func (*STPDServiceHandler) GetBulkStpBridgeInstanceState

func (s *STPDServiceHandler) GetBulkStpBridgeInstanceState(fromIndex stpd.Int, count stpd.Int) (obj *stpd.StpBridgeInstanceStateGetInfo, err error)

GetBulkStpBridgeInstanceState will return the status of all the stp bridges

func (*STPDServiceHandler) GetBulkStpPort

func (s *STPDServiceHandler) GetBulkStpPort(fromIndex stpd.Int, count stpd.Int) (obj *stpd.StpPortGetInfo, err error)

GetBulkStpPort used for Auto-Discovery

func (*STPDServiceHandler) GetBulkStpPortState

func (s *STPDServiceHandler) GetBulkStpPortState(fromIndex stpd.Int, count stpd.Int) (obj *stpd.StpPortStateGetInfo, err error)

GetBulkAggregationLacpMemberStateCounters will return the status of all the lag members.

func (*STPDServiceHandler) GetStpBridgeInstance

func (s *STPDServiceHandler) GetStpBridgeInstance(vlan int16) (*stpd.StpBridgeInstance, error)

UNUSED: Actual call from user should be getting info from CONFD directly as it will read the info from the DB

func (*STPDServiceHandler) GetStpBridgeInstanceState

func (s *STPDServiceHandler) GetStpBridgeInstanceState(vlan int16) (*stpd.StpBridgeInstanceState, error)

func (*STPDServiceHandler) GetStpPort

func (s *STPDServiceHandler) GetStpPort(vlan int32, intfRef string) (*stpd.StpPort, error)

UNUSED: Actual call from user should be getting info from CONFD directly as it will read the info from the DB

func (*STPDServiceHandler) GetStpPortState

func (s *STPDServiceHandler) GetStpPortState(vlan int32, intfRef string) (*stpd.StpPortState, error)

func (*STPDServiceHandler) HandleDbReadStpBridgeInstance

func (s *STPDServiceHandler) HandleDbReadStpBridgeInstance(dbHdl *dbutils.DBUtil, del bool) error

func (*STPDServiceHandler) HandleDbReadStpGlobal

func (s *STPDServiceHandler) HandleDbReadStpGlobal(dbHdl *dbutils.DBUtil) error

func (*STPDServiceHandler) HandleDbReadStpPort

func (s *STPDServiceHandler) HandleDbReadStpPort(dbHdl *dbutils.DBUtil) error

func (*STPDServiceHandler) ReadConfigFromDB

func (s *STPDServiceHandler) ReadConfigFromDB(prevState int) error

func (*STPDServiceHandler) UpdateStpBridgeInstance

func (s *STPDServiceHandler) UpdateStpBridgeInstance(origconfig *stpd.StpBridgeInstance, updateconfig *stpd.StpBridgeInstance, attrset []bool, op []*stpd.PatchOpInfo) (rv bool, err error)

func (*STPDServiceHandler) UpdateStpGlobal

func (s *STPDServiceHandler) UpdateStpGlobal(origconfig *stpd.StpGlobal, updateconfig *stpd.StpGlobal, attrset []bool, op []*stpd.PatchOpInfo) (rv bool, err error)

func (*STPDServiceHandler) UpdateStpPort

func (s *STPDServiceHandler) UpdateStpPort(origconfig *stpd.StpPort, updateconfig *stpd.StpPort, attrset []bool, op []*stpd.PatchOpInfo) (rv bool, err error)

Jump to

Keyboard shortcuts

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