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) SetCredential ¶
func (n *NVOS) SetCredential(cred *credential.Credential)
SetCredential sets the NVOS credential.
Click to show internal directories.
Click to hide internal directories.