api

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestAccepted = "API request accepted"
	OLTNotEnabled   = "OLT not enabled"
	RequestFailed   = "API request failed"
	SoftReboot      = "soft-reboot"
	HardReboot      = "hard-reboot"
	DeviceTypeOlt   = "olt"
	DeviceTypeOnu   = "onu"
)

Response Constants

View Source
const (
	OltRebootDelay     = 40
	OnuSoftRebootDelay = 10
	OnuHardRebootDelay = 30
)

Constants for reboot delays

Variables

This section is empty.

Functions

func ConvB2S added in v0.0.5

func ConvB2S(b []byte) string

ConvB2S converts byte array to string

func StartRestGatewayService added in v0.0.5

func StartRestGatewayService(channel chan bool, group *sync.WaitGroup, grpcAddress string, hostandport string)

StartRestGatewayService method starts REST server for BBSim.

Types

type BBSimLegacyServer added in v0.0.5

type BBSimLegacyServer struct {
}

func (BBSimLegacyServer) GenerateOLTAlarm added in v0.0.5

GenerateOLTAlarm RPC generates alarm for the OLT

func (BBSimLegacyServer) GenerateONUAlarm added in v0.0.5

GenerateONUAlarm RPC generates alarm for the onu

func (BBSimLegacyServer) GetFlows added in v0.0.5

func (s BBSimLegacyServer) GetFlows(ctx context.Context, in *legacy.ONUInfo) (*legacy.Flows, error)

GetFlows returns all flows or flows for specified ONU

func (BBSimLegacyServer) OLTStatus added in v0.0.5

OLTStatus method returns the OLT status.

func (BBSimLegacyServer) ONUActivate added in v0.0.5

ONUActivate method handles ONU activate requests from user.

func (BBSimLegacyServer) ONUDeactivate added in v0.0.5

ONUDeactivate method handles ONU deactivation request.

func (BBSimLegacyServer) ONUStatus added in v0.0.5

func (s BBSimLegacyServer) ONUStatus(ctx context.Context, in *legacy.ONURequest) (*legacy.ONUs, error)

ONUStatus method returns ONU status.

func (BBSimLegacyServer) PerformDeviceAction added in v0.0.5

func (s BBSimLegacyServer) PerformDeviceAction(ctx context.Context, in *legacy.DeviceAction) (*legacy.BBSimResponse, error)

PerformDeviceAction rpc take the device request and performs OLT and ONU hard and soft reboot

func (BBSimLegacyServer) PortStatus added in v0.0.5

func (s BBSimLegacyServer) PortStatus(ctx context.Context, in *legacy.PortInfo) (*legacy.Ports, error)

PortStatus method returns Port status.

type BBSimServer

type BBSimServer struct {
}

func (BBSimServer) GetONU

func (s BBSimServer) GetONU(ctx context.Context, req *bbsim.ONURequest) (*bbsim.ONU, error)

func (BBSimServer) GetONUs

func (s BBSimServer) GetONUs(ctx context.Context, req *bbsim.Empty) (*bbsim.ONUs, error)

func (BBSimServer) GetOlt

func (s BBSimServer) GetOlt(ctx context.Context, req *bbsim.Empty) (*bbsim.Olt, error)

func (BBSimServer) PoweronONU

func (s BBSimServer) PoweronONU(ctx context.Context, req *bbsim.ONURequest) (*bbsim.Response, error)

func (BBSimServer) PoweronOlt added in v0.0.7

func (s BBSimServer) PoweronOlt(ctx context.Context, req *bbsim.Empty) (*bbsim.Response, error)

func (BBSimServer) RebootOlt added in v0.0.7

func (s BBSimServer) RebootOlt(ctx context.Context, req *bbsim.Empty) (*bbsim.Response, error)

func (BBSimServer) RestartDhcp added in v0.0.5

func (s BBSimServer) RestartDhcp(ctx context.Context, req *bbsim.ONURequest) (*bbsim.Response, error)

func (BBSimServer) RestartEapol added in v0.0.5

func (s BBSimServer) RestartEapol(ctx context.Context, req *bbsim.ONURequest) (*bbsim.Response, error)

func (BBSimServer) SetAlarmIndication added in v0.0.12

func (s BBSimServer) SetAlarmIndication(ctx context.Context, req *bbsim.AlarmRequest) (*bbsim.Response, error)

func (BBSimServer) SetLogLevel

func (s BBSimServer) SetLogLevel(ctx context.Context, req *bbsim.LogLevel) (*bbsim.LogLevel, error)

func (BBSimServer) ShutdownONU

func (s BBSimServer) ShutdownONU(ctx context.Context, req *bbsim.ONURequest) (*bbsim.Response, error)

func (BBSimServer) ShutdownOlt added in v0.0.7

func (s BBSimServer) ShutdownOlt(ctx context.Context, req *bbsim.Empty) (*bbsim.Response, error)

func (BBSimServer) Version

func (s BBSimServer) Version(ctx context.Context, req *bbsim.Empty) (*bbsim.VersionNumber, error)

Jump to

Keyboard shortcuts

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