ipmi

package
v0.0.0-...-b79a0d8 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package ipmi interacts with the platform BMC. User privileges can be checked, passwords changed, MACs retrieved, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() bool

func LogMacs

func LogMacs()

log ipmi macs

func Versions

func Versions() (ipmi, fru, sdr, me string)

Types

type Channel

type Channel struct {
	Id     int
	Medium string
	Users  IpmiUsers
}

func (*Channel) GetUsers

func (ch *Channel) GetUsers() error

func (Channel) IsLan

func (ch Channel) IsLan() bool

func (*Channel) Mac

func (ch *Channel) Mac() (mac string, err error)

type Channels

type Channels []*Channel

func GetChannels

func GetChannels() (chs Channels)

func (Channels) FirstLAN

func (chs Channels) FirstLAN() *Channel

type IpmiUser

type IpmiUser struct {
	Id                int64
	Name              string
	LinkAuth, IpmiMsg bool
	Privilege         string
	Enabled           bool
}

func (IpmiUser) GuessEnabled

func (u IpmiUser) GuessEnabled() bool

func (IpmiUser) HasAdminPriv

func (u IpmiUser) HasAdminPriv() bool

func (IpmiUser) IsEnabled

func (u IpmiUser) IsEnabled() bool

only works for user info from GetChannels()

func (*IpmiUser) SetName

func (u *IpmiUser) SetName(name string) (err error)

func (IpmiUser) SetPassword

func (u IpmiUser) SetPassword(pw string) (err error)

type IpmiUsers

type IpmiUsers []*IpmiUser

func ListUsers

func ListUsers() (users IpmiUsers)

List users.

WARNING: cannot tell whether a user is enabled
on a given channel - so don't use IsEnabled or
OnlyEnabled on returned list

func (IpmiUsers) OnlyEnabled

func (usrs IpmiUsers) OnlyEnabled() (enabled IpmiUsers)

filter out accounts that aren't enabled

func (IpmiUsers) OnlyNamed

func (usrs IpmiUsers) OnlyNamed() (named IpmiUsers)

filter out unnamed and null accounts

func (IpmiUsers) OnlyNamedAdmin

func (usrs IpmiUsers) OnlyNamedAdmin() (admins IpmiUsers)

filter out accounts except those named "ADMIN","admin","Administrator", etc

func (IpmiUsers) OnlyPrivileged

func (usrs IpmiUsers) OnlyPrivileged() (privileged IpmiUsers)

filter out accounts without admin privileges

Directories

Path Synopsis
Package uid allows control of the IPMI UID light (AKA Chassis ID light).
Package uid allows control of the IPMI UID light (AKA Chassis ID light).

Jump to

Keyboard shortcuts

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