bmc

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: GPL-3.0 Imports: 17 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug added in v0.0.10

func Debug(i ...interface{})

Debug output message of debug level

func Debugf added in v0.0.10

func Debugf(format string, args ...interface{})

Debugf output format message of debug level

func Debugj added in v0.0.10

func Debugj(j echolog.JSON)

Debugj output json of debug level

func Error added in v0.0.10

func Error(i ...interface{})

Error output message of error level

func Errorf added in v0.0.10

func Errorf(format string, args ...interface{})

Errorf output format message of error level

func Errorj added in v0.0.10

func Errorj(j echolog.JSON)

Errorj output json of error level

func Fatal added in v0.0.10

func Fatal(i ...interface{})

Fatal output message of fatal level

func Fatalf added in v0.0.10

func Fatalf(format string, args ...interface{})

Fatalf output format message of fatal level

func Fatalj added in v0.0.10

func Fatalj(j echolog.JSON)

Fatalj output json of fatal level

func Info added in v0.0.10

func Info(i ...interface{})

Info output message of info level

func Infof added in v0.0.10

func Infof(format string, args ...interface{})

Infof output format message of info level

func Infoj added in v0.0.10

func Infoj(j echolog.JSON)

Infoj output json of info level

func Panic added in v0.0.10

func Panic(i ...interface{})

Panic output message of panic level

func Panicf added in v0.0.10

func Panicf(format string, args ...interface{})

Panicf output format message of panic level

func Panicj added in v0.0.10

func Panicj(j echolog.JSON)

Panicj output json of panic level

func Print added in v0.0.10

func Print(i ...interface{})

Print output message of print level

func PrintStatusCli added in v0.0.10

func PrintStatusCli(output []JobMessage)

func Printf added in v0.0.10

func Printf(format string, i ...interface{})

Printf output format message of print level

func Printj added in v0.0.10

func Printj(j echolog.JSON)

Printj output json of print level

func Warn added in v0.0.10

func Warn(i ...interface{})

Warn output message of warn level

func Warnf added in v0.0.10

func Warnf(format string, args ...interface{})

Warnf output format message of warn level

func Warnj added in v0.0.10

func Warnj(j echolog.JSON)

Warnj output json of warn level

Types

type Job added in v0.0.10

type Job struct {
	// contains filtered or unexported fields
}

func NewJob added in v0.0.10

func NewJob() *Job

func (*Job) BmcAutoConfigure added in v0.0.10

func (j *Job) BmcAutoConfigure(hostList model.HostList) ([]JobMessage, error)

func (*Job) BmcImportConfiguration added in v0.0.10

func (j *Job) BmcImportConfiguration(hostList model.HostList, shutdownType, file string) ([]JobMessage, error)

func (*Job) BmcStatus added in v0.0.10

func (j *Job) BmcStatus(hostList model.HostList) ([]System, error)

func (*Job) ClearSel added in v0.0.10

func (j *Job) ClearSel(hostList model.HostList) ([]JobMessage, error)

func (*Job) PowerCycle added in v0.0.10

func (j *Job) PowerCycle(hostList model.HostList, bootOption string) ([]JobMessage, error)

func (*Job) PowerCycleBmc added in v0.0.10

func (j *Job) PowerCycleBmc(hostList model.HostList) ([]JobMessage, error)

func (*Job) PowerOff added in v0.0.10

func (j *Job) PowerOff(hostList model.HostList) ([]JobMessage, error)

func (*Job) PowerOn added in v0.0.10

func (j *Job) PowerOn(hostList model.HostList, bootOption string) ([]JobMessage, error)

type JobMessage added in v0.0.10

type JobMessage struct {
	Status       string
	Host         string
	Msg          string
	RedfishError RedfishError
}

func FormatOutput added in v0.0.10

func FormatOutput(output chan JobMessage) ([]JobMessage, error)

type MyLogger added in v0.0.10

type MyLogger struct {
	*logrus.Entry
}

MyLogger extend logrus.MyLogger

func EchoLogger added in v0.0.10

func EchoLogger() *MyLogger

Logger return singleton logger

func (*MyLogger) Debug added in v0.0.10

func (l *MyLogger) Debug(i ...interface{})

Debug output message of debug level

func (*MyLogger) Debugf added in v0.0.10

func (l *MyLogger) Debugf(format string, args ...interface{})

Debugf output format message of debug level

func (*MyLogger) Debugj added in v0.0.10

func (l *MyLogger) Debugj(j echolog.JSON)

Debugj output message of debug level

func (*MyLogger) Error added in v0.0.10

func (l *MyLogger) Error(i ...interface{})

Error output message of error level

func (*MyLogger) Errorf added in v0.0.10

func (l *MyLogger) Errorf(format string, args ...interface{})

Errorf output format message of error level

func (*MyLogger) Errorj added in v0.0.10

func (l *MyLogger) Errorj(j echolog.JSON)

Errorj output json of error level

func (*MyLogger) Fatal added in v0.0.10

func (l *MyLogger) Fatal(i ...interface{})

Fatal output message of fatal level

func (*MyLogger) Fatalf added in v0.0.10

func (l *MyLogger) Fatalf(format string, args ...interface{})

Fatalf output format message of fatal level

func (*MyLogger) Fatalj added in v0.0.10

func (l *MyLogger) Fatalj(j echolog.JSON)

Fatalj output json of fatal level

func (*MyLogger) Formatter added in v0.0.10

func (l *MyLogger) Formatter() logrus.Formatter

Formatter return logger formatter

func (*MyLogger) Info added in v0.0.10

func (l *MyLogger) Info(i ...interface{})

Info output message of info level

func (*MyLogger) Infof added in v0.0.10

func (l *MyLogger) Infof(format string, args ...interface{})

Infof output format message of info level

func (*MyLogger) Infoj added in v0.0.10

func (l *MyLogger) Infoj(j echolog.JSON)

Infoj output json of info level

func (*MyLogger) Level added in v0.0.10

func (l *MyLogger) Level() echolog.Lvl

Level return logger level

func (*MyLogger) Output added in v0.0.10

func (l *MyLogger) Output() io.Writer

Output return logger io.Writer

func (*MyLogger) Panic added in v0.0.10

func (l *MyLogger) Panic(i ...interface{})

Panic output message of panic level

func (*MyLogger) Panicf added in v0.0.10

func (l *MyLogger) Panicf(format string, args ...interface{})

Panicf output format message of panic level

func (*MyLogger) Panicj added in v0.0.10

func (l *MyLogger) Panicj(j echolog.JSON)

Panicj output json of panic level

func (*MyLogger) Prefix added in v0.0.10

func (l *MyLogger) Prefix() string

Prefix return logger prefix This function do nothing

func (*MyLogger) Print added in v0.0.10

func (l *MyLogger) Print(i ...interface{})

Print output message of print level

func (*MyLogger) Printf added in v0.0.10

func (l *MyLogger) Printf(format string, args ...interface{})

Printf output format message of print level

func (*MyLogger) Printj added in v0.0.10

func (l *MyLogger) Printj(j echolog.JSON)

Printj output json of print level

func (*MyLogger) SetFormatter added in v0.0.10

func (l *MyLogger) SetFormatter(formatter logrus.Formatter)

SetFormatter logger formatter Only support logrus formatter

func (*MyLogger) SetHeader added in v0.0.10

func (l *MyLogger) SetHeader(h string)

SetHeader logger header Managed by Logrus itself This function do nothing

func (*MyLogger) SetLevel added in v0.0.10

func (l *MyLogger) SetLevel(v echolog.Lvl)

SetLevel logger level

func (*MyLogger) SetOutput added in v0.0.10

func (l *MyLogger) SetOutput(w io.Writer)

SetOutput logger io.Writer

func (*MyLogger) SetPrefix added in v0.0.10

func (l *MyLogger) SetPrefix(p string)

SetPrefix logger prefix This function do nothing

func (*MyLogger) Warn added in v0.0.10

func (l *MyLogger) Warn(i ...interface{})

Warn output message of warn level

func (*MyLogger) Warnf added in v0.0.10

func (l *MyLogger) Warnf(format string, args ...interface{})

Warnf output format message of warn level

func (*MyLogger) Warnj added in v0.0.10

func (l *MyLogger) Warnj(j echolog.JSON)

Warnj output json of warn level

type Redfish

type Redfish struct {
	// contains filtered or unexported fields
}

func NewRedfishClient added in v0.0.10

func NewRedfishClient(ip, user, pass string, insecure bool) (*Redfish, error)

func (*Redfish) BmcAutoConfigure added in v0.0.10

func (r *Redfish) BmcAutoConfigure() error

func (*Redfish) BmcGetJob added in v0.0.10

func (r *Redfish) BmcGetJob(id string) (*redfish.Job, error)

func (*Redfish) BmcImportConfiguration added in v0.0.10

func (r *Redfish) BmcImportConfiguration(shutdownType, path, file string) (string, error)

func (*Redfish) ClearSel added in v0.0.10

func (r *Redfish) ClearSel() error

func (*Redfish) GetSystem

func (r *Redfish) GetSystem() (*System, error)

func (*Redfish) PowerControl added in v0.0.10

func (r *Redfish) PowerControl(resetType redfish.ResetType, bootOverride string) error

Power will change the hosts power state

func (*Redfish) PowerCycle

func (r *Redfish) PowerCycle(bootOverride string) error

PowerCycle will ForceRestart the host

func (*Redfish) PowerCycleBmc added in v0.0.10

func (r *Redfish) PowerCycleBmc() error

func (*Redfish) PowerOff added in v0.0.6

func (r *Redfish) PowerOff() error

PowerOff will ForceOff the host

func (*Redfish) PowerOn added in v0.0.6

func (r *Redfish) PowerOn(bootOverride string) error

PowerOn will ForceOn the host

type RedfishError added in v0.0.10

type RedfishError struct {
	Code  string
	Error struct {
		MessageExtendedInfo []struct {
			Message                string
			MessageArgs            []string //?
			MessageArgsCount       int      `json:"MessageArgs.@odata.count"`
			MessageId              string
			RelatedProperties      []string //?
			RelatedPropertiesCount int      `json:"RelatedProperties.@odata.count"`
			Resolution             string
			Severity               string
		} `json:"@Message.ExtendedInfo"`
		Code    string `json:"code"`
		Message string `json:"message"`
	} `json:"error"`
}

func ParseRedfishError added in v0.0.10

func ParseRedfishError(err error) RedfishError

type System

type System struct {
	Name           string   `json:"name"`
	HostName       string   `json:"host_name"`
	BIOSVersion    string   `json:"bios_version"`
	SerialNumber   string   `json:"serial_number"`
	Manufacturer   string   `json:"manufacturer"`
	Model          string   `json:"model"`
	PowerStatus    string   `json:"power_status"`
	Health         string   `json:"health"`
	TotalMemory    float32  `json:"total_memory"`
	ProcessorCount int      `json:"processor_count"`
	BootNext       string   `json:"boot_next"`
	BootOrder      []string `json:"boot_order"`
}

Jump to

Keyboard shortcuts

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