leases

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DATE_FORMAT = "2006/01/02 15:04:05"
View Source
const LEASE_REGEX = `` /* 159-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Lease

type Lease struct {
	Mac   string
	Ip    string
	Begin time.Time
	End   time.Time
}

type Leases

type Leases []Lease

func Parse

func Parse(contents string) (Leases, error)

func ReadLeases

func ReadLeases(leaseFile string) (Leases, error)

func (Leases) FilterActive

func (l Leases) FilterActive() Leases

func (Leases) LatestByMac

func (l Leases) LatestByMac() map[string]Lease

type ReportItem

type ReportItem struct {
	Lease
	Log          *zap.SugaredLogger
	UUID         *string
	BmcVersion   *string
	BiosVersion  *string
	FRU          *models.V1MachineFru
	Powerstate   *string
	IndicatorLED *string
	PowerMetric  *models.V1PowerMetric
}

func NewReportItem

func NewReportItem(l Lease, log *zap.SugaredLogger) *ReportItem

func (*ReportItem) EnrichWithBMCDetails

func (i *ReportItem) EnrichWithBMCDetails(ipmiPort int, ipmiUser, ipmiPassword string)

func (*ReportItem) MacContainedIn

func (i *ReportItem) MacContainedIn(macs []string) bool

Jump to

Keyboard shortcuts

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