utils

package
v0.0.0-...-e71a76f Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertParameters

func AssertParameters(job *model.Job, params []string) error

AssertParameters asserts that the job has all the required parameters.

func DAddActivity

func DAddActivity(activities ...string) func(*model.Job) error

DAddActivity is a helper function that adds activity to deployment

func DRemActivity

func DRemActivity(activities ...string) func(*model.Job) error

DRemActivity is a helper function that removes activity from deployment

func DeploymentDeleted

func DeploymentDeleted(job *model.Job) (bool, error)

DeploymentDeleted is a helper function that returns true if the deployment is deleted.

func DeploymentDeletedByID

func DeploymentDeletedByID(id string) (bool, error)

DeploymentDeletedByID returns true if the deployment is deleted.

func GetAuthInfo

func GetAuthInfo(job *model.Job) *core.AuthInfo

GetAuthInfo returns the auth info from the job. AuthInfo is not always available in the job, so it might be nil.

func OnlyCreateSnapshotPerUser

func OnlyCreateSnapshotPerUser(job *model.Job) (bool, error)

OnlyCreateSnapshotPerUser is a helper function that returns true if there is a snapshot job for the user.

func UpdatingOwner

func UpdatingOwner(job *model.Job) (bool, error)

UpdatingOwner is a helper function that returns true if there is an updating owner job for the VM.

func VmAddActivity

func VmAddActivity(activities ...string) func(*model.Job) error

VmAddActivity is a helper function that adds activity to VM

func VmDeleted

func VmDeleted(job *model.Job) (bool, error)

VmDeleted is a helper function that returns true if the VM is deleted.

func VmDeletedByID

func VmDeletedByID(id string) (bool, error)

VmDeletedByID returns true if the VM is deleted.

func VmRemActivity

func VmRemActivity(activities ...string) func(*model.Job) error

VmRemActivity is a helper function that removes activity from VM

func WaitForJob

func WaitForJob(context context.Context, job *model.Job, statuses []string) error

WaitForJob waits for a job to reach one of the given statuses.

func WaitForJobs

func WaitForJobs(context context.Context, jobs []model.Job, statuses []string) error

WaitForJobs waits for a list of jobs to reach one of the given statuses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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