commands

package
v0.0.0-...-e0344fa Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(fs *pflag.FlagSet, cmd *cobra.Command, specs []FlagSpec) error

func Command

func Command() *cobra.Command

func Get

func Get() *cobra.Command

func GetDeviceInfo

func GetDeviceInfo(printer client.PrintRenderer) *cobra.Command

func GetInterface

func GetInterface(printer client.PrintRenderer) *cobra.Command

func GetInterfaceNeighbor

func GetInterfaceNeighbor(printer client.PrintRenderer) *cobra.Command

func GetSharedSwitchAgentClient

func GetSharedSwitchAgentClient() client.SwitchAgentClient

func Gnoi

func Gnoi() *cobra.Command

func List

func List() *cobra.Command

func ListInterfaces

func ListInterfaces(printer client.PrintRenderer) *cobra.Command

func ListPorts

func ListPorts(printer client.PrintRenderer) *cobra.Command

func RunGetDeviceInfo

func RunGetDeviceInfo(
	ctx context.Context,
	c client.SwitchAgentClient,
	printer client.PrintRenderer,
) error

func RunGetInterface

func RunGetInterface(
	ctx context.Context,
	c client.SwitchAgentClient,
	printer client.PrintRenderer,
	interfaceName string,
) error

func RunGetInterfaceNeighbors

func RunGetInterfaceNeighbors(
	ctx context.Context,
	c client.SwitchAgentClient,
	printer client.PrintRenderer,
	interfaceName string,
) error

func RunListInterfaces

func RunListInterfaces(
	ctx context.Context,
	c client.SwitchAgentClient,
	printer client.PrintRenderer,
) error

func RunListPorts

func RunListPorts(
	ctx context.Context,
	c client.SwitchAgentClient,
	printer client.PrintRenderer,
) error

func RunSaveConfig

func RunSaveConfig(
	ctx context.Context,
	c client.SwitchAgentClient,
) error

func SaveConfig

func SaveConfig() *cobra.Command

func Set

func Set() *cobra.Command

func SetInterfaceStatus

func SetInterfaceStatus(printer client.PrintRenderer) *cobra.Command

func SubcommandRequired

func SubcommandRequired(cmd *cobra.Command, args []string) error

Types

type FlagSpec

type FlagSpec struct {
	Name     string
	Usage    string
	Required bool
	BindFunc func(fs *pflag.FlagSet)
}

type SetInterfaceStatusOptions

type SetInterfaceStatusOptions struct {
	InterfaceName string
	AdminStatus   string
}

Jump to

Keyboard shortcuts

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