switchbrocade

package
v3.0.0-rc49 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package switchbrocade reads the configuration of a brocade SAN switch, for the collector to index its ports, zones and aliases.

It is the port of the v2 brocade sanswitch driver: it runs switchshow, nsshow and zoneshow on the switch, and reports their outputs as they are, the collector parsing them. It logs in over ssh, with a key or with a password held in a secret. The telnet method v2 offered is refused: the switches have telnet off by default, and it sends the password in clear.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Commands are the switch commands the configuration is read from, in
	// the order they run, named as the collector expects them.
	Commands = []string{"switchshow", "nsshow", "zoneshow"}
)

Functions

func NewDriver

func NewDriver() sanswitch.Driver

Types

type T

type T struct {
	sanswitch.Switch
}

T is a brocade switch, declared by a "switch#<name>" section of type brocade.

func (*T) Report

func (t *T) Report(ctx context.Context) (map[string]string, error)

Report runs the switch commands and returns their outputs, by command.

func (*T) ReportName

func (t *T) ReportName() string

ReportName is the name the switch is reached by, without its port, which the collector knows it by, as v2 reported it.

Jump to

Keyboard shortcuts

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