storage

package
v0.6.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "com.ie.ibm.hpsys", Version: "v1alpha1"}
)

Functions

This section is empty.

Types

type ProvisionImpl

type ProvisionImpl struct {
	Client client.Client
}

ProvisionImpl is an implementation of ProvisionInterface using Dataset CRDs

func NewProvisionImpl

func NewProvisionImpl(c client.Client) *ProvisionImpl

NewProvisionImpl returns a new ProvisionImpl object

func (*ProvisionImpl) CreateDataset

func (r *ProvisionImpl) CreateDataset(ref *types.NamespacedName, bucket *ProvisionedBucket, owner *types.NamespacedName) error

CreateDataset generates a Dataset resource

func (*ProvisionImpl) DeleteDataset

func (r *ProvisionImpl) DeleteDataset(ref *types.NamespacedName) error

DeleteDataset deletes the existing Dataset resource

func (*ProvisionImpl) GetDatasetStatus

func (r *ProvisionImpl) GetDatasetStatus(ref *types.NamespacedName) (*ProvisionedStorageStatus, error)

GetDatasetStatus returns status of an existing Dataset resource.

func (*ProvisionImpl) SetPersistent

func (r *ProvisionImpl) SetPersistent(ref *types.NamespacedName, persistent bool) error

SetPersistent updates a "remove-on-delete" label of the existing Dataset resource

type ProvisionInterface

type ProvisionInterface interface {
	CreateDataset(ref *types.NamespacedName, dataset *ProvisionedBucket, owner *types.NamespacedName) error
	DeleteDataset(ref *types.NamespacedName) error
	GetDatasetStatus(ref *types.NamespacedName) (*ProvisionedStorageStatus, error)
	SetPersistent(ref *types.NamespacedName, persistent bool) error
}

ProvisionInterface is an interface for managing dynamically allocated Dataset resources

type ProvisionTest

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

ProvisionTest is an implementation of ProvisionInterface used for testing

func NewProvisionTest

func NewProvisionTest() *ProvisionTest

NewProvisionTest constructs a new ProvisionTest object

func (*ProvisionTest) CreateDataset

func (r *ProvisionTest) CreateDataset(ref *types.NamespacedName, dataset *ProvisionedBucket, owner *types.NamespacedName) error

CreateDataset generates a new dataset

func (*ProvisionTest) DeleteDataset

func (r *ProvisionTest) DeleteDataset(ref *types.NamespacedName) error

DeleteDataset removes an existing dataset

func (*ProvisionTest) GetDatasetStatus

func (r *ProvisionTest) GetDatasetStatus(ref *types.NamespacedName) (*ProvisionedStorageStatus, error)

GetDatasetStatus returns status of an existing Dataset resource.

func (*ProvisionTest) SetPersistent

func (r *ProvisionTest) SetPersistent(ref *types.NamespacedName, persistent bool) error

SetPersistent does nothing for the testing implementation except for verifying that the dataset exists

type ProvisionedBucket

type ProvisionedBucket struct {
	// Bucket name
	Name string
	// Endpoint
	Endpoint string
	// Secret containing credentials
	SecretRef types.NamespacedName
}

ProvisionedBucket holds information about the bucket to be provisioned. In the future releases this structure may be extented to include other data store types.

type ProvisionedStorageStatus

type ProvisionedStorageStatus struct {
	Provisioned bool
	ErrorMsg    string
}

ProvisionedStorageStatus includes the status of the provisioning and an error message if the provisioning has failed

Jump to

Keyboard shortcuts

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