ontap

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: 29 Imported by: 0

Documentation

Overview

Copyright 2022 NetApp, Inc. All Rights Reserved.

Index

Constants

View Source
const (
	MinimumVolumeSizeBytes       = 20971520 // 20 MiB
	HousekeepingStartupDelaySecs = 10
	LUNMetadataBufferMultiplier  = 1.1 // 10%

	// Constants for internal pool attributes
	Size              = "size"
	Region            = "region"
	Zone              = "zone"
	Media             = "media"
	SpaceAllocation   = "spaceAllocation"
	SnapshotDir       = "snapshotDir"
	SpaceReserve      = "spaceReserve"
	SnapshotPolicy    = "snapshotPolicy"
	SnapshotReserve   = "snapshotReserve"
	UnixPermissions   = "unixPermissions"
	ExportPolicy      = "exportPolicy"
	SecurityStyle     = "securityStyle"
	BackendType       = "backendType"
	Replication       = "replication"
	Snapshots         = "snapshots"
	Clones            = "clones"
	Encryption        = "encryption"
	LUKSEncryption    = "LUKSEncryption"
	FileSystemType    = "fileSystemType"
	ProvisioningType  = "provisioningType"
	SplitOnClone      = "splitOnClone"
	TieringPolicy     = "tieringPolicy"
	QosPolicy         = "qosPolicy"
	AdaptiveQosPolicy = "adaptiveQosPolicy"

	VolTypeRW  = "rw"  // read-write
	VolTypeLS  = "ls"  // load-sharing
	VolTypeDP  = "dp"  // data-protection
	VolTypeDC  = "dc"  // data-cache
	VolTypeTMP = "tmp" // temporary
)
View Source
const (
	DefaultSpaceReserve              = "none"
	DefaultSnapshotPolicy            = "none"
	DefaultSnapshotReserve           = "5"
	DefaultUnixPermissions           = "---rwxrwxrwx"
	DefaultSnapshotDir               = "false"
	DefaultExportPolicy              = "default"
	DefaultSecurityStyle             = "unix"
	DefaultNfsMountOptionsDocker     = "-o nfsvers=3"
	DefaultNfsMountOptionsKubernetes = ""
	DefaultSplitOnClone              = "false"
	DefaultLuksEncryption            = "false"
	DefaultMirroring                 = "false"
	DefaultLimitAggregateUsage       = ""
	DefaultLimitVolumeSize           = ""
	DefaultTieringPolicy             = ""
)
View Source
const DefaultSpaceAllocation = "true"

Enable space-allocation by default. If not enabled, Data ONTAP takes the LUNs offline when they're seen as full. see: https://github.com/NetApp/trident/issues/135

View Source
const (
	LUNAttributeFSType = "com.netapp.ndvp.fstype"
)

For legacy reasons, these strings mustn't change

View Source
const MSecPerHour = 1000 * 60 * 60 // millis * seconds * minutes

Variables

This section is empty.

Functions

func CleanBackendName

func CleanBackendName(backendName string) string

CleanBackendName removes brackets and replaces colons with periods to avoid regex parsing errors.

func EMSHeartbeat

func EMSHeartbeat(ctx context.Context, driver StorageDriver)

EMSHeartbeat logs an ASUP message on a timer view them via filer::> event log show -severity NOTICE

func GetEncryptionValue

func GetEncryptionValue(encryption string) (*bool, error)

GetEncryptionValue: Returns "true"/"false" if encryption is explicitely mentioned in the backend or storage class. Otherwise, it returns "nil" which enables NAE/NVE on the volume depending on the aggregate properties.

func GetISCSITargetInfo

func GetISCSITargetInfo(
	ctx context.Context, clientAPI api.OntapAPI, config *drivers.OntapStorageDriverConfig,
) (iSCSINodeName string, iSCSIInterfaces []string, returnError error)

GetISCSITargetInfo returns the iSCSI node name and iSCSI interfaces using the provided client's SVM.

func GetLUNPathEconomy

func GetLUNPathEconomy(bucketName, volNameInternal string) string

func GetOntapDriverRedactList

func GetOntapDriverRedactList() []string

func GetSnapshotReserve

func GetSnapshotReserve(snapshotPolicy, snapshotReserve string) (int, error)

func GetVolumeSize

func GetVolumeSize(sizeBytes uint64, poolDefaultSizeBytes string) (uint64, error)

func InitializeOntapAPI

func InitializeOntapAPI(
	ctx context.Context, config *drivers.OntapStorageDriverConfig,
) (api.OntapAPI, error)

InitializeOntapAPI returns an ontap.Client ZAPI or REST client. If the SVM isn't specified in the config file, this method attempts to derive the one to use for ZAPI.

func InitializeOntapConfig

func InitializeOntapConfig(
	ctx context.Context, driverContext tridentconfig.DriverContext, configJSON string,
	commonConfig *drivers.CommonStorageDriverConfig, backendSecret map[string]string,
) (*drivers.OntapStorageDriverConfig, error)

InitializeOntapConfig parses the ONTAP config, mixing in the specified common config.

func InitializeOntapDriver

func InitializeOntapDriver(
	ctx context.Context, config *drivers.OntapStorageDriverConfig,
) (api.OntapAPI, error)

InitializeOntapDriver sets up the API client and performs all other initialization tasks that are common to all the ONTAP drivers.

func InitializeSANDriver

func InitializeSANDriver(
	ctx context.Context, driverContext tridentconfig.DriverContext, clientAPI api.OntapAPI,
	config *drivers.OntapStorageDriverConfig, validate func(context.Context) error, backendUUID string,
) error

InitializeSANDriver performs common ONTAP SAN driver initialization.

func InitializeStoragePoolsCommon

func InitializeStoragePoolsCommon(
	ctx context.Context, d StorageDriver, poolAttributes map[string]sa.Offer, backendName string,
) (map[string]storage.Pool, map[string]storage.Pool, error)

func IsDefaultAuthTypeCHAP

func IsDefaultAuthTypeCHAP(response api.IscsiInitiatorAuth) (bool, error)

IsDefaultAuthTypeCHAP returns true if the default initiator's auth-type field is set to the value "CHAP"

func IsDefaultAuthTypeDeny

func IsDefaultAuthTypeDeny(response api.IscsiInitiatorAuth) (bool, error)

IsDefaultAuthTypeDeny returns true if the default initiator's auth-type field is set to the value "deny"

func IsDefaultAuthTypeNone

func IsDefaultAuthTypeNone(response api.IscsiInitiatorAuth) (bool, error)

IsDefaultAuthTypeNone returns true if the default initiator's auth-type field is set to the value "none"

func LunUnmapAllIgroups

func LunUnmapAllIgroups(ctx context.Context, clientAPI api.OntapAPI, lunPath string) error

LunUnmapAllIgroups removes all maps from a given LUN

func PopulateConfigurationDefaults

func PopulateConfigurationDefaults(ctx context.Context, config *drivers.OntapStorageDriverConfig) error

PopulateConfigurationDefaults fills in default values for configuration settings if not supplied in the config file

func PopulateOntapLunMapping

func PopulateOntapLunMapping(
	ctx context.Context, clientAPI api.OntapAPI, ips []string, volConfig *storage.VolumeConfig, lunID int, lunPath, igroupName string,
) error

PopulateOntapLunMapping helper function to fill in volConfig with its LUN mapping values. This function assumes that the list of data LIFs has not changed since driver initialization and volume creation

func PublishLUN

func PublishLUN(
	ctx context.Context, clientAPI api.OntapAPI, config *drivers.OntapStorageDriverConfig, ips []string,
	publishInfo *utils.VolumePublishInfo, lunPath, igroupName, iSCSINodeName string,
) error

PublishLUN publishes the volume to the host specified in publishInfo from ontap-san or ontap-san-economy. 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. This function assumes that the list of data LIF IP addresses does not change between driver initialization and publish

func RestoreSnapshot

func RestoreSnapshot(
	ctx context.Context, snapConfig *storage.SnapshotConfig, config *drivers.OntapStorageDriverConfig,
	client api.OntapAPI,
) error

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

func SplitVolumeFromBusySnapshot

func SplitVolumeFromBusySnapshot(
	ctx context.Context, snapConfig *storage.SnapshotConfig, config *drivers.OntapStorageDriverConfig,
	client api.OntapAPI, cloneSplitStart func(ctx context.Context, cloneName string) error,
) error

SplitVolumeFromBusySnapshot gets the list of volumes backed by a busy snapshot and starts a split operation on the first one (sorted by volume name).

func ValidateDataLIF

func ValidateDataLIF(ctx context.Context, dataLIF string, dataLIFs []string) ([]string, error)

func ValidateNASDriver

func ValidateNASDriver(
	ctx context.Context, api api.OntapAPI, config *drivers.OntapStorageDriverConfig,
) error

ValidateNASDriver contains the validation logic shared between ontap-nas and ontap-nas-economy.

func ValidateSANDriver

func ValidateSANDriver(
	ctx context.Context, config *drivers.OntapStorageDriverConfig, ips []string,
) error

ValidateSANDriver contains the validation logic shared between ontap-san and ontap-san-economy.

func ValidateStoragePools

func ValidateStoragePools(
	ctx context.Context, physicalPools, virtualPools map[string]storage.Pool, d StorageDriver, labelLimit int,
) error

ValidateStoragePools makes sure that values are set for the fields, if value(s) were not specified for a field then a default should have been set in for that field in the initialize storage pools

func ValidateStoragePrefix

func ValidateStoragePrefix(storagePrefix string) error

func ValidateStoragePrefixEconomy

func ValidateStoragePrefixEconomy(storagePrefix string) error

Types

type ChapCredentials

type ChapCredentials struct {
	ChapUsername              string
	ChapInitiatorSecret       string
	ChapTargetUsername        string
	ChapTargetInitiatorSecret string
}

ChapCredentials holds the bidrectional chap settings

func ValidateBidrectionalChapCredentials

func ValidateBidrectionalChapCredentials(
	defaultAuth api.IscsiInitiatorAuth,
	config *drivers.OntapStorageDriverConfig,
) (*ChapCredentials, error)

ValidateBidrectionalChapCredentials validates the bidirectional CHAP settings

type HousekeepingTask

type HousekeepingTask struct {
	Name         string
	Ticker       *time.Ticker
	InitialDelay time.Duration
	Done         chan struct{}
	Tasks        []func(context.Context)
	Driver       *NASQtreeStorageDriver
	// contains filtered or unexported fields
}

func NewPruneTask

func NewPruneTask(ctx context.Context, d *NASQtreeStorageDriver, tasks []func(context.Context)) *HousekeepingTask

func NewResizeTask

func NewResizeTask(ctx context.Context, d *NASQtreeStorageDriver, tasks []func(context.Context)) *HousekeepingTask

func (*HousekeepingTask) Start

func (t *HousekeepingTask) Start(ctx context.Context)

func (*HousekeepingTask) Stop

func (t *HousekeepingTask) Stop(ctx context.Context)

type LUNHelper

type LUNHelper struct {
	Config         drivers.OntapStorageDriverConfig
	Context        tridentconfig.DriverContext
	SnapshotRegexp *regexp.Regexp
}

func (*LUNHelper) GetBucketName

func (o *LUNHelper) GetBucketName(lunPath string) string

parameter: snapLunPath=/vol/myBucket/storagePrefix_myLun_snapshot_mySnap result [1] is the bucket name: myBucket

func (*LUNHelper) GetExternalVolumeNameFromPath

func (o *LUNHelper) GetExternalVolumeNameFromPath(lunPath string) string

parameter: snapLunPath=/vol/myBucket/storagePrefix_myLun_snapshot_mySnap result [2] is the volume name: myLun

func (*LUNHelper) GetInternalVolumeName

func (o *LUNHelper) GetInternalVolumeName(volName string) string

parameter: volName=my-Lun output: storagePrefix_my_Lun parameter: volName=storagePrefix_my-Lun output: storagePrefix_my_Lun

func (*LUNHelper) GetInternalVolumeNameFromPath

func (o *LUNHelper) GetInternalVolumeNameFromPath(path string) string

parameter: /vol/my_Bucket/storagePrefix_my-Lun output: storagePrefix_my-Lun

func (*LUNHelper) GetLUNPath

func (o *LUNHelper) GetLUNPath(bucketName, volName string) string

parameters: bucketName=my-Bucket volName=my-Lun output: /vol/my_Bucket/storagePrefix_my_Lun parameters: bucketName=my-Bucket volName=storagePrefix_my-Lun output: /vol/my_Bucket/storagePrefix_my_Lun

func (*LUNHelper) GetLUNPathPattern

func (o *LUNHelper) GetLUNPathPattern(volName string) string

parameter: volName=my-Lun output: /vol/*/storagePrefix_my_Vol

func (*LUNHelper) GetSnapPath

func (o *LUNHelper) GetSnapPath(bucketName, internalVolName, snapName string) string

parameters: bucketName=my-Bucket internalVolName=storagePrefix_my-Lun snapName=snap-1 output: /vol/my_Bucket/storagePrefix_my_Lun_snapshot_snap_1

func (*LUNHelper) GetSnapPathPattern

func (o *LUNHelper) GetSnapPathPattern(bucketName string) string

parameter: bucketName=my-Bucket output: /vol/my_Bucket/storagePrefix_*_snapshot_*

func (*LUNHelper) GetSnapPathPatternForVolume

func (o *LUNHelper) GetSnapPathPatternForVolume(externalVolumeName string) string

parameter: volName=my-Vol output: /vol/*/storagePrefix_my_Vol_snapshot_*

func (*LUNHelper) GetSnapshotName

func (o *LUNHelper) GetSnapshotName(internalVolName, snapName string) string

internalVolName is expected to have the storage prefix included parameters: internalVolName=storagePrefix_my-Lun snapName=my-Snapshot output: storagePrefix_my_Lun_snapshot_my_Snapshot

func (*LUNHelper) GetSnapshotNameFromSnapLUNPath

func (o *LUNHelper) GetSnapshotNameFromSnapLUNPath(snapLunPath string) string

parameter: snapLunPath=/vol/myBucket/storagePrefix_myLun_snapshot_mySnap result [4] is the snapshot name: mySnap

func (*LUNHelper) IsValidSnapLUNPath

func (o *LUNHelper) IsValidSnapLUNPath(snapLunPath string) bool

identifies if the given snapLunPath has a valid snapshot name

type NASDriver

type NASDriver interface {
	GetVolumeOpts(context.Context, *storage.VolumeConfig, map[string]sa.Request) (map[string]string, error)
	GetAPI() api.OntapAPI
	GetConfig() *drivers.OntapStorageDriverConfig
}

type NASFlexGroupStorageDriver

type NASFlexGroupStorageDriver struct {
	Config drivers.OntapStorageDriverConfig
	API    api.OntapAPI
	// contains filtered or unexported fields
}

NASFlexGroupStorageDriver is for NFS FlexGroup storage provisioning

func (*NASFlexGroupStorageDriver) BackendName

func (d *NASFlexGroupStorageDriver) BackendName() string

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

func (*NASFlexGroupStorageDriver) CanSnapshot

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

func (*NASFlexGroupStorageDriver) Create

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

Create a volume with the specified options

func (*NASFlexGroupStorageDriver) CreateClone

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

CreateClone creates a flexgroup clone

func (*NASFlexGroupStorageDriver) CreateFollowup

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

func (*NASFlexGroupStorageDriver) CreatePrepare

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

func (*NASFlexGroupStorageDriver) CreateSnapshot

CreateSnapshot creates a snapshot for the given volume

func (*NASFlexGroupStorageDriver) DeleteSnapshot

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

DeleteSnapshot creates a snapshot of a volume.

func (*NASFlexGroupStorageDriver) Destroy

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

Destroy the volume

func (*NASFlexGroupStorageDriver) Get

Get tests the existence of a FlexGroup. Returns nil if the FlexGroup exists and an error otherwise.

func (*NASFlexGroupStorageDriver) GetAPI

func (NASFlexGroupStorageDriver) GetCommonConfig

GetCommonConfig returns driver's CommonConfig

func (*NASFlexGroupStorageDriver) GetConfig

func (*NASFlexGroupStorageDriver) GetExternalConfig

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

func (*NASFlexGroupStorageDriver) GetInternalVolumeName

func (d *NASFlexGroupStorageDriver) GetInternalVolumeName(_ context.Context, name string) string

func (*NASFlexGroupStorageDriver) GetProtocol

func (*NASFlexGroupStorageDriver) GetSnapshot

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 (*NASFlexGroupStorageDriver) GetSnapshots

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

GetSnapshots returns the list of snapshots associated with the specified volume

func (*NASFlexGroupStorageDriver) GetStorageBackendPhysicalPoolNames

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

GetStorageBackendPhysicalPoolNames retrieves storage backend physical pools

func (*NASFlexGroupStorageDriver) GetStorageBackendSpecs

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

GetStorageBackendSpecs updates the specified Backend object with StoragePools.

func (*NASFlexGroupStorageDriver) GetTelemetry

func (d *NASFlexGroupStorageDriver) GetTelemetry() *Telemetry

func (*NASFlexGroupStorageDriver) GetUpdateType

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

GetUpdateType returns a bitmap populated with updates to the driver

func (*NASFlexGroupStorageDriver) GetVolumeExternal

func (d *NASFlexGroupStorageDriver) 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 (*NASFlexGroupStorageDriver) GetVolumeExternalWrappers

func (d *NASFlexGroupStorageDriver) 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 (*NASFlexGroupStorageDriver) GetVolumeOpts

func (d *NASFlexGroupStorageDriver) GetVolumeOpts(
	ctx context.Context, volConfig *storage.VolumeConfig, requests map[string]sa.Request,
) (map[string]string, error)

func (NASFlexGroupStorageDriver) GoString

func (d NASFlexGroupStorageDriver) GoString() string

GoString makes NASFlexGroupStorageDriver satisfy the GoStringer interface.

func (*NASFlexGroupStorageDriver) Import

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

Import brings an existing volume under trident's control

func (*NASFlexGroupStorageDriver) Initialize

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

Initialize from the provided config

func (*NASFlexGroupStorageDriver) Initialized

func (d *NASFlexGroupStorageDriver) Initialized() bool

func (*NASFlexGroupStorageDriver) Name

Name is for returning the name of this driver

func (*NASFlexGroupStorageDriver) Publish

func (d *NASFlexGroupStorageDriver) 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 (*NASFlexGroupStorageDriver) ReconcileNodeAccess

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

func (*NASFlexGroupStorageDriver) Rename

Rename changes the name of a volume

func (*NASFlexGroupStorageDriver) Resize

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

Resize expands the FlexGroup size.

func (*NASFlexGroupStorageDriver) RestoreSnapshot

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

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

func (*NASFlexGroupStorageDriver) StoreConfig

func (NASFlexGroupStorageDriver) String

func (d NASFlexGroupStorageDriver) String() string

String makes NASFlexGroupStorageDriver satisfy the Stringer interface.

func (*NASFlexGroupStorageDriver) Terminate

func (d *NASFlexGroupStorageDriver) Terminate(ctx context.Context, backendUUID string)

type NASQtreeStorageDriver

type NASQtreeStorageDriver struct {
	Config drivers.OntapStorageDriverConfig
	API    api.OntapAPI
	// contains filtered or unexported fields
}

NASQtreeStorageDriver is for NFS storage provisioning of qtrees

func (*NASQtreeStorageDriver) BackendName

func (d *NASQtreeStorageDriver) BackendName() string

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

func (*NASQtreeStorageDriver) CanSnapshot

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

func (*NASQtreeStorageDriver) Create

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

Create a qtree-backed volume with the specified options

func (*NASQtreeStorageDriver) CreateClone

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

CreateClone creates a volume clone

func (*NASQtreeStorageDriver) CreateFollowup

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

func (*NASQtreeStorageDriver) CreatePrepare

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

func (*NASQtreeStorageDriver) CreateSnapshot

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

CreateSnapshot creates a snapshot for the given volume

func (*NASQtreeStorageDriver) DeleteSnapshot

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

DeleteSnapshot creates a snapshot of a volume.

func (*NASQtreeStorageDriver) Destroy

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

Destroy the volume

func (*NASQtreeStorageDriver) FlexvolNamePrefix

func (d *NASQtreeStorageDriver) FlexvolNamePrefix() string

func (*NASQtreeStorageDriver) Get

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

Get tests for the existence of a volume

func (*NASQtreeStorageDriver) GetAPI

func (d *NASQtreeStorageDriver) GetAPI() api.OntapAPI

func (NASQtreeStorageDriver) GetCommonConfig

GetCommonConfig returns driver's CommonConfig

func (*NASQtreeStorageDriver) GetConfig

func (*NASQtreeStorageDriver) GetExternalConfig

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

func (*NASQtreeStorageDriver) GetInternalVolumeName

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

func (*NASQtreeStorageDriver) GetProtocol

func (*NASQtreeStorageDriver) GetSnapshot

GetSnapshot returns a snapshot of a volume, or an error if it does not exist.

func (*NASQtreeStorageDriver) GetSnapshots

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

GetSnapshots returns the list of snapshots associated with the specified volume

func (*NASQtreeStorageDriver) GetStorageBackendPhysicalPoolNames

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

GetStorageBackendPhysicalPoolNames retrieves storage backend physical pools

func (*NASQtreeStorageDriver) GetStorageBackendSpecs

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

GetStorageBackendSpecs retrieves storage backend capabilities

func (*NASQtreeStorageDriver) GetTelemetry

func (d *NASQtreeStorageDriver) GetTelemetry() *Telemetry

func (*NASQtreeStorageDriver) GetUpdateType

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

GetUpdateType returns a bitmap populated with updates to the driver

func (*NASQtreeStorageDriver) GetVolumeExternal

func (d *NASQtreeStorageDriver) 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 (*NASQtreeStorageDriver) GetVolumeExternalWrappers

func (d *NASQtreeStorageDriver) 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 (*NASQtreeStorageDriver) GetVolumeOpts

func (d *NASQtreeStorageDriver) GetVolumeOpts(
	ctx context.Context, volConfig *storage.VolumeConfig, requests map[string]sa.Request,
) (map[string]string, error)

func (NASQtreeStorageDriver) GoString

func (d NASQtreeStorageDriver) GoString() string

GoString makes NASQtreeStorageDriver satisfy the GoStringer interface.

func (*NASQtreeStorageDriver) Import

func (*NASQtreeStorageDriver) Initialize

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

Initialize from the provided config

func (*NASQtreeStorageDriver) Initialized

func (d *NASQtreeStorageDriver) Initialized() bool

func (*NASQtreeStorageDriver) Name

func (d *NASQtreeStorageDriver) Name() string

Name is for returning the name of this driver

func (*NASQtreeStorageDriver) Publish

func (d *NASQtreeStorageDriver) 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 (*NASQtreeStorageDriver) ReconcileNodeAccess

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

func (*NASQtreeStorageDriver) Rename

func (*NASQtreeStorageDriver) Resize

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

Resize expands the Flexvol containing the Qtree and updates the Qtree quota.

func (*NASQtreeStorageDriver) RestoreSnapshot

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

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

func (*NASQtreeStorageDriver) StoreConfig

func (NASQtreeStorageDriver) String

func (d NASQtreeStorageDriver) String() string

String makes NASQtreeStorageDriver satisfy the Stringer interface.

func (*NASQtreeStorageDriver) Terminate

func (d *NASQtreeStorageDriver) Terminate(ctx context.Context, backendUUID string)

type NASStorageDriver

type NASStorageDriver struct {
	Config drivers.OntapStorageDriverConfig
	API    api.OntapAPI
	// contains filtered or unexported fields
}

NASStorageDriver is for NFS storage provisioning

func (*NASStorageDriver) BackendName

func (d *NASStorageDriver) BackendName() string

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

func (*NASStorageDriver) CanSnapshot

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

func (*NASStorageDriver) Create

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

Create a volume with the specified options

func (*NASStorageDriver) CreateClone

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

CreateClone creates a volume clone

func (*NASStorageDriver) CreateFollowup

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

func (*NASStorageDriver) CreatePrepare

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

func (*NASStorageDriver) CreateSnapshot

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

CreateSnapshot creates a snapshot for the given volume

func (*NASStorageDriver) DeleteSnapshot

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

DeleteSnapshot creates a snapshot of a volume.

func (*NASStorageDriver) Destroy

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

Destroy the volume

func (*NASStorageDriver) EstablishMirror

func (d *NASStorageDriver) EstablishMirror(
	ctx context.Context, localVolumeHandle, remoteVolumeHandle, replicationPolicy, replicationSchedule string,
) error

EstablishMirror will create a new snapmirror relationship between a RW and a DP volume that have not previously had a relationship

func (*NASStorageDriver) Get

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

Get tests for the existence of a volume

func (*NASStorageDriver) GetAPI

func (d *NASStorageDriver) GetAPI() api.OntapAPI

func (NASStorageDriver) GetCommonConfig

GetCommonConfig returns driver's CommonConfig

func (*NASStorageDriver) GetConfig

func (*NASStorageDriver) GetExternalConfig

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

func (*NASStorageDriver) GetInternalVolumeName

func (d *NASStorageDriver) GetInternalVolumeName(_ context.Context, name string) string

func (*NASStorageDriver) GetMirrorStatus

func (d *NASStorageDriver) GetMirrorStatus(
	ctx context.Context, localVolumeHandle, remoteVolumeHandle string,
) (string, error)

GetMirrorStatus returns the current state of a snapmirror relationship

func (*NASStorageDriver) GetProtocol

func (*NASStorageDriver) GetReplicationDetails

func (d *NASStorageDriver) GetReplicationDetails(
	ctx context.Context, localVolumeHandle, remoteVolumeHandle string,
) (string, string, error)

GetReplicationDetails returns the replication policy and schedule of a snapmirror relationship

func (*NASStorageDriver) GetSnapshot

func (d *NASStorageDriver) 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 (*NASStorageDriver) GetSnapshots

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

GetSnapshots returns the list of snapshots associated with the specified volume

func (*NASStorageDriver) GetStorageBackendPhysicalPoolNames

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

GetStorageBackendPhysicalPoolNames retrieves storage backend physical pools

func (*NASStorageDriver) GetStorageBackendSpecs

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

GetStorageBackendSpecs retrieves storage backend capabilities

func (*NASStorageDriver) GetTelemetry

func (d *NASStorageDriver) GetTelemetry() *Telemetry

func (*NASStorageDriver) GetUpdateType

func (d *NASStorageDriver) GetUpdateType(ctx context.Context, driverOrig storage.Driver) *roaring.Bitmap

GetUpdateType returns a bitmap populated with updates to the driver

func (*NASStorageDriver) GetVolumeExternal

func (d *NASStorageDriver) 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 (*NASStorageDriver) GetVolumeExternalWrappers

func (d *NASStorageDriver) 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 (*NASStorageDriver) GetVolumeOpts

func (d *NASStorageDriver) GetVolumeOpts(
	ctx context.Context, volConfig *storage.VolumeConfig, requests map[string]sa.Request,
) (map[string]string, error)

func (NASStorageDriver) GoString

func (d NASStorageDriver) GoString() string

GoString makes NASStorageDriver satisfy the GoStringer interface.

func (*NASStorageDriver) Import

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

func (*NASStorageDriver) Initialize

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

Initialize from the provided config

func (*NASStorageDriver) Initialized

func (d *NASStorageDriver) Initialized() bool

func (*NASStorageDriver) Name

func (d *NASStorageDriver) Name() string

Name is for returning the name of this driver

func (*NASStorageDriver) PromoteMirror

func (d *NASStorageDriver) PromoteMirror(
	ctx context.Context, localVolumeHandle, remoteVolumeHandle, snapshotName string,
) (bool, error)

PromoteMirror will break the snapmirror and make the destination volume RW, optionally after a given snapshot has synced

func (*NASStorageDriver) Publish

func (d *NASStorageDriver) 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 (*NASStorageDriver) ReconcileNodeAccess

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

func (*NASStorageDriver) ReestablishMirror

func (d *NASStorageDriver) ReestablishMirror(
	ctx context.Context, localVolumeHandle, remoteVolumeHandle, replicationPolicy, replicationSchedule string,
) error

ReestablishMirror will attempt to resync a snapmirror relationship, if and only if the relationship existed previously

func (*NASStorageDriver) ReleaseMirror

func (d *NASStorageDriver) ReleaseMirror(ctx context.Context, localVolumeHandle string) error

ReleaseMirror will release the snapmirror relationship data of the source volume

func (*NASStorageDriver) Rename

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

Rename changes the name of a volume

func (*NASStorageDriver) Resize

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

Resize expands the volume size.

func (*NASStorageDriver) RestoreSnapshot

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

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

func (*NASStorageDriver) StoreConfig

func (NASStorageDriver) String

func (d NASStorageDriver) String() string

String makes NASStorageDriver satisfy the Stringer interface.

func (*NASStorageDriver) Terminate

func (d *NASStorageDriver) Terminate(ctx context.Context, backendUUID string)

type SANEconomyStorageDriver

type SANEconomyStorageDriver struct {
	Config drivers.OntapStorageDriverConfig

	API api.OntapAPI
	// contains filtered or unexported fields
}

SANEconomyStorageDriver is for iSCSI storage provisioning of LUNs

func (*SANEconomyStorageDriver) BackendName

func (d *SANEconomyStorageDriver) BackendName() string

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

func (*SANEconomyStorageDriver) CanSnapshot

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

func (*SANEconomyStorageDriver) Create

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

Create a volume+LUN with the specified options

func (*SANEconomyStorageDriver) CreateClone

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

CreateClone creates a volume clone

func (*SANEconomyStorageDriver) CreateFollowup

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

func (*SANEconomyStorageDriver) CreatePrepare

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

func (*SANEconomyStorageDriver) CreateSnapshot

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

CreateSnapshot creates a snapshot for the given volume.

func (*SANEconomyStorageDriver) DeleteBucketIfEmpty

func (d *SANEconomyStorageDriver) DeleteBucketIfEmpty(ctx context.Context, bucketVol string) error

DeleteBucketIfEmpty will check if the given bucket volume is empty, if the bucket is empty it will be deleted. Otherwise, it will be resized.

func (*SANEconomyStorageDriver) DeleteSnapshot

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

DeleteSnapshot deletes a LUN snapshot.

func (*SANEconomyStorageDriver) Destroy

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

Destroy the LUN

func (*SANEconomyStorageDriver) FlexvolNamePrefix

func (d *SANEconomyStorageDriver) FlexvolNamePrefix() string

func (*SANEconomyStorageDriver) Get

Get tests for the existence of a volume

func (*SANEconomyStorageDriver) GetAPI

func (d *SANEconomyStorageDriver) GetAPI() api.OntapAPI

func (*SANEconomyStorageDriver) GetChapInfo

func (SANEconomyStorageDriver) GetCommonConfig

GetCommonConfig returns driver's CommonConfig

func (*SANEconomyStorageDriver) GetConfig

func (*SANEconomyStorageDriver) GetExternalConfig

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

func (*SANEconomyStorageDriver) GetInternalVolumeName

func (d *SANEconomyStorageDriver) GetInternalVolumeName(_ context.Context, name string) string

func (*SANEconomyStorageDriver) GetProtocol

func (*SANEconomyStorageDriver) GetSnapshot

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 (*SANEconomyStorageDriver) GetSnapshots

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

func (*SANEconomyStorageDriver) GetStorageBackendPhysicalPoolNames

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

GetStorageBackendPhysicalPoolNames retrieves storage backend physical pools

func (*SANEconomyStorageDriver) GetStorageBackendSpecs

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

GetStorageBackendSpecs retrieves storage backend capabilities

func (*SANEconomyStorageDriver) GetTelemetry

func (d *SANEconomyStorageDriver) GetTelemetry() *Telemetry

func (*SANEconomyStorageDriver) GetUpdateType

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

GetUpdateType returns a bitmap populated with updates to the driver

func (*SANEconomyStorageDriver) GetVolumeExternal

func (d *SANEconomyStorageDriver) 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 (*SANEconomyStorageDriver) GetVolumeExternalWrappers

func (d *SANEconomyStorageDriver) 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 (*SANEconomyStorageDriver) GetVolumeOpts

func (d *SANEconomyStorageDriver) GetVolumeOpts(
	ctx context.Context, volConfig *storage.VolumeConfig, requests map[string]sa.Request,
) (map[string]string, error)

func (SANEconomyStorageDriver) GoString

func (d SANEconomyStorageDriver) GoString() string

GoString makes SANEconomyStorageDriver satisfy the GoStringer interface.

func (*SANEconomyStorageDriver) Import

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

func (*SANEconomyStorageDriver) Initialize

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

Initialize from the provided config

func (*SANEconomyStorageDriver) Initialized

func (d *SANEconomyStorageDriver) Initialized() bool

func (*SANEconomyStorageDriver) LUNExists

func (d *SANEconomyStorageDriver) LUNExists(ctx context.Context, name, bucketPrefix string) (bool, string, error)

LUNExists returns true if the named LUN exists across all buckets. This should be called with the actual LUN name, i.e. the internal volume name or snap-LUN name.

func (*SANEconomyStorageDriver) Name

func (d *SANEconomyStorageDriver) Name() string

Name is for returning the name of this driver

func (*SANEconomyStorageDriver) Publish

func (d *SANEconomyStorageDriver) 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 (*SANEconomyStorageDriver) ReconcileNodeAccess

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

func (*SANEconomyStorageDriver) Rename

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

func (*SANEconomyStorageDriver) Resize

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

Resize a LUN with the specified options and find (or create) a bucket volume for the LUN

func (*SANEconomyStorageDriver) RestoreSnapshot

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

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

func (*SANEconomyStorageDriver) StoreConfig

func (SANEconomyStorageDriver) String

func (d SANEconomyStorageDriver) String() string

String makes SANEconomyStorageDriver satisfy the Stringer interface.

func (*SANEconomyStorageDriver) Terminate

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

type SANStorageDriver

type SANStorageDriver struct {
	Config drivers.OntapStorageDriverConfig

	API api.OntapAPI
	// contains filtered or unexported fields
}

SANStorageDriver is for iSCSI storage provisioning

func (*SANStorageDriver) BackendName

func (d *SANStorageDriver) BackendName() string

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

func (*SANStorageDriver) CanSnapshot

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

func (*SANStorageDriver) Create

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

Create a volume+LUN with the specified options

func (*SANStorageDriver) CreateClone

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

CreateClone creates a volume clone

func (*SANStorageDriver) CreateFollowup

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

func (*SANStorageDriver) CreatePrepare

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

func (*SANStorageDriver) CreateSnapshot

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

CreateSnapshot creates a snapshot for the given volume

func (*SANStorageDriver) DeleteSnapshot

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

DeleteSnapshot creates a snapshot of a volume.

func (*SANStorageDriver) Destroy

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

Destroy the requested (volume,lun) storage tuple

func (*SANStorageDriver) EnablePublishEnforcement

func (d *SANStorageDriver) EnablePublishEnforcement(ctx context.Context, volume *storage.Volume) error

func (*SANStorageDriver) EstablishMirror

func (d *SANStorageDriver) EstablishMirror(
	ctx context.Context, localVolumeHandle, remoteVolumeHandle, replicationPolicy, replicationSchedule string,
) error

EstablishMirror will create a new snapmirror relationship between a RW and a DP volume that have not previously had a relationship

func (*SANStorageDriver) Get

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

Get tests for the existence of a volume

func (*SANStorageDriver) GetAPI

func (d *SANStorageDriver) GetAPI() api.OntapAPI

func (*SANStorageDriver) GetChapInfo

func (d *SANStorageDriver) GetChapInfo(_ context.Context, _, _ string) (*utils.IscsiChapInfo, error)

func (SANStorageDriver) GetCommonConfig

GetCommonConfig returns driver's CommonConfig

func (*SANStorageDriver) GetConfig

func (*SANStorageDriver) GetExternalConfig

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

func (*SANStorageDriver) GetInternalVolumeName

func (d *SANStorageDriver) GetInternalVolumeName(_ context.Context, name string) string

func (*SANStorageDriver) GetMirrorStatus

func (d *SANStorageDriver) GetMirrorStatus(
	ctx context.Context, localVolumeHandle, remoteVolumeHandle string,
) (string, error)

GetMirrorStatus returns the current state of a snapmirror relationship

func (*SANStorageDriver) GetProtocol

func (*SANStorageDriver) GetReplicationDetails

func (d *SANStorageDriver) GetReplicationDetails(
	ctx context.Context, localVolumeHandle, remoteVolumeHandle string,
) (string, string, error)

GetReplicationDetails returns the replication policy and schedule of a snapmirror relationship

func (*SANStorageDriver) GetSnapshot

func (d *SANStorageDriver) 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 (*SANStorageDriver) GetSnapshots

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

GetSnapshots returns the list of snapshots associated with the specified volume

func (*SANStorageDriver) GetStorageBackendPhysicalPoolNames

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

GetStorageBackendPhysicalPoolNames retrieves storage backend physical pools

func (*SANStorageDriver) GetStorageBackendSpecs

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

GetStorageBackendSpecs retrieves storage backend capabilities

func (*SANStorageDriver) GetTelemetry

func (d *SANStorageDriver) GetTelemetry() *Telemetry

func (*SANStorageDriver) GetUpdateType

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

GetUpdateType returns a bitmap populated with updates to the driver

func (*SANStorageDriver) GetVolumeExternal

func (d *SANStorageDriver) 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 (*SANStorageDriver) GetVolumeExternalWrappers

func (d *SANStorageDriver) 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 (*SANStorageDriver) GetVolumeOpts

func (d *SANStorageDriver) GetVolumeOpts(
	ctx context.Context, volConfig *storage.VolumeConfig, requests map[string]sa.Request,
) (map[string]string, error)

func (*SANStorageDriver) GoString

func (d *SANStorageDriver) GoString() string

GoString makes SANStorageDriver satisfy the GoStringer interface.

func (*SANStorageDriver) Import

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

func (*SANStorageDriver) Initialize

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

Initialize from the provided config

func (*SANStorageDriver) Initialized

func (d *SANStorageDriver) Initialized() bool

func (SANStorageDriver) Name

func (d SANStorageDriver) Name() string

Name is for returning the name of this driver

func (*SANStorageDriver) PromoteMirror

func (d *SANStorageDriver) PromoteMirror(
	ctx context.Context, localVolumeHandle, remoteVolumeHandle, snapshotName string,
) (bool, error)

PromoteMirror will break the snapmirror and make the destination volume RW, optionally after a given snapshot has synced

func (*SANStorageDriver) Publish

func (d *SANStorageDriver) 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 (*SANStorageDriver) ReconcileNodeAccess

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

func (*SANStorageDriver) ReestablishMirror

func (d *SANStorageDriver) ReestablishMirror(
	ctx context.Context, localVolumeHandle, remoteVolumeHandle, replicationPolicy, replicationSchedule string,
) error

ReestablishMirror will attempt to resync a snapmirror relationship, if and only if the relationship existed previously

func (*SANStorageDriver) ReleaseMirror

func (d *SANStorageDriver) ReleaseMirror(ctx context.Context, localVolumeHandle string) error

ReleaseMirror will release the snapmirror relationship data of the source volume

func (*SANStorageDriver) Rename

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

func (*SANStorageDriver) Resize

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

Resize expands the volume size.

func (*SANStorageDriver) RestoreSnapshot

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

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

func (*SANStorageDriver) StoreConfig

func (SANStorageDriver) String

func (d SANStorageDriver) String() string

String makes SANStorageDriver satisfy the Stringer interface.

func (*SANStorageDriver) Terminate

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

func (*SANStorageDriver) Unpublish

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

Unpublish the volume from 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.

type StorageDriver

type StorageDriver interface {
	GetConfig() *drivers.OntapStorageDriverConfig
	GetAPI() api.OntapAPI
	GetTelemetry() *Telemetry
	Name() string
}

type Telemetry

type Telemetry struct {
	config.Telemetry
	Plugin        string        `json:"plugin"`
	SVM           string        `json:"svm"`
	StoragePrefix string        `json:"storagePrefix"`
	Driver        StorageDriver `json:"-"`
	// contains filtered or unexported fields
}

func NewOntapTelemetry

func NewOntapTelemetry(ctx context.Context, d StorageDriver) *Telemetry

func (Telemetry) GoString

func (t Telemetry) GoString() string

GoString makes Telemetry satisfy the GoStringer interface.

func (*Telemetry) Start

func (t *Telemetry) Start(ctx context.Context)

Start starts the flow of ASUP messages for the driver These messages can be viewed via filer::> event log show -severity NOTICE.

func (*Telemetry) Stop

func (t *Telemetry) Stop()

func (Telemetry) String

func (t Telemetry) String() (out string)

String makes Telemetry satisfy the Stringer interface.

Directories

Path Synopsis
api
DO NOT EDIT: Auto generated using 'ifacemaker -f ontap_rest.go -s RestClient -i RestClientInterface -p api'
DO NOT EDIT: Auto generated using 'ifacemaker -f ontap_rest.go -s RestClient -i RestClientInterface -p api'

Jump to

Keyboard shortcuts

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