assert

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCommand

func BuildCommand() *cli.Command

BuildCommand builds the 'assert' command

func CheckFlags

func CheckFlags(f *Flags) error

CheckFlags ensures that any required flags are provided and ensures they are well-formed.

func GetLogger

func GetLogger() *logrus.Logger

GetLogger returns the logger for the 'assert' command

func GetSelectedVGPUConfig

func GetSelectedVGPUConfig(f *Flags, spec *v1.Spec) (v1.VGPUConfigSpecSlice, error)

GetSelectedVGPUConfig gets the selected VGPUConfigSpecSlice from the config file

func ParseConfigFile

func ParseConfigFile(f *Flags) (*v1.Spec, error)

ParseConfigFile parses the vGPU device configuration file

func VGPUConfig

func VGPUConfig(c *Context) error

VGPUConfig asserts that the selected vGPU config is applied to the node

func WalkSelectedVGPUConfigForEachGPU

func WalkSelectedVGPUConfigForEachGPU(vgpuConfig v1.VGPUConfigSpecSlice, f func(*v1.VGPUConfigSpec, int, types.DeviceID) error) error

WalkSelectedVGPUConfigForEachGPU applies a function 'f' to the selected 'VGPUConfig' for each GPU on the node

Types

type Context

type Context struct {
	*cli.Context
	Flags      *Flags
	VGPUConfig v1.VGPUConfigSpecSlice
}

Context containing CLI flags and the selected VGPUConfig to assert

type Flags

type Flags struct {
	ConfigFile     string
	SelectedConfig string
	ValidConfig    bool
}

Flags for the 'assert' command

Jump to

Keyboard shortcuts

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