sonic

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SonicVersionFile = "/etc/sonic/sonic_version.yml"
)

Variables

This section is empty.

Functions

func NewFrrApplier

func NewFrrApplier(tplPath string) *templates.Applier

Types

type PortInfo

type PortInfo struct {
	Alias string `json:"alias"`
}

type Sonic

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

func New

func New(log *slog.Logger, frrTplFile string) (*Sonic, error)

func (*Sonic) Apply

func (s *Sonic) Apply(cfg *types.Conf) error

func (*Sonic) GetManagement

func (s *Sonic) GetManagement() (ip, user string, err error)

func (*Sonic) GetNics

func (s *Sonic) GetNics(log *slog.Logger, blacklist []string) (nics []*models.V1SwitchNic, err error)

func (*Sonic) GetOS

func (s *Sonic) GetOS() (*models.V1SwitchOS, error)

func (*Sonic) GetSwitchPorts

func (s *Sonic) GetSwitchPorts() ([]*net.Interface, error)

func (*Sonic) IsInitialized

func (s *Sonic) IsInitialized() (initialized bool, err error)

func (*Sonic) SanitizeConfig

func (s *Sonic) SanitizeConfig(cfg *types.Conf)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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