testinstance

package
v0.0.0-...-1182063 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CPUDefault = "4"
View Source
const MemoryDefault = "16Gi"

Variables

This section is empty.

Functions

func AddClusterNode

func AddClusterNode(instanceId string, id string, nodeType string, status string) error

func AddNodeJoinCommand

func AddNodeJoinCommand(id string, primaryJoin string, secondaryJoin string) error

func AddNodeUpgradeCommand

func AddNodeUpgradeCommand(id string, nodeName string, command string) error

func Create

func Create(id, testID, testName string, priority int, refID, kurlYAML, kurlURL, kurlFlags, upgradeYAML, upgradeURL, supportbundleYAML, preInstallScript, postInstallScript, postUpgradeScript, osName, osVersion, osImage, osPreInit string, numPrimaryNode int, numSecondaryNode int, memory string, cpu string) error

func GetInstanceDuration

func GetInstanceDuration(id string) (time.Duration, error)

func GetLogs

func GetLogs(id string) (string, error)

func GetNextEnqueued

func GetNextEnqueued(refID string) (*types.TestInstance, error)

func GetNodeJoinCommand

func GetNodeJoinCommand(id string) (string, string, error)

func GetNodeLogs

func GetNodeLogs(id string) (string, error)

func GetNodeStatus

func GetNodeStatus(id string) (string, error)

func GetNodeUpgradeCommand

func GetNodeUpgradeCommand(id, nodeName string) (string, error)

func GetRunStatus

func GetRunStatus(id string) (bool, error)

func GetSonobuoyResults

func GetSonobuoyResults(id string) (string, error)

func GetTestStats

func GetTestStats() (int64, int64, int64, error)

GetTestStats returns the current numbers of pending, running, and timed out tests

func GetUniqueAddons

func GetUniqueAddons(refID string) ([]string, error)

func Healthz

func Healthz() error

func List

func List(refID string, limit int, offset int, addons map[string]string) ([]types.TestInstance, error)

List returns a list of test instances. Note: pagination (limit and offset) are applied to instances with distinct kurl URLs (instances with same kurl URL count as 1)

func NodeLogs

func NodeLogs(id string, logs string) error

func Running

func Running(id string) error

func SetInstanceFinishedAndSuccess

func SetInstanceFinishedAndSuccess(id string, isSuccess bool, failureReason string) error

SetInstanceFinishedAndSuccess sets is_success, failure_reason and finished_at.

func SetInstanceLogs

func SetInstanceLogs(id string, logs []byte) error

func SetInstanceSonobuoyResults

func SetInstanceSonobuoyResults(id string, results []byte) error

func SetInstanceUnsupported

func SetInstanceUnsupported(id string) error

func SkipEnqueuedByRef

func SkipEnqueuedByRef(refID string) error

func Start

func Start(id string) error

func Total

func Total(refID string, addons map[string]string) (int, error)

func UpdateNodeStatus

func UpdateNodeStatus(id string, status string) error

Types

type KurlInstaller

type KurlInstaller struct {
	APIVersion string                 `json:"apiVersion" yaml:"apiVersion"`
	Kind       string                 `json:"kind" yaml:"kind"`
	Metadata   KurlInstallerMetadata  `json:"metadata" yaml:"metadata"`
	Spec       map[string]interface{} `json:"spec" yaml:"spec"`
}

type KurlInstallerMetadata

type KurlInstallerMetadata struct {
	Name string `json:"name" yaml:"name"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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