switchbrocade

package
v3.0.0-rc67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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