nvos

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 5 Imported by: ? 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

Index

Constants

View Source
const DefaultNVOSPort = 22

DefaultNVOSPort is the default SSH port.

Variables

This section is empty.

Functions

This section is empty.

Types

type NVOS

type NVOS struct {
	MAC        net.HardwareAddr       `json:"mac"`
	IP         net.IP                 `json:"ip"`
	Port       int                    `json:"port"` // Custom port (0 = default 22)
	Credential *credential.Credential `json:"credential"`
}

NVOS represents the NV-Switch Operating System subsystem of an NV-Switch tray. It has its own MAC address, IP address, port, and credentials for SSH access.

func New

func New(mac string, ip string, cred *credential.Credential) (*NVOS, error)

New creates a new NVOS instance by parsing MAC and IP from strings.

func NewFromAddr

func NewFromAddr(mac net.HardwareAddr, ip net.IP, cred *credential.Credential) (*NVOS, error)

NewFromAddr creates a new NVOS instance from native net types.

func (*NVOS) GetCredential

func (n *NVOS) GetCredential() *credential.Credential

GetCredential returns the NVOS credential or nil.

func (*NVOS) GetIP

func (n *NVOS) GetIP() net.IP

GetIP returns the NVOS IP address.

func (*NVOS) GetMAC

func (n *NVOS) GetMAC() net.HardwareAddr

GetMAC returns the NVOS MAC address.

func (*NVOS) GetPort

func (n *NVOS) GetPort() int

GetPort returns the effective port (custom or default 22).

func (*NVOS) SetCredential

func (n *NVOS) SetCredential(cred *credential.Credential)

SetCredential sets the NVOS credential.

func (*NVOS) SetIP

func (n *NVOS) SetIP(ip string) error

SetIP sets the NVOS IP address.

func (*NVOS) SetPort

func (n *NVOS) SetPort(port int)

SetPort sets a custom port for NVOS access.

Jump to

Keyboard shortcuts

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