api

package
Version: v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 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) ChangeIgmpState added in v0.0.15

func (s BBSimServer) ChangeIgmpState(ctx context.Context, req *bbsim.IgmpRequest) (*bbsim.Response, error)

func (BBSimServer) GetFlows added in v0.0.18

func (s BBSimServer) GetFlows(ctx context.Context, req *bbsim.ONURequest) (*bbsim.Flows, error)

GetFlows for OLT/ONUs

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) GetOltAllocatedResources added in v1.5.2

func (s BBSimServer) GetOltAllocatedResources(ctx context.Context, req *bbsim.OltAllocatedResourceType) (*bbsim.OltAllocatedResources, error)

func (BBSimServer) GetOnuTrafficSchedulers added in v0.0.18

func (s BBSimServer) GetOnuTrafficSchedulers(ctx context.Context, req *bbsim.ONURequest) (*bbsim.ONUTrafficSchedulers, error)

func (BBSimServer) GetOnuUnis added in v1.8.0

func (s BBSimServer) GetOnuUnis(ctx context.Context, req *bbsim.ONURequest) (*bbsim.UNIs, error)

func (BBSimServer) GetServices added in v1.0.0

func (s BBSimServer) GetServices(ctx context.Context, req *bbsim.Empty) (*bbsim.Services, error)

func (BBSimServer) PoweronAllONUs added in v0.0.19

func (s BBSimServer) PoweronAllONUs(context.Context, *bbsim.Empty) (*bbsim.Response, error)

PoweronAllONUs simulates ONU power on for all ONUs on all PON ports

func (BBSimServer) PoweronONU

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

PoweronONU simulates ONU power on and start sending discovery indications to VOLTHA

func (BBSimServer) PoweronONUsOnPON added in v0.0.19

func (s BBSimServer) PoweronONUsOnPON(ctx context.Context, req *bbsim.PONRequest) (*bbsim.Response, error)

PoweronONUsOnPON simulates ONU power on for all ONUs under specified PON port

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) RestartgRPCServer added in v1.4.1

func (s BBSimServer) RestartgRPCServer(ctx context.Context, req *bbsim.Timeout) (*bbsim.Response, error)

func (BBSimServer) SetLogLevel

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

func (BBSimServer) SetOltAlarmIndication added in v0.0.18

func (s BBSimServer) SetOltAlarmIndication(ctx context.Context, req *bbsim.OLTAlarmRequest) (*bbsim.Response, error)

SetOltAlarmIndication generates OLT Alarms for LOS

func (BBSimServer) SetOnuAlarmIndication added in v0.0.18

func (s BBSimServer) SetOnuAlarmIndication(ctx context.Context, req *bbsim.ONUAlarmRequest) (*bbsim.Response, error)

func (BBSimServer) ShutdownAllONUs added in v0.0.19

func (s BBSimServer) ShutdownAllONUs(context.Context, *bbsim.Empty) (*bbsim.Response, error)

ShutdownAllONUs sends DyingGasp indication for all ONUs and mark ONUs as disabled.

func (BBSimServer) ShutdownONU

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

ShutdownONU sends DyingGasp indication for specified ONUs and mark ONUs as disabled.

func (BBSimServer) ShutdownONUsOnPON added in v0.0.19

func (s BBSimServer) ShutdownONUsOnPON(ctx context.Context, req *bbsim.PONRequest) (*bbsim.Response, error)

ShutdownONUsOnPON sends DyingGasp indication for all ONUs under specified PON port

func (BBSimServer) ShutdownOlt added in v0.0.7

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

func (BBSimServer) StartgRPCServer added in v1.4.1

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

func (BBSimServer) StopgRPCServer added in v1.4.1

func (s BBSimServer) StopgRPCServer(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