idrac

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.3.1"

Variables

View Source
var (
	// success
	RcOK = ReturnCode("0x0")

	// idrac6
	RcIdrac6InvalidUserPassword = ReturnCode("0x10")

	// idrac7
	RcIdrac7InvalidUserPassword = ReturnCode("0x140004")
)

known RC meanings

Functions

func NewIdrac

func NewIdrac(hostname, username, password string, strictCerts bool) (*idrac, error)

NewIdrac creates an Idrac and client to access it

Types

type DiscoverResponse

type DiscoverResponse struct {
	XMLName  xml.Name `xml:"DISCOVER"`
	Response struct {
		XMLName         xml.Name `xml:"RESP"`
		ReturnCode      string   `xml:"RC"`
		EndpointType    string   `xml:"ENDPOINTTYPE"`
		EndpointVersion string   `xml:"ENDPOINTVER"`
		ProtocolType    string   `xml:"PROTOCOLTYPE"`
		ProtocolVersion string   `xml:"PROTOCOLVER"`
	}
}

type LoginResponse

type LoginResponse struct {
	XMLName  xml.Name `xml:"LOGIN"`
	Response struct {
		XMLName           xml.Name   `xml:"RESP"`
		ReturnCode        ReturnCode `xml:"RC"`
		SessionID         string     `xml:"SID"`
		State             string     `xml:"STATE"`
		StateName         string     `xml:"STATENAME"`
		DefaultCredential string     `xml:"DEFCRED"`
	}
}

type LogoutResponse

type LogoutResponse struct {
	XMLName  xml.Name `xml:"LOGOUT"`
	Response struct {
		XMLName    xml.Name   `xml:"RESP"`
		ReturnCode ReturnCode `xml:"RC"`
		SessionID  string     `xml:"SID"`
	}
}

type ReturnCode

type ReturnCode string

ReturnCode is a special string represening "RC" as returned in an idrac's XML response.

func (ReturnCode) Error

func (rc ReturnCode) Error() string

Error() implements the error interface by returning the error code and any known meaning.

Jump to

Keyboard shortcuts

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