shivas

package
v0.0.0-...-d996d1d Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Asset     string
	Rack      string
	Zone      string
	Model     string
	Board     string
	Namespace string
	Type      string
}

Asset is a group of parameters needed to add an asset to UFS.

func (*Asset) CheckAndAdd

func (a *Asset) CheckAndAdd(ctx context.Context, executor executor.IExecCommander, w io.Writer) (bool, error)

CheckAndAdd adds the asset if it does not already exist.

type DUT

type DUT struct {
	// TODO(gregorynisbet): remove the namespace field.
	Namespace  string
	Zone       string
	Name       string
	Servo      string
	Rack       string
	ShivasArgs map[string][]string
}

DUT contains all the information necessary to add a DUT.

func (*DUT) CheckAndAdd

func (d *DUT) CheckAndAdd(ctx context.Context, executor executor.IExecCommander, w io.Writer) (bool, error)

CheckAndAdd adds a DUT if it does not already exist.

type DUTRepairResponse

type DUTRepairResponse struct {
	BuildLink string
	TaskLink  string
}

type DUTRepairer

type DUTRepairer struct {
	Name      string
	Namespace string
	Executor  executor.IExecCommander
}

DUTRepairer repairs a DUT with the given name.

func (*DUTRepairer) Repair

func (u *DUTRepairer) Repair(
	ctx context.Context,
	action RepairAction,
) (*DUTRepairResponse, error)

repair invokes shivas with the required arguments to repair a DUT.

type DUTUpdater

type DUTUpdater struct {
	// Name is a hostname indicate which DUT we want to update
	Name string
	// Executor is a command execuotr
	Executor executor.IExecCommander
}

DUTUpdater updates a DUT with the given name.

func (*DUTUpdater) Update

func (u *DUTUpdater) Update(ctx context.Context, args map[string][]string) error

Update invokes shivas with the required arguments to update information about a DUT.

type Rack

type Rack struct {
	Name      string
	Namespace string
	Zone      string
}

Rack is a group of arguments for adding a rack.

func (*Rack) CheckAndAdd

func (r *Rack) CheckAndAdd(ctx context.Context, executor executor.IExecCommander, w io.Writer) (bool, error)

CheckAndAdd runs check and then update if the item does not exist.

type RepairAction

type RepairAction string
const (
	// Verify run only verify actions.
	Verify RepairAction = "-verify"
	// DeepRepair use deep-repair task when scheduling a task.
	DeepRepair RepairAction = "-deep"
	// Normal don't specify `verify` and `deep` flag to shivas CLI
	Normal RepairAction = ""
)

Jump to

Keyboard shortcuts

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