gcp

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinimumVolumeSizeBytes      = uint64(1000000000)   // 1 GB
	MinimumCVSVolumeSizeBytesSW = uint64(107374182400) // 100 GiB
	MinimumCVSVolumeSizeBytesHW = uint64(107374182400) // 100 GiB
	MinimumAPIVersion           = "1.1.6"
	MinimumSDEVersion           = "2020.10.0"

	// Constants for internal pool attributes
	Size            = "size"
	ServiceLevel    = "serviceLevel"
	SnapshotDir     = "snapshotDir"
	SnapshotReserve = "snapshotReserve"
	ExportRule      = "exportRule"
	Network         = "network"
	Region          = "region"
	Zone            = "zone"
	StorageClass    = "storageClass"
	UnixPermissions = "unixPermissions"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NFSStorageDriver

type NFSStorageDriver struct {
	Config drivers.GCPNFSStorageDriverConfig
	API    api.GCPClient
	// contains filtered or unexported fields
}

NFSStorageDriver is for storage provisioning using Cloud Volumes Service in GCP

func (*NFSStorageDriver) BackendName

func (d *NFSStorageDriver) BackendName() string

BackendName returns the name of the backend managed by this driver instance

func (*NFSStorageDriver) CanSnapshot

CanSnapshot determines whether a snapshot as specified in the provided snapshot config may be taken.

func (*NFSStorageDriver) Create

func (d *NFSStorageDriver) Create(
	ctx context.Context, volConfig *storage.VolumeConfig, storagePool storage.Pool, volAttributes map[string]sa.Request,
) error

Create a volume with the specified options

func (*NFSStorageDriver) CreateClone

func (d *NFSStorageDriver) CreateClone(
	ctx context.Context, _, cloneVolConfig *storage.VolumeConfig, storagePool storage.Pool,
) error

CreateClone clones an existing volume. If a snapshot is not specified, one is created.

func (*NFSStorageDriver) CreateFollowup

func (d *NFSStorageDriver) CreateFollowup(ctx context.Context, volConfig *storage.VolumeConfig) error

func (*NFSStorageDriver) CreatePrepare

func (d *NFSStorageDriver) CreatePrepare(ctx context.Context, volConfig *storage.VolumeConfig)

func (*NFSStorageDriver) CreateSnapshot

func (d *NFSStorageDriver) CreateSnapshot(
	ctx context.Context, snapConfig *storage.SnapshotConfig, _ *storage.VolumeConfig,
) (*storage.Snapshot, error)

CreateSnapshot creates a snapshot for the given volume.

func (*NFSStorageDriver) DeleteSnapshot

func (d *NFSStorageDriver) DeleteSnapshot(
	ctx context.Context, snapConfig *storage.SnapshotConfig, _ *storage.VolumeConfig,
) error

DeleteSnapshot creates a snapshot of a volume.

func (*NFSStorageDriver) Destroy

func (d *NFSStorageDriver) Destroy(ctx context.Context, volConfig *storage.VolumeConfig) error

Destroy deletes a volume.

func (*NFSStorageDriver) Get

func (d *NFSStorageDriver) Get(ctx context.Context, name string) error

Get tests for the existence of a volume

func (*NFSStorageDriver) GetAPI

func (d *NFSStorageDriver) GetAPI() api.GCPClient

func (NFSStorageDriver) GetCommonConfig

GetCommonConfig returns driver's CommonConfig

func (*NFSStorageDriver) GetConfig

func (*NFSStorageDriver) GetExternalConfig

func (d *NFSStorageDriver) GetExternalConfig(ctx context.Context) interface{}

func (*NFSStorageDriver) GetInternalVolumeName

func (d *NFSStorageDriver) GetInternalVolumeName(ctx context.Context, name string) string

func (*NFSStorageDriver) GetProtocol

func (*NFSStorageDriver) GetSnapshot

func (d *NFSStorageDriver) GetSnapshot(
	ctx context.Context, snapConfig *storage.SnapshotConfig, _ *storage.VolumeConfig,
) (*storage.Snapshot, error)

GetSnapshot gets a snapshot. To distinguish between an API error reading the snapshot and a non-existent snapshot, this method may return (nil, nil).

func (*NFSStorageDriver) GetSnapshots

func (d *NFSStorageDriver) GetSnapshots(
	ctx context.Context, volConfig *storage.VolumeConfig,
) ([]*storage.Snapshot, error)

GetSnapshots returns the list of snapshots associated with the specified volume

func (*NFSStorageDriver) GetStorageBackendPhysicalPoolNames

func (d *NFSStorageDriver) GetStorageBackendPhysicalPoolNames(context.Context) []string

GetStorageBackendPhysicalPoolNames retrieves storage backend physical pools

func (*NFSStorageDriver) GetStorageBackendSpecs

func (d *NFSStorageDriver) GetStorageBackendSpecs(_ context.Context, backend storage.Backend) error

GetStorageBackendSpecs retrieves storage capabilities and register pools with specified backend.

func (*NFSStorageDriver) GetUpdateType

func (d *NFSStorageDriver) GetUpdateType(_ context.Context, driverOrig storage.Driver) *roaring.Bitmap

GetUpdateType returns a bitmap populated with updates to the driver

func (*NFSStorageDriver) GetVolumeExternal

func (d *NFSStorageDriver) GetVolumeExternal(ctx context.Context, name string) (*storage.VolumeExternal, error)

GetVolumeExternal queries the storage backend for all relevant info about a single container volume managed by this driver and returns a VolumeExternal representation of the volume.

func (*NFSStorageDriver) GetVolumeExternalWrappers

func (d *NFSStorageDriver) GetVolumeExternalWrappers(ctx context.Context, channel chan *storage.VolumeExternalWrapper)

GetVolumeExternalWrappers queries the storage backend for all relevant info about container volumes managed by this driver. It then writes a VolumeExternal representation of each volume to the supplied channel, closing the channel when finished.

func (NFSStorageDriver) GoString

func (d NFSStorageDriver) GoString() string

GoString implements GoStringer interface for the NFSStorageDriver driver

func (*NFSStorageDriver) Import

func (d *NFSStorageDriver) Import(ctx context.Context, volConfig *storage.VolumeConfig, originalName string) error

func (*NFSStorageDriver) Initialize

func (d *NFSStorageDriver) Initialize(
	ctx context.Context, context tridentconfig.DriverContext, configJSON string,
	commonConfig *drivers.CommonStorageDriverConfig, backendSecret map[string]string, backendUUID string,
) error

Initialize initializes this driver from the provided config

func (*NFSStorageDriver) Initialized

func (d *NFSStorageDriver) Initialized() bool

Initialized returns whether this driver has been initialized (and not terminated)

func (*NFSStorageDriver) List

func (d *NFSStorageDriver) List(ctx context.Context) ([]string, error)

List returns the list of volumes associated with this tenant

func (*NFSStorageDriver) Name

func (d *NFSStorageDriver) Name() string

Name returns the name of this driver

func (*NFSStorageDriver) Publish

func (d *NFSStorageDriver) Publish(
	ctx context.Context, volConfig *storage.VolumeConfig, publishInfo *utils.VolumePublishInfo,
) error

Publish the volume to the host specified in publishInfo. This method may or may not be running on the host where the volume will be mounted, so it should limit itself to updating access rules, initiator groups, etc. that require some host identity (but not locality) as well as storage controller API access.

func (*NFSStorageDriver) ReconcileNodeAccess

func (d *NFSStorageDriver) ReconcileNodeAccess(ctx context.Context, nodes []*utils.Node, _ string) error

func (*NFSStorageDriver) Rename

func (d *NFSStorageDriver) Rename(ctx context.Context, name, newName string) error

func (*NFSStorageDriver) Resize

func (d *NFSStorageDriver) Resize(ctx context.Context, volConfig *storage.VolumeConfig, sizeBytes uint64) error

Resize increases a volume's quota

func (*NFSStorageDriver) RestoreSnapshot

func (d *NFSStorageDriver) RestoreSnapshot(
	ctx context.Context, snapConfig *storage.SnapshotConfig, _ *storage.VolumeConfig,
) error

RestoreSnapshot restores a volume (in place) from a snapshot.

func (*NFSStorageDriver) StoreConfig

func (NFSStorageDriver) String

func (d NFSStorageDriver) String() string

String implements stringer interface for the NFSStorageDriver driver

func (*NFSStorageDriver) Terminate

func (d *NFSStorageDriver) Terminate(ctx context.Context, _ string)

Terminate stops the driver prior to its being unloaded

type Telemetry

type Telemetry struct {
	tridentconfig.Telemetry
	Plugin string `json:"plugin"`
}

Directories

Path Synopsis
This package provides a high-level interface to the NetApp GCP Cloud Volumes NFS REST API.
This package provides a high-level interface to the NetApp GCP Cloud Volumes NFS REST API.

Jump to

Keyboard shortcuts

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