cli

package
v0.0.0-...-3711635 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Blue = "\033[34m"
View Source
var ErrWarn = errors.New("host preflights have warnings")

ErrWarn is the standard 'host preflights have warnings' error

View Source
var Green = "\033[32m"
View Source
var Red = "\033[31m"
View Source
var Reset = "\033[0m"
View Source
var Yellow = "\033[33m"

Functions

func AddCommands

func AddCommands(cmd *cobra.Command, cli CLI)

AddCommands adds version/host/objectstore/newformataddress commands to the cobra object

func NewClusterCheckFreeDiskSpaceCmd

func NewClusterCheckFreeDiskSpaceCmd(_ CLI) *cobra.Command

NewClusterCheckFreeDiskSpaceCmd returns a command that is capable of reporting back the amount of free space in the cluster for a provided storage class.

func NewClusterCmd

func NewClusterCmd(cli CLI) *cobra.Command

func NewClusterMigrateMultinodeStorageCmd

func NewClusterMigrateMultinodeStorageCmd(cli CLI) *cobra.Command

func NewClusterNodesMissingImageCmd

func NewClusterNodesMissingImageCmd(_ CLI) *cobra.Command

func NewHostpathToBlockCmd

func NewHostpathToBlockCmd(_ CLI) *cobra.Command

func NewKurlCmd

func NewKurlCmd(cli CLI) *cobra.Command

NewKurlCmd creates a CLI for the kURL custom Kubernetes distro creator

func NewLonghornCmd

func NewLonghornCmd(cli CLI) *cobra.Command

func NewLonghornPrepareForMigration

func NewLonghornPrepareForMigration(cli CLI) *cobra.Command

func NewLonghornRollbackMigrationReplicas

func NewLonghornRollbackMigrationReplicas(cli CLI) *cobra.Command

func NewRookCmd

func NewRookCmd(cli CLI) *cobra.Command

func NewRookFlexvolumeToCSI

func NewRookFlexvolumeToCSI(_ CLI) *cobra.Command

func NewRookHasSufficientBlockDevicesCmd

func NewRookHasSufficientBlockDevicesCmd(_ CLI) *cobra.Command

func NewRookHealthCmd

func NewRookHealthCmd(_ CLI) *cobra.Command

func NewRookWaitForCephVersionCmd

func NewRookWaitForCephVersionCmd(_ CLI) *cobra.Command

func NewRookWaitForHealthCmd

func NewRookWaitForHealthCmd(_ CLI) *cobra.Command

func NewRookWaitForRookVersionCmd

func NewRookWaitForRookVersionCmd(_ CLI) *cobra.Command

func OutputFailRed

func OutputFailRed() string

OutputFailRed return [Fail] to be outputted in red

func OutputInfoBlue

func OutputInfoBlue() string

OutputInfoBlue return [Info] to be outputted in blue

func OutputPassGreen

func OutputPassGreen() string

OutputPassGreen return [PASS] to be outputted in green

func OutputWarnYellow

func OutputWarnYellow() string

OutputWarnYellow return [Warn] to be outputted in yellow

Types

type CLI

type CLI interface {
	GetViper() *viper.Viper
	GetFS() afero.Fs
	GetReadline() *readline.Instance
	GetHostPreflightRunner() preflight.RunnerHost
	GetClusterPreflightRunner() preflight.RunnerCluster
	Stdout() io.Writer
	Stderr() io.Writer
	Logger() *log.Logger
	DebugLogger() *log.Logger
}

CLI contains the required methods for a kurl CLI

type ClusterReadyStatus

type ClusterReadyStatus struct {
	MigrationReadyStatus
	NrNodes         int `json:"nrNodes"`
	RequiredNrNodes int `json:"requiredNrNodes"`
}

ClusterReadyStatus represents the status of the cluster readiness check, namely whether the total number of nodes in the cluster exceed or meet the minimum required number of nodes for the migration to start.

type KurlCLI

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

KurlCLI is the real implementation of the kurl CLI

func NewKurlCLI

func NewKurlCLI() (*KurlCLI, error)

NewKurlCLI builds a real kurl CLI object

func (*KurlCLI) DebugLogger

func (cli *KurlCLI) DebugLogger() *log.Logger

DebugLogger returns the logger that should be used for debug level output. DebugLogger logs to stderr.

func (*KurlCLI) GetClusterPreflightRunner

func (cli *KurlCLI) GetClusterPreflightRunner() preflight.RunnerCluster

GetClusterPreflightRunner returns the runner for preflight checks

func (*KurlCLI) GetFS

func (cli *KurlCLI) GetFS() afero.Fs

GetFS returns the FS that should be used with this CLI

func (*KurlCLI) GetHostPreflightRunner

func (cli *KurlCLI) GetHostPreflightRunner() preflight.RunnerHost

GetHostPreflightRunner returns the runner for preflight checks

func (*KurlCLI) GetReadline

func (cli *KurlCLI) GetReadline() *readline.Instance

GetReadline returns readline, which is used for interacting with terminals

func (*KurlCLI) GetViper

func (cli *KurlCLI) GetViper() *viper.Viper

GetViper returns the global viper instance

func (*KurlCLI) Logger

func (cli *KurlCLI) Logger() *log.Logger

Logger returns the logger that should be used for standard log output. Logger logs to stderr.

func (*KurlCLI) SetStderr

func (cli *KurlCLI) SetStderr(w io.Writer)

SetStderr overrides the writer that writes to stderr

func (*KurlCLI) SetStdout

func (cli *KurlCLI) SetStdout(w io.Writer)

SetStdout overrides the writer that writes to stdout

func (*KurlCLI) Stderr

func (cli *KurlCLI) Stderr() io.Writer

Stderr returns the writer that writes to stderr unless it's been overridden

func (*KurlCLI) Stdout

func (cli *KurlCLI) Stdout() io.Writer

Stdout returns the writer that writes to stdout unless it's been overridden

type MigrationReadyStatus

type MigrationReadyStatus struct {
	Ready  bool   `json:"ready"`
	Reason string `json:"reason"`
}

MigrationReadyStatus represents the status of the migration readiness check, includes a reason, the total number of nodes in the cluster and the required number of nodes needed to start the migration.

Directories

Path Synopsis
Package mock_cli is a generated GoMock package.
Package mock_cli is a generated GoMock package.

Jump to

Keyboard shortcuts

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