util

package
v0.2.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BucketClaimFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection"
)

Variables

View Source
var (
	// Error codes that the central controller will return
	ErrBucketAlreadyExists = errors.New("a bucket already exists that matches the bucket claim")
	ErrInvalidBucketClass  = errors.New("cannot find bucket class with the name specified in the bucket claim")
	ErrNotImplemented      = errors.New("operation not implemented")
)

Functions

func CopySS

func CopySS(m map[string]string) map[string]string

func CreateBucketClaim

func CreateBucketClaim(ctx context.Context, client bucketclientset.Interface, bc *v1alpha1.BucketClaim) (*v1alpha1.BucketClaim, error)

CreateBucketClaim creates a bucket claim object or return an existing bucket request object This is used by bucket claim unit tests

func CreateBucketClass

func CreateBucketClass(ctx context.Context, client bucketclientset.Interface, bc *v1alpha1.BucketClass) (*v1alpha1.BucketClass, error)

CreateBucketClass creates a bucket class object or return an existing bucket class object This is used by bucket claim unit tests

func DeleteObjects

func DeleteObjects(ctx context.Context, client bucketclientset.Interface, objs ...interface{})

Deletes any bucket api object or an array of bucket or bucket access objects. This is used by bucket request and bucket access request unit tests

func GetBuckets

func GetBuckets(ctx context.Context, client bucketclientset.Interface, numExpected int) *v1alpha1.BucketList

GetBuckets will wait and fetch expected number of buckets created by the test This is used by bucket request unit tests

func ValidateBucket

func ValidateBucket(bucket v1alpha1.Bucket, bucketClaim v1alpha1.BucketClaim, bucketClass v1alpha1.BucketClass) bool

Validates the content of the bucket against bucket request and backet class This is used by bucket request unit tests

Types

This section is empty.

Jump to

Keyboard shortcuts

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