object

package
v0.54.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Replica   = "replica"
	Iteration = "iteration"
	UUID      = "uuid"
	Namespace = "namespace"
)
View Source
const (
	VMIResource           = "virtualmachineinstances"
	VMResource            = "virtualmachines"
	VMIReplicaSetResource = "virtualmachineinstancereplicasets"
)

Variables

This section is empty.

Functions

func CleanupNamespaces

func CleanupNamespaces(virtCli kubecli.KubevirtClient, timeout time.Duration, listOpts *metav1.ListOptions) error

CleanupNamespaces deletes a collection of namespaces with the given selector

func CreateNamespace

func CreateNamespace(virtCli kubecli.KubevirtClient, name, scenarioLabel, uuid string) error

func DeleteAllObjectsInNamespaces

func DeleteAllObjectsInNamespaces(virtCli kubecli.KubevirtClient, resourceKind string, listOpts *metav1.ListOptions)

DeleteAllObjectsInNamespaces deletes a collection of objects in a set of namespace with a given selector

func DeleteObject added in v0.53.0

func DeleteObject(virtCli kubecli.KubevirtClient, obj unstructured.Unstructured, resourceKind string, gracePeriod int64)

func FindObject added in v0.53.0

func FindObject(virtCli kubecli.KubevirtClient, obj *config.ObjectSpec, count int) (*unstructured.Unstructured, string)

func GenerateObjectTemplateData

func GenerateObjectTemplateData(obj *config.ObjectSpec, replica int) map[string]interface{}

func GetObjectResource

func GetObjectResource(obj *unstructured.Unstructured) string

GetObjectResource returns the resource type of an object The kubevirt API understand the resource type as plural

func ListObjects added in v0.53.0

func ListObjects(virtCli kubecli.KubevirtClient, resourceKind string, listOpts *metav1.ListOptions, namespace string) (*unstructured.UnstructuredList, error)

func RenderObject added in v0.53.0

func RenderObject(templateData map[string]interface{}, objectSpec []byte) (*unstructured.Unstructured, error)

RenderObject creates a Kubernetes Unstructured object from a template

func WaitForDeleteNamespaces

func WaitForDeleteNamespaces(virtCli kubecli.KubevirtClient, timeout time.Duration, listOpts metav1.ListOptions) error

WaitForDeleteNamespaces waits to all namespaces with the given selector be deleted

Types

This section is empty.

Jump to

Keyboard shortcuts

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