internal

package
v0.0.0-...-77b1342 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(level string) logr.Logger

NewLogger returns a logr.

func SupportedProtocols

func SupportedProtocols() []string

func SupportedProviders

func SupportedProviders() []string

TODO: get bmclib to return these

Types

type ConfigHardware

type ConfigHardware struct {
	Devices []struct {
		Name     string `json:"name"`
		Vendor   string `json:"vendor"`
		Model    string `json:"model"`
		BmcHost  string `json:"bmcHost" yaml:"bmcHost"` // yaml struct tags defined because the library requires it
		BmcUser  string `json:"bmcUser" yaml:"bmcUser"`
		BmcPass  string `json:"bmcPass" yaml:"bmcPass"`
		IpmiPort string `json:"ipmiPort" yaml:"ipmiPort"`
	} `json:"devices"`
}

type ConfigTests

type ConfigTests struct {
	Protocol string   `json:"protocol"`
	Provider string   `json:"provider"`
	Features []string `json:"features"`
}

type DeviceResult

type DeviceResult struct {
	Vendor  string
	Model   string
	Name    string
	BMCIP   string
	Results []Result
}

DeviceResult holds the test results for a given device

type Result

type Result struct {
	Feature            string
	Protocol           string
	ProvidersAttempted []string
	SuccessfulProvider string
	Output             string
	Error              string
	Succeeded          bool
	Runtime            string
}

Result is a single test result

type ResultStore

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

ResultStore stores test results

func NewTestResultStore

func NewTestResultStore() *ResultStore

func (*ResultStore) Read

func (r *ResultStore) Read() []DeviceResult

func (*ResultStore) Save

func (r *ResultStore) Save(result DeviceResult)

type Tester

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

Tester runs tests on a host, this struct holds config attributes for tester

func NewTester

func NewTester(bmcHost, bmcUser, bmcPass, bmcPort string, disableFilter bool, logLevel string) *Tester

NewTester returns a Tester instance with the parameters configured.

func (*Tester) Results

func (t *Tester) Results() []Result

func (*Tester) Run

func (t *Tester) Run(ctx context.Context, tests *ConfigTests)

Run runs all the given tests.

Jump to

Keyboard shortcuts

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