fakedevice

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNetworkInstance = "DEFAULT"
	StaticRoutingProtocol  = "DEFAULT"
	BGPRoutingProtocol     = "BGP"
)

Variables

This section is empty.

Functions

func KillProcess added in v0.7.0

func KillProcess(ctx context.Context, c *ygnmi.Client, pid uint32, processName string, signal spb.KillProcessRequest_Signal, restart bool, cfg *configpb.Config) error

KillProcess simulates process termination and restart functionality

func NewBootTimeTask

func NewBootTimeTask(cfg *configpb.Config) *reconciler.BuiltReconciler

NewBootTimeTask initializes boot-related paths.

func NewChassisComponentsTask added in v0.6.0

func NewChassisComponentsTask(cfg *configpb.Config) *reconciler.BuiltReconciler

NewChassisComponentsTask initializes subcomponents for the chassis

func NewCurrentTimeTask

func NewCurrentTimeTask() *reconciler.BuiltReconciler

NewCurrentTimeTask initializes boot-related paths.

func NewInterfaceInitializationTask added in v0.7.0

func NewInterfaceInitializationTask(cfg *configpb.Config) *reconciler.BuiltReconciler

NewInterfaceInitializationTask initializes base network interfaces for link qualification simulation.

func NewProcessMonitoringTask added in v0.7.0

func NewProcessMonitoringTask(cfg *configpb.Config) *reconciler.BuiltReconciler

NewProcessMonitoringTask initializes system processes for monitoring.

func NewSystemBaseTask

func NewSystemBaseTask() *reconciler.BuiltReconciler

NewSystemBaseTask handles some of the logic for the base systems feature profile using ygnmi as the client.

func PingSimulation added in v0.7.0

func PingSimulation(ctx context.Context, destination string, count int32, interval time.Duration, wait time.Duration, size uint32, responseChan chan<- *PingPacketResult, cfg *configpb.Config) error

PingSimulation simulates ping operation with configurable network conditions

func Reboot added in v0.4.0

func Reboot(ctx context.Context, c *ygnmi.Client, rebootTime int64) error

Reboot updates the system boot time to the provided Unix time.

func RebootComponent added in v0.6.0

func RebootComponent(ctx context.Context, c *ygnmi.Client, componentName string, rebootTime int64, cfg *configpb.Config) error

RebootComponent updates the component's last reboot time and reason.

func RunPacketLinkQualification added in v0.7.0

func RunPacketLinkQualification(ctx context.Context, c *ygnmi.Client, config *plqpb.QualificationConfiguration, updateCallback func(*LinkQualificationResult), cfg *configpb.Config) error

RunPacketLinkQualification performs a complete packet-based link qualification simulation.

func SwitchoverSupervisor added in v0.6.0

func SwitchoverSupervisor(ctx context.Context, c *ygnmi.Client, targetSupervisor string, currentActiveSupervisor string, switchoverTime int64, cfg *configpb.Config) error

SwitchoverSupervisor performs supervisor switchover by swapping the redundant roles and updating related state

Types

type LinkQualificationResult added in v0.7.0

type LinkQualificationResult struct {
	State           plqpb.QualificationState
	PacketsSent     uint64
	PacketsReceived uint64
	PacketsDropped  uint64
	PacketsError    uint64
	StartTime       time.Time
	EndTime         time.Time
	// contains filtered or unexported fields
}

LinkQualificationResult represents the complete state of a link qualification operation.

type PacketConfiguration added in v0.7.0

type PacketConfiguration struct {
	PacketRate  uint64
	PacketSize  uint64
	IsGenerator bool
	IsReflector bool
}

PacketConfiguration holds extracted packet generation parameters.

type PingPacketResult added in v0.7.0

type PingPacketResult struct {
	Sequence int32
	RTT      time.Duration
	Bytes    uint32
	TTL      int32
	Success  bool
}

PingPacketResult represents the result of a single ping packet

type QualificationTiming added in v0.7.0

type QualificationTiming struct {
	SetupDuration    time.Duration
	TestDuration     time.Duration
	TeardownDuration time.Duration
	PreSyncDelay     time.Duration
	PostSyncDelay    time.Duration
}

QualificationTiming holds all timing parameters for a qualification.

Jump to

Keyboard shortcuts

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