cosi

package
v5.17.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBucketAccessClaimPhase added in v5.14.0

func CheckBucketAccessClaimPhase(cosiBucketAccessClaim *nbv1.COSIBucketAccessClaim)

CheckBucketAccessClaimPhase prints the phase and reason for it

func CheckPhase

func CheckPhase(cosiBucketClaim *nbv1.COSIBucketClaim)

CheckPhase prints the phase and reason for it

func Cmd

func Cmd() *cobra.Command

Cmd returns a CLI command

func CmdCOSIBucketAccessClaim added in v5.14.0

func CmdCOSIBucketAccessClaim() *cobra.Command

CmdCOSIBucketAccessClaim returns a CLI command

func CmdCOSIBucketAccessClass added in v5.14.0

func CmdCOSIBucketAccessClass() *cobra.Command

CmdCOSIBucketAccessClass returns a CLI command

func CmdCOSIBucketClaim

func CmdCOSIBucketClaim() *cobra.Command

CmdCOSIBucketClaim returns a CLI command

func CmdCOSIBucketClass

func CmdCOSIBucketClass() *cobra.Command

CmdCOSIBucketClass returns a CLI command

func CmdCreateAccessClass added in v5.14.0

func CmdCreateAccessClass() *cobra.Command

CmdCreateAccessClass returns a CLI command

func CmdCreateBucketAccessClaim added in v5.14.0

func CmdCreateBucketAccessClaim() *cobra.Command

CmdCreateBucketAccessClaim returns a CLI command

func CmdCreateBucketClaim

func CmdCreateBucketClaim() *cobra.Command

CmdCreateBucketClaim returns a CLI command

func CmdCreateBucketClass

func CmdCreateBucketClass() *cobra.Command

CmdCreateBucketClass returns a CLI command

func CmdCreateCacheNamespaceBucketclass

func CmdCreateCacheNamespaceBucketclass() *cobra.Command

CmdCreateCacheNamespaceBucketclass returns a CLI command

func CmdCreateMultiNamespaceBucketclass

func CmdCreateMultiNamespaceBucketclass() *cobra.Command

CmdCreateMultiNamespaceBucketclass returns a CLI command

func CmdCreateNamespaceBucketclass

func CmdCreateNamespaceBucketclass() *cobra.Command

CmdCreateNamespaceBucketclass returns a CLI command

func CmdCreatePlacementBucketClass

func CmdCreatePlacementBucketClass() *cobra.Command

CmdCreatePlacementBucketClass returns a CLI command

func CmdCreateSingleNamespaceBucketclass

func CmdCreateSingleNamespaceBucketclass() *cobra.Command

CmdCreateSingleNamespaceBucketclass returns a CLI command

func CmdDeleteAccessClass added in v5.14.0

func CmdDeleteAccessClass() *cobra.Command

CmdDeleteAccessClass returns a CLI command

func CmdDeleteBucketAccessClaim added in v5.14.0

func CmdDeleteBucketAccessClaim() *cobra.Command

CmdDeleteBucketAccessClaim returns a CLI command

func CmdDeleteBucketClaim

func CmdDeleteBucketClaim() *cobra.Command

CmdDeleteBucketClaim returns a CLI command

func CmdDeleteBucketClass

func CmdDeleteBucketClass() *cobra.Command

CmdDeleteBucketClass returns a CLI command

func CmdListAccessClass added in v5.14.0

func CmdListAccessClass() *cobra.Command

CmdListAccessClass returns a CLI command

func CmdListBucketAccessClaim added in v5.14.0

func CmdListBucketAccessClaim() *cobra.Command

CmdListBucketAccessClaim returns a CLI command

func CmdListBucketClaim

func CmdListBucketClaim() *cobra.Command

CmdListBucketClaim returns a CLI command

func CmdListBucketClass

func CmdListBucketClass() *cobra.Command

CmdListBucketClass returns a CLI command

func CmdStatusAccessClass added in v5.14.0

func CmdStatusAccessClass() *cobra.Command

CmdStatusAccessClass returns a CLI command

func CmdStatusBucketAccessClaim added in v5.14.0

func CmdStatusBucketAccessClaim() *cobra.Command

CmdStatusBucketAccessClaim returns a CLI command

func CmdStatusBucketClaim

func CmdStatusBucketClaim() *cobra.Command

CmdStatusBucketClaim returns a CLI command

func CmdStatusBucketClass

func CmdStatusBucketClass() *cobra.Command

CmdStatusBucketClass returns a CLI command

func CreateBucketClassSpecFromParameters

func CreateBucketClassSpecFromParameters(parameters map[string]string) (*nbv1.BucketClassSpec, string)

CreateBucketClassSpecFromParameters converts Cosi bucket class additional Parameters to BucketClassSpec

func RunCreateAccessClass added in v5.14.0

func RunCreateAccessClass(cmd *cobra.Command, args []string)

RunCreateAccessClass runs a CLI command

func RunCreateBucketAccessClaim added in v5.14.0

func RunCreateBucketAccessClaim(cmd *cobra.Command, args []string)

RunCreateBucketAccessClaim runs a CLI command

func RunCreateBucketClaim

func RunCreateBucketClaim(cmd *cobra.Command, args []string)

RunCreateBucketClaim runs a CLI command

func RunCreateCacheNamespaceBucketClass

func RunCreateCacheNamespaceBucketClass(cmd *cobra.Command, args []string)

RunCreateCacheNamespaceBucketClass runs a CLI command

func RunCreateMultiNamespaceBucketClass

func RunCreateMultiNamespaceBucketClass(cmd *cobra.Command, args []string)

RunCreateMultiNamespaceBucketClass runs a CLI command

func RunCreatePlacementBucketClass

func RunCreatePlacementBucketClass(cmd *cobra.Command, args []string)

RunCreatePlacementBucketClass runs a CLI command

func RunCreateSingleNamespaceBucketClass

func RunCreateSingleNamespaceBucketClass(cmd *cobra.Command, args []string)

RunCreateSingleNamespaceBucketClass runs a CLI command

func RunDeleteAccessClass added in v5.14.0

func RunDeleteAccessClass(cmd *cobra.Command, args []string)

RunDeleteAccessClass runs a CLI command

func RunDeleteBucketAccessClaim added in v5.14.0

func RunDeleteBucketAccessClaim(cmd *cobra.Command, args []string)

RunDeleteBucketAccessClaim runs a CLI command

func RunDeleteBucketClaim

func RunDeleteBucketClaim(cmd *cobra.Command, args []string)

RunDeleteBucketClaim runs a CLI command

func RunDeleteBucketClass

func RunDeleteBucketClass(cmd *cobra.Command, args []string)

RunDeleteBucketClass runs a CLI command

func RunListAccessClass added in v5.14.0

func RunListAccessClass(cmd *cobra.Command, args []string)

RunListAccessClass runs a CLI command

func RunListBucketAccessClaim added in v5.14.0

func RunListBucketAccessClaim(cmd *cobra.Command, args []string)

RunListBucketAccessClaim runs a CLI command

func RunListBucketClaim

func RunListBucketClaim(cmd *cobra.Command, args []string)

RunListBucketClaim runs a CLI command

func RunListBucketClass

func RunListBucketClass(cmd *cobra.Command, args []string)

RunListBucketClass runs a CLI command

func RunProvisioner

func RunProvisioner(client client.Client, scheme *runtime.Scheme, recorder record.EventRecorder) error

RunProvisioner will run the COSI provisioner

func RunStatusAccessClass added in v5.14.0

func RunStatusAccessClass(cmd *cobra.Command, args []string)

RunStatusAccessClass runs a CLI command

func RunStatusBucketAccessClaim added in v5.14.0

func RunStatusBucketAccessClaim(cmd *cobra.Command, args []string)

RunStatusBucketAccessClaim runs a CLI command

func RunStatusBucketClaim

func RunStatusBucketClaim(cmd *cobra.Command, args []string)

RunStatusBucketClaim runs a CLI command

func RunStatusBucketClass

func RunStatusBucketClass(cmd *cobra.Command, args []string)

RunStatusBucketClass runs a CLI command

func ValidateCOSIBucketClaim

func ValidateCOSIBucketClaim(objectName string, namespace string, spec nbv1.BucketClassSpec, isCLI bool) error

ValidateCOSIBucketClaim validate COSI bucket claim

func WaitBucketAccessClaimReady added in v5.14.0

func WaitBucketAccessClaimReady(cosiBucketAccessClaim *nbv1.COSIBucketAccessClaim) bool

WaitBucketAccessClaimReady waits until the cosi bucket claim status bucket ready changes to true

func WaitReady

func WaitReady(cosiBucketClaim *nbv1.COSIBucketClaim) bool

WaitReady waits until the cosi bucket claim status bucket ready changes to true

Types

type APIRequest

type APIRequest struct {
	Provisioner *Provisioner
	BucketName  string
	AccountName string
	SysClient   *system.Client
	BucketClass *nbv1.BucketClassSpec
}

APIRequest is the context of handling a single api request (bucket or account)

func NewAccountRequest

func NewAccountRequest(
	p *Provisioner,
	accountCreateReq *cosi.DriverGrantBucketAccessRequest,
	accountDelReq *cosi.DriverRevokeBucketAccessRequest,
) (*APIRequest, error)

NewAccountRequest initializes a cosi bucket access request

func NewBucketRequest

func NewBucketRequest(
	p *Provisioner,
	bucketCreateReq *cosi.DriverCreateBucketRequest,
	bucketDelReq *cosi.DriverDeleteBucketRequest,
) (*APIRequest, error)

NewBucketRequest initializes a cosi bucket request

func (*APIRequest) CreateAccount

func (r *APIRequest) CreateAccount() (*nb.S3AccessKeys, error)

CreateAccount creates a new bar account

func (*APIRequest) CreateBucket

func (r *APIRequest) CreateBucket(
	p *Provisioner,
	bucketReq *cosi.DriverCreateBucketRequest,
) error

CreateBucket creates a new cosi bucket

func (*APIRequest) DeleteAccount

func (r *APIRequest) DeleteAccount() error

DeleteAccount deletes the bar account

func (*APIRequest) DeleteBucket

func (r *APIRequest) DeleteBucket() error

DeleteBucket deletes the cosi bucket **including data**

type IdentityServer

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

IdentityServer holds the name of NooBaa's COSI driver

func (*IdentityServer) DriverGetInfo

DriverGetInfo returns the info of the Noobaa's COSI driver

type Provisioner

type Provisioner struct {
	Logger    *logrus.Entry
	Namespace string
	// contains filtered or unexported fields
}

Provisioner implements COSI driver callbacks

func (*Provisioner) DriverCreateBucket

DriverCreateBucket is an idempotent method for creating buckets It is expected to create the same bucket given a bucketName and protocol If the bucket already exists, then it MUST return codes.AlreadyExists Return values:

nil -                   Bucket successfully created
codes.AlreadyExists -   Bucket already exists. No more retries
non-nil err -           Internal error                                [requeue'd with exponential backoff]

func (*Provisioner) DriverDeleteBucket

DriverDeleteBucket is an idempotent method for deleting buckets It is expected to delete the same bucket given a bucketName Return values:

nil -                   Bucket successfully deleted
non-nil err -           Internal error                                [requeue'd with exponential backoff]

func (*Provisioner) DriverGrantBucketAccess

DriverGrantBucketAccess is an idempotent method for granting bucket access It is expected to grant access to the given bucketName Return values:

nil -                   Access was successfully granted
non-nil err -           Internal error                                [requeue'd with exponential backoff]

func (*Provisioner) DriverRevokeBucketAccess

DriverRevokeBucketAccess is an idempotent method for revoking bucket access It is expected to revoke access of a given accountId to the given bucketId Return values:

nil -                   Access successfully revoked
non-nil err -           Internal error                                [requeue'd with exponential backoff]

Jump to

Keyboard shortcuts

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