Documentation ¶
Overview ¶
lahandler
Index ¶
- Constants
- func ConvertAddrToString(mac [6]uint8) string
- func ConvertBoolToInt32(val bool) int32
- func ConvertBridgeIdToString(bridgeid stp.BridgeId) string
- func ConvertInt32ToBool(val int32) bool
- func ConvertThriftBrgConfigToStpBrgConfig(config *stpd.StpBridgeInstance, brgconfig *stp.StpBridgeConfig)
- func ConvertThriftPortConfigToStpPortConfig(config *stpd.StpPort, portconfig *stp.StpPortConfig)
- func GetPortState(p *stp.StpPort) (state int32)
- func StartServer(logger *logging.Writer, handler *STPDServiceHandler, paramDir string)
- type ClientJson
- type STPDServiceHandler
- func (s *STPDServiceHandler) CreateStpBridgeInstance(config *stpd.StpBridgeInstance) (rv bool, err error)
- func (s *STPDServiceHandler) CreateStpGlobal(config *stpd.StpGlobal) (rv bool, err error)
- func (s *STPDServiceHandler) CreateStpPort(config *stpd.StpPort) (rv bool, err error)
- func (s *STPDServiceHandler) DeleteStpBridgeInstance(config *stpd.StpBridgeInstance) (rv bool, err error)
- func (s *STPDServiceHandler) DeleteStpGlobal(config *stpd.StpGlobal) (bool, error)
- func (s *STPDServiceHandler) DeleteStpPort(config *stpd.StpPort) (rv bool, err error)
- func (s *STPDServiceHandler) GetBulkStpBridgeInstance(fromIndex stpd.Int, count stpd.Int) (obj *stpd.StpBridgeInstanceGetInfo, err error)
- func (s *STPDServiceHandler) GetBulkStpBridgeInstanceState(fromIndex stpd.Int, count stpd.Int) (obj *stpd.StpBridgeInstanceStateGetInfo, err error)
- func (s *STPDServiceHandler) GetBulkStpPort(fromIndex stpd.Int, count stpd.Int) (obj *stpd.StpPortGetInfo, err error)
- func (s *STPDServiceHandler) GetBulkStpPortState(fromIndex stpd.Int, count stpd.Int) (obj *stpd.StpPortStateGetInfo, err error)
- func (s *STPDServiceHandler) GetStpBridgeInstance(vlan int16) (*stpd.StpBridgeInstance, error)
- func (s *STPDServiceHandler) GetStpBridgeInstanceState(vlan int16) (*stpd.StpBridgeInstanceState, error)
- func (s *STPDServiceHandler) GetStpPort(vlan int32, intfRef string) (*stpd.StpPort, error)
- func (s *STPDServiceHandler) GetStpPortState(vlan int32, intfRef string) (*stpd.StpPortState, error)
- func (s *STPDServiceHandler) HandleDbReadStpBridgeInstance(dbHdl *dbutils.DBUtil, del bool) error
- func (s *STPDServiceHandler) HandleDbReadStpGlobal(dbHdl *dbutils.DBUtil) error
- func (s *STPDServiceHandler) HandleDbReadStpPort(dbHdl *dbutils.DBUtil) error
- func (s *STPDServiceHandler) ReadConfigFromDB(prevState int) error
- func (s *STPDServiceHandler) UpdateStpBridgeInstance(origconfig *stpd.StpBridgeInstance, updateconfig *stpd.StpBridgeInstance, ...) (rv bool, err error)
- func (s *STPDServiceHandler) UpdateStpGlobal(origconfig *stpd.StpGlobal, updateconfig *stpd.StpGlobal, attrset []bool, ...) (rv bool, err error)
- func (s *STPDServiceHandler) UpdateStpPort(origconfig *stpd.StpPort, updateconfig *stpd.StpPort, attrset []bool, ...) (rv bool, err error)
Constants ¶
const DBName string = "UsrConfDb.db"
Variables ¶
This section is empty.
Functions ¶
func ConvertAddrToString ¶
func ConvertBoolToInt32 ¶
converts bool to yang true(1)/false(2)
func ConvertBridgeIdToString ¶
func ConvertInt32ToBool ¶
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 ¶
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 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 ¶
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)