obc

package
v5.0.0-...-5e9b562 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPhase

func CheckPhase(obc *nbv1.ObjectBucketClaim)

CheckPhase prints the phase and reason for it

func Cmd

func Cmd() *cobra.Command

Cmd returns a CLI command

func CmdCreate

func CmdCreate() *cobra.Command

CmdCreate returns a CLI command

func CmdDelete

func CmdDelete() *cobra.Command

CmdDelete returns a CLI command

func CmdList

func CmdList() *cobra.Command

CmdList returns a CLI command

func CmdStatus

func CmdStatus() *cobra.Command

CmdStatus returns a CLI command

func GetDefaultBucketClass

func GetDefaultBucketClass(
	p *Provisioner,
	bucketOptions *obAPI.BucketOptions,
) (*nbv1.BucketClass, error)

GetDefaultBucketClass will get the default bucket class

func RunCreate

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

RunCreate runs a CLI command

func RunDelete

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

RunDelete runs a CLI command

func RunList

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

RunList runs a CLI command

func RunProvisioner

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

RunProvisioner will run OBC provisioner

func RunStatus

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

RunStatus runs a CLI command

func WaitReady

func WaitReady(obc *nbv1.ObjectBucketClaim) bool

WaitReady waits until the obc phase changes to bound by the operator

Types

type BucketRequest

type BucketRequest struct {
	Provisioner *Provisioner
	OB          *nbv1.ObjectBucket
	OBC         *nbv1.ObjectBucketClaim
	BucketName  string
	AccountName string
	SysClient   *system.Client
	BucketClass *nbv1.BucketClass
}

BucketRequest is the context of handling a single bucket request

func NewBucketRequest

func NewBucketRequest(
	p *Provisioner,
	ob *nbv1.ObjectBucket,
	bucketOptions *obAPI.BucketOptions,
) (*BucketRequest, error)

NewBucketRequest initializes an obc bucket request

func (*BucketRequest) CreateAccount

func (r *BucketRequest) CreateAccount() error

CreateAccount creates the obc account

func (*BucketRequest) CreateBucket

func (r *BucketRequest) CreateBucket(
	p *Provisioner,
	bucketOptions *obAPI.BucketOptions,
) error

CreateBucket creates the obc bucket

func (*BucketRequest) CreateTieringStructure

func (r *BucketRequest) CreateTieringStructure(BucketClass nbv1.BucketClass) (string, error)

CreateTieringStructure will create the tiering structure needed for the OBC

func (*BucketRequest) DeleteAccount

func (r *BucketRequest) DeleteAccount() error

DeleteAccount deletes the obc account

func (*BucketRequest) DeleteBucket

func (r *BucketRequest) DeleteBucket() error

DeleteBucket deletes the obc bucket **including data**

type Provisioner

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

Provisioner implements lib-bucket-provisioner callbacks

func (*Provisioner) Delete

func (p *Provisioner) Delete(ob *nbv1.ObjectBucket) error

Delete implements lib-bucket-provisioner callback to delete a bucket

func (*Provisioner) Grant

func (p *Provisioner) Grant(bucketOptions *obAPI.BucketOptions) (*nbv1.ObjectBucket, error)

Grant implements lib-bucket-provisioner callback to use an existing bucket

func (*Provisioner) Provision

func (p *Provisioner) Provision(bucketOptions *obAPI.BucketOptions) (*nbv1.ObjectBucket, error)

Provision implements lib-bucket-provisioner callback to create a new bucket

func (*Provisioner) Revoke

func (p *Provisioner) Revoke(ob *nbv1.ObjectBucket) error

Revoke implements lib-bucket-provisioner callback to stop using an existing bucket

Jump to

Keyboard shortcuts

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