ontap

package
v19.10.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 25 Imported by: 21

Documentation

Overview

Copyright 2019 NetApp, Inc. All Rights Reserved.

Index

Constants

View Source
const (
	MinimumVolumeSizeBytes       = 20971520 // 20 MiB
	HousekeepingStartupDelaySecs = 10
)
View Source
const DefaultEncryption = "false"
View Source
const DefaultExportPolicy = "default"
View Source
const DefaultLimitAggregateUsage = ""
View Source
const DefaultLimitVolumeSize = ""
View Source
const DefaultNfsMountOptionsDocker = "-o nfsvers=3"
View Source
const DefaultNfsMountOptionsKubernetes = ""
View Source
const DefaultSecurityStyle = "unix"
View Source
const DefaultSnapshotDir = "false"
View Source
const DefaultSnapshotPolicy = "none"
View Source
const DefaultSnapshotReserve = ""
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 DefaultSpaceReserve = "none"
View Source
const DefaultSplitOnClone = "false"
View Source
const DefaultUnixPermissions = "---rwxrwxrwx"
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 CreateOntapClone

func CreateOntapClone(
	name, source, snapshot string, split bool, config *drivers.OntapStorageDriverConfig, client *api.Client,
) error

Create a volume clone

func CreateSnapshot

func CreateSnapshot(
	snapConfig *storage.SnapshotConfig, config *drivers.OntapStorageDriverConfig, client *api.Client,
	sizeGetter func(string) (int, error),
) (*storage.Snapshot, error)

CreateSnapshot creates a snapshot for the given volume.

func DeleteSnapshot

func DeleteSnapshot(
	snapConfig *storage.SnapshotConfig, config *drivers.OntapStorageDriverConfig, client *api.Client,
) error

DeleteSnapshot deletes a single snapshot.

func EMSHeartbeat

func EMSHeartbeat(driver StorageDriver)

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

func GetISCSITargetInfo

func GetISCSITargetInfo(
	clientAPI *api.Client, 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 string, volNameInternal string) string

func GetSnapshot

func GetSnapshot(
	snapConfig *storage.SnapshotConfig, config *drivers.OntapStorageDriverConfig, client *api.Client,
	sizeGetter func(string) (int, error),
) (*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 GetSnapshotReserve

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

func GetSnapshots

func GetSnapshots(
	volConfig *storage.VolumeConfig, config *drivers.OntapStorageDriverConfig, client *api.Client,
	sizeGetter func(string) (int, error),
) ([]*storage.Snapshot, error)

GetSnapshots returns the list of snapshots associated with the named volume.

func GetVolume

func GetVolume(name string, client *api.Client, config *drivers.OntapStorageDriverConfig) error

GetVolume checks for the existence of a volume. It returns nil if the volume exists and an error if it does not (or the API call fails).

func GetVolumeSize

func GetVolumeSize(sizeBytes uint64, config drivers.OntapStorageDriverConfig) (uint64, error)

func InitializeOntapAPI

func InitializeOntapAPI(config *drivers.OntapStorageDriverConfig) (*api.Client, error)

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

func InitializeOntapConfig

func InitializeOntapConfig(
	context tridentconfig.DriverContext, configJSON string, commonConfig *drivers.CommonStorageDriverConfig,
) (*drivers.OntapStorageDriverConfig, error)

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

func InitializeOntapDriver

func InitializeOntapDriver(config *drivers.OntapStorageDriverConfig) (*api.Client, 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(context tridentconfig.DriverContext, clientAPI *api.Client,
	config *drivers.OntapStorageDriverConfig, validate func() error) error

InitializeSANDriver performs common ONTAP SAN driver initialization.

func PopulateConfigurationDefaults

func PopulateConfigurationDefaults(config *drivers.OntapStorageDriverConfig) error

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

func PopulateOntapLunMapping

func PopulateOntapLunMapping(
	clientAPI *api.Client, config *drivers.OntapStorageDriverConfig,
	ips []string, volConfig *storage.VolumeConfig, lunID int,
) error

PopulateOntapLunMapping helper function to fill in volConfig with its LUN mapping values.

func PublishLUN

func PublishLUN(
	clientAPI *api.Client, config *drivers.OntapStorageDriverConfig, ips []string,
	publishInfo *utils.VolumePublishInfo, lunPath, igroupName string, 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.

func RestoreSnapshot

func RestoreSnapshot(
	snapConfig *storage.SnapshotConfig, config *drivers.OntapStorageDriverConfig, client *api.Client,
) error

Restore a volume (in place) from a snapshot.

func SplitVolumeFromBusySnapshot

func SplitVolumeFromBusySnapshot(
	snapConfig *storage.SnapshotConfig, config *drivers.OntapStorageDriverConfig, client *api.Client,
) 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(dataLIF string, dataLIFs []string) ([]string, error)

func ValidateNASDriver

func ValidateNASDriver(api *api.Client, config *drivers.OntapStorageDriverConfig) error

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

func ValidateSANDriver

func ValidateSANDriver(api *api.Client, config *drivers.OntapStorageDriverConfig, ips []string) error

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

Types

type HousekeepingTask

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

func NewPruneTask

func NewPruneTask(d *NASQtreeStorageDriver, tasks []func()) *HousekeepingTask

func NewResizeTask

func NewResizeTask(d *NASQtreeStorageDriver, tasks []func()) *HousekeepingTask

func (*HousekeepingTask) Start

func (t *HousekeepingTask) Start()

func (*HousekeepingTask) Stop

func (t *HousekeepingTask) Stop()

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) GetInternalSnapshotName

func (o *LUNHelper) GetInternalSnapshotName(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) 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) 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(volName string) string

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

func (*LUNHelper) GetSnapshotName

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

volName is expected not to have the storage prefix included parameters: volName=my-Lun snapName=my-Snapshot output: storagePrefix_my_Lun_snapshot_my_Snapshot parameters: volName=my-Lun snapName=snapshot-123 output: storagePrefix_my_Lun_snapshot_snapshot_123

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) GetVolumeName

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

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

func (*LUNHelper) IsValidSnapLUNPath

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

identifies if the given snapLunPath has a valid snapshot name

type NASFlexGroupStorageDriver

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

NASFlexGroupStorageDriver is for NFS FlexGroup storage provisioning

func (*NASFlexGroupStorageDriver) Create

func (d *NASFlexGroupStorageDriver) Create(
	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(volConfig *storage.VolumeConfig) error

CreateClone creates a volume clone

func (*NASFlexGroupStorageDriver) CreateFollowup

func (d *NASFlexGroupStorageDriver) CreateFollowup(volConfig *storage.VolumeConfig) error

func (*NASFlexGroupStorageDriver) CreatePrepare

func (d *NASFlexGroupStorageDriver) CreatePrepare(volConfig *storage.VolumeConfig) error

func (*NASFlexGroupStorageDriver) CreateSnapshot

func (d *NASFlexGroupStorageDriver) CreateSnapshot(snapConfig *storage.SnapshotConfig) (*storage.Snapshot, error)

CreateSnapshot creates a snapshot for the given volume

func (*NASFlexGroupStorageDriver) DeleteSnapshot

func (d *NASFlexGroupStorageDriver) DeleteSnapshot(snapConfig *storage.SnapshotConfig) error

DeleteSnapshot creates a snapshot of a volume.

func (*NASFlexGroupStorageDriver) Destroy

func (d *NASFlexGroupStorageDriver) Destroy(name string) error

Destroy the volume

func (*NASFlexGroupStorageDriver) Get

func (d *NASFlexGroupStorageDriver) Get(name string) error

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

func (*NASFlexGroupStorageDriver) GetAPI

func (d *NASFlexGroupStorageDriver) GetAPI() *api.Client

func (*NASFlexGroupStorageDriver) GetConfig

func (*NASFlexGroupStorageDriver) GetExternalConfig

func (d *NASFlexGroupStorageDriver) GetExternalConfig() interface{}

func (*NASFlexGroupStorageDriver) GetInternalVolumeName

func (d *NASFlexGroupStorageDriver) GetInternalVolumeName(name string) string

func (*NASFlexGroupStorageDriver) GetProtocol

func (*NASFlexGroupStorageDriver) GetSnapshot

func (d *NASFlexGroupStorageDriver) GetSnapshot(snapConfig *storage.SnapshotConfig) (*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 (*NASFlexGroupStorageDriver) GetSnapshots

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

Return the list of snapshots associated with the specified volume

func (*NASFlexGroupStorageDriver) GetStorageBackendSpecs

func (d *NASFlexGroupStorageDriver) GetStorageBackendSpecs(backend *storage.Backend) error

Retrieve storage backend capabilities

func (*NASFlexGroupStorageDriver) GetTelemetry

func (d *NASFlexGroupStorageDriver) GetTelemetry() *Telemetry

func (*NASFlexGroupStorageDriver) GetUpdateType

func (d *NASFlexGroupStorageDriver) GetUpdateType(driverOrig storage.Driver) *roaring.Bitmap

GetUpdateType returns a bitmap populated with updates to the driver

func (*NASFlexGroupStorageDriver) GetVolumeExternal

func (d *NASFlexGroupStorageDriver) GetVolumeExternal(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(
	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(
	volConfig *storage.VolumeConfig,
	pool *storage.Pool,
	requests map[string]sa.Request,
) (map[string]string, error)

func (*NASFlexGroupStorageDriver) Import

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

Import brings an existing volume under trident's control

func (*NASFlexGroupStorageDriver) Initialize

func (d *NASFlexGroupStorageDriver) Initialize(
	context tridentconfig.DriverContext, configJSON string, commonConfig *drivers.CommonStorageDriverConfig,
) 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(name string, 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) Rename

func (d *NASFlexGroupStorageDriver) Rename(name string, newName string) error

Rename changes the name of a volume

func (*NASFlexGroupStorageDriver) Resize

func (d *NASFlexGroupStorageDriver) Resize(volConfig *storage.VolumeConfig, sizeBytes uint64) error

Resize expands the FlexGroup size.

func (*NASFlexGroupStorageDriver) RestoreSnapshot

func (d *NASFlexGroupStorageDriver) RestoreSnapshot(snapConfig *storage.SnapshotConfig) error

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

func (*NASFlexGroupStorageDriver) StoreConfig

func (*NASFlexGroupStorageDriver) Terminate

func (d *NASFlexGroupStorageDriver) Terminate()

type NASQtreeStorageDriver

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

NASQtreeStorageDriver is for NFS storage provisioning of qtrees

func (*NASQtreeStorageDriver) Create

func (d *NASQtreeStorageDriver) Create(
	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(volConfig *storage.VolumeConfig) error

Create a volume clone

func (*NASQtreeStorageDriver) CreateFollowup

func (d *NASQtreeStorageDriver) CreateFollowup(volConfig *storage.VolumeConfig) error

func (*NASQtreeStorageDriver) CreatePrepare

func (d *NASQtreeStorageDriver) CreatePrepare(volConfig *storage.VolumeConfig) error

func (*NASQtreeStorageDriver) CreateSnapshot

func (d *NASQtreeStorageDriver) CreateSnapshot(snapConfig *storage.SnapshotConfig) (*storage.Snapshot, error)

CreateSnapshot creates a snapshot for the given volume

func (*NASQtreeStorageDriver) DeleteSnapshot

func (d *NASQtreeStorageDriver) DeleteSnapshot(snapConfig *storage.SnapshotConfig) error

DeleteSnapshot creates a snapshot of a volume.

func (*NASQtreeStorageDriver) Destroy

func (d *NASQtreeStorageDriver) Destroy(name string) error

Destroy the volume

func (*NASQtreeStorageDriver) FlexvolNamePrefix

func (d *NASQtreeStorageDriver) FlexvolNamePrefix() string

func (*NASQtreeStorageDriver) Get

func (d *NASQtreeStorageDriver) Get(name string) error

Test for the existence of a volume

func (*NASQtreeStorageDriver) GetAPI

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

func (*NASQtreeStorageDriver) GetConfig

func (*NASQtreeStorageDriver) GetExternalConfig

func (d *NASQtreeStorageDriver) GetExternalConfig() interface{}

func (*NASQtreeStorageDriver) GetInternalVolumeName

func (d *NASQtreeStorageDriver) GetInternalVolumeName(name string) string

func (*NASQtreeStorageDriver) GetProtocol

func (d *NASQtreeStorageDriver) GetProtocol() tridentconfig.Protocol

func (*NASQtreeStorageDriver) GetSnapshot

func (d *NASQtreeStorageDriver) GetSnapshot(snapConfig *storage.SnapshotConfig) (*storage.Snapshot, error)

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

func (*NASQtreeStorageDriver) GetSnapshots

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

Return the list of snapshots associated with the specified volume

func (*NASQtreeStorageDriver) GetStorageBackendSpecs

func (d *NASQtreeStorageDriver) GetStorageBackendSpecs(backend *storage.Backend) error

Retrieve storage backend capabilities

func (*NASQtreeStorageDriver) GetTelemetry

func (d *NASQtreeStorageDriver) GetTelemetry() *Telemetry

func (*NASQtreeStorageDriver) GetUpdateType

func (d *NASQtreeStorageDriver) GetUpdateType(driverOrig storage.Driver) *roaring.Bitmap

GetUpdateType returns a bitmap populated with updates to the driver

func (*NASQtreeStorageDriver) GetVolumeExternal

func (d *NASQtreeStorageDriver) GetVolumeExternal(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(
	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(
	volConfig *storage.VolumeConfig,
	pool *storage.Pool,
	requests map[string]sa.Request,
) (map[string]string, error)

func (*NASQtreeStorageDriver) Import

func (d *NASQtreeStorageDriver) Import(volConfig *storage.VolumeConfig, originalName string) error

func (*NASQtreeStorageDriver) Initialize

func (d *NASQtreeStorageDriver) Initialize(
	context tridentconfig.DriverContext, configJSON string, commonConfig *drivers.CommonStorageDriverConfig,
) 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(name string, 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) Rename

func (d *NASQtreeStorageDriver) Rename(name string, newName string) error

func (*NASQtreeStorageDriver) Resize

func (d *NASQtreeStorageDriver) Resize(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(snapConfig *storage.SnapshotConfig) error

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

func (*NASQtreeStorageDriver) StoreConfig

func (*NASQtreeStorageDriver) Terminate

func (d *NASQtreeStorageDriver) Terminate()

type NASStorageDriver

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

NASStorageDriver is for NFS storage provisioning

func (*NASStorageDriver) Create

func (d *NASStorageDriver) Create(
	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(volConfig *storage.VolumeConfig) error

Create a volume clone

func (*NASStorageDriver) CreateFollowup

func (d *NASStorageDriver) CreateFollowup(volConfig *storage.VolumeConfig) error

func (*NASStorageDriver) CreatePrepare

func (d *NASStorageDriver) CreatePrepare(volConfig *storage.VolumeConfig) error

func (*NASStorageDriver) CreateSnapshot

func (d *NASStorageDriver) CreateSnapshot(snapConfig *storage.SnapshotConfig) (*storage.Snapshot, error)

CreateSnapshot creates a snapshot for the given volume

func (*NASStorageDriver) DeleteSnapshot

func (d *NASStorageDriver) DeleteSnapshot(snapConfig *storage.SnapshotConfig) error

DeleteSnapshot creates a snapshot of a volume.

func (*NASStorageDriver) Destroy

func (d *NASStorageDriver) Destroy(name string) error

Destroy the volume

func (*NASStorageDriver) Get

func (d *NASStorageDriver) Get(name string) error

Test for the existence of a volume

func (*NASStorageDriver) GetAPI

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

func (*NASStorageDriver) GetConfig

func (*NASStorageDriver) GetExternalConfig

func (d *NASStorageDriver) GetExternalConfig() interface{}

func (*NASStorageDriver) GetInternalVolumeName

func (d *NASStorageDriver) GetInternalVolumeName(name string) string

func (*NASStorageDriver) GetProtocol

func (d *NASStorageDriver) GetProtocol() tridentconfig.Protocol

func (*NASStorageDriver) GetSnapshot

func (d *NASStorageDriver) GetSnapshot(snapConfig *storage.SnapshotConfig) (*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(volConfig *storage.VolumeConfig) ([]*storage.Snapshot, error)

Return the list of snapshots associated with the specified volume

func (*NASStorageDriver) GetStorageBackendSpecs

func (d *NASStorageDriver) GetStorageBackendSpecs(backend *storage.Backend) error

Retrieve storage backend capabilities

func (*NASStorageDriver) GetTelemetry

func (d *NASStorageDriver) GetTelemetry() *Telemetry

func (*NASStorageDriver) GetUpdateType

func (d *NASStorageDriver) GetUpdateType(driverOrig storage.Driver) *roaring.Bitmap

GetUpdateType returns a bitmap populated with updates to the driver

func (*NASStorageDriver) GetVolumeExternal

func (d *NASStorageDriver) GetVolumeExternal(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(
	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(
	volConfig *storage.VolumeConfig,
	pool *storage.Pool,
	requests map[string]sa.Request,
) (map[string]string, error)

func (*NASStorageDriver) Import

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

func (*NASStorageDriver) Initialize

func (d *NASStorageDriver) Initialize(
	context tridentconfig.DriverContext, configJSON string, commonConfig *drivers.CommonStorageDriverConfig,
) 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) Publish

func (d *NASStorageDriver) Publish(name string, 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) Rename

func (d *NASStorageDriver) Rename(name string, new_name string) error

Rename changes the name of a volume

func (*NASStorageDriver) Resize

func (d *NASStorageDriver) Resize(volConfig *storage.VolumeConfig, sizeBytes uint64) error

Resize expands the volume size.

func (*NASStorageDriver) RestoreSnapshot

func (d *NASStorageDriver) RestoreSnapshot(snapConfig *storage.SnapshotConfig) error

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

func (*NASStorageDriver) StoreConfig

func (*NASStorageDriver) Terminate

func (d *NASStorageDriver) Terminate()

type SANEconomyStorageDriver

type SANEconomyStorageDriver struct {
	Config drivers.OntapStorageDriverConfig

	API       *api.Client
	Telemetry *Telemetry
	// contains filtered or unexported fields
}

SANEconomyStorageDriver is for iSCSI storage provisioning of LUNs

func (*SANEconomyStorageDriver) Create

func (d *SANEconomyStorageDriver) Create(
	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(volConfig *storage.VolumeConfig) error

Create a volume clone

func (*SANEconomyStorageDriver) CreateFollowup

func (d *SANEconomyStorageDriver) CreateFollowup(volConfig *storage.VolumeConfig) error

func (*SANEconomyStorageDriver) CreatePrepare

func (d *SANEconomyStorageDriver) CreatePrepare(volConfig *storage.VolumeConfig) error

func (*SANEconomyStorageDriver) CreateSnapshot

func (d *SANEconomyStorageDriver) CreateSnapshot(snapConfig *storage.SnapshotConfig) (*storage.Snapshot, error)

CreateSnapshot creates a snapshot for the given volume.

func (*SANEconomyStorageDriver) DeleteBucketIfEmpty

func (d *SANEconomyStorageDriver) DeleteBucketIfEmpty(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(snapConfig *storage.SnapshotConfig) error

DeleteSnapshot deletes a LUN snapshot.

func (*SANEconomyStorageDriver) Destroy

func (d *SANEconomyStorageDriver) Destroy(name string) error

Destroy the LUN

func (*SANEconomyStorageDriver) FlexvolNamePrefix

func (d *SANEconomyStorageDriver) FlexvolNamePrefix() string

func (*SANEconomyStorageDriver) Get

func (d *SANEconomyStorageDriver) Get(name string) error

Test for the existence of a volume

func (*SANEconomyStorageDriver) GetAPI

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

func (*SANEconomyStorageDriver) GetConfig

func (*SANEconomyStorageDriver) GetExternalConfig

func (d *SANEconomyStorageDriver) GetExternalConfig() interface{}

func (*SANEconomyStorageDriver) GetInternalVolumeName

func (d *SANEconomyStorageDriver) GetInternalVolumeName(name string) string

func (*SANEconomyStorageDriver) GetProtocol

func (*SANEconomyStorageDriver) GetSnapshot

func (d *SANEconomyStorageDriver) GetSnapshot(snapConfig *storage.SnapshotConfig) (*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 (*SANEconomyStorageDriver) GetSnapshots

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

func (*SANEconomyStorageDriver) GetStorageBackendSpecs

func (d *SANEconomyStorageDriver) GetStorageBackendSpecs(backend *storage.Backend) error

Retrieve storage backend capabilities

func (*SANEconomyStorageDriver) GetTelemetry

func (d *SANEconomyStorageDriver) GetTelemetry() *Telemetry

func (*SANEconomyStorageDriver) GetUpdateType

func (d *SANEconomyStorageDriver) GetUpdateType(driverOrig storage.Driver) *roaring.Bitmap

GetUpdateType returns a bitmap populated with updates to the driver

func (*SANEconomyStorageDriver) GetVolumeExternal

func (d *SANEconomyStorageDriver) GetVolumeExternal(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(
	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(
	volConfig *storage.VolumeConfig, pool *storage.Pool, requests map[string]sa.Request,
) (map[string]string, error)

func (*SANEconomyStorageDriver) Import

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

func (*SANEconomyStorageDriver) Initialize

func (d *SANEconomyStorageDriver) Initialize(
	context tridentconfig.DriverContext, configJSON string, commonConfig *drivers.CommonStorageDriverConfig,
) error

Initialize from the provided config

func (*SANEconomyStorageDriver) Initialized

func (d *SANEconomyStorageDriver) Initialized() bool

func (*SANEconomyStorageDriver) LUNExists

func (d *SANEconomyStorageDriver) LUNExists(volName, bucketPrefix string) (bool, string, error)

LUNExists returns true if the named LUN exists across all buckets

func (*SANEconomyStorageDriver) Name

func (d *SANEconomyStorageDriver) Name() string

Name is for returning the name of this driver

func (*SANEconomyStorageDriver) Publish

func (d *SANEconomyStorageDriver) Publish(name string, 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) Rename

func (d *SANEconomyStorageDriver) Rename(name string, newName string) error

func (*SANEconomyStorageDriver) Resize

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

Resize expands the Flexvol containing the LUN and updates the LUN size

func (*SANEconomyStorageDriver) RestoreSnapshot

func (d *SANEconomyStorageDriver) RestoreSnapshot(snapConfig *storage.SnapshotConfig) error

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

func (*SANEconomyStorageDriver) StoreConfig

func (*SANEconomyStorageDriver) Terminate

func (d *SANEconomyStorageDriver) Terminate()

type SANStorageDriver

type SANStorageDriver struct {
	Config drivers.OntapStorageDriverConfig

	API       *api.Client
	Telemetry *Telemetry
	// contains filtered or unexported fields
}

SANStorageDriver is for iSCSI storage provisioning

func (*SANStorageDriver) Create

func (d *SANStorageDriver) Create(
	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(volConfig *storage.VolumeConfig) error

Create a volume clone

func (*SANStorageDriver) CreateFollowup

func (d *SANStorageDriver) CreateFollowup(volConfig *storage.VolumeConfig) error

func (*SANStorageDriver) CreatePrepare

func (d *SANStorageDriver) CreatePrepare(volConfig *storage.VolumeConfig) error

func (*SANStorageDriver) CreateSnapshot

func (d *SANStorageDriver) CreateSnapshot(snapConfig *storage.SnapshotConfig) (*storage.Snapshot, error)

CreateSnapshot creates a snapshot for the given volume

func (*SANStorageDriver) DeleteSnapshot

func (d *SANStorageDriver) DeleteSnapshot(snapConfig *storage.SnapshotConfig) error

DeleteSnapshot creates a snapshot of a volume.

func (*SANStorageDriver) Destroy

func (d *SANStorageDriver) Destroy(name string) error

Destroy the requested (volume,lun) storage tuple

func (*SANStorageDriver) Get

func (d *SANStorageDriver) Get(name string) error

Test for the existence of a volume

func (*SANStorageDriver) GetAPI

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

func (*SANStorageDriver) GetConfig

func (*SANStorageDriver) GetExternalConfig

func (d *SANStorageDriver) GetExternalConfig() interface{}

func (*SANStorageDriver) GetInternalVolumeName

func (d *SANStorageDriver) GetInternalVolumeName(name string) string

func (*SANStorageDriver) GetProtocol

func (d *SANStorageDriver) GetProtocol() tridentconfig.Protocol

func (*SANStorageDriver) GetSnapshot

func (d *SANStorageDriver) GetSnapshot(snapConfig *storage.SnapshotConfig) (*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(volConfig *storage.VolumeConfig) ([]*storage.Snapshot, error)

Return the list of snapshots associated with the specified volume

func (*SANStorageDriver) GetStorageBackendSpecs

func (d *SANStorageDriver) GetStorageBackendSpecs(backend *storage.Backend) error

Retrieve storage backend capabilities

func (*SANStorageDriver) GetTelemetry

func (d *SANStorageDriver) GetTelemetry() *Telemetry

func (*SANStorageDriver) GetUpdateType

func (d *SANStorageDriver) GetUpdateType(driverOrig storage.Driver) *roaring.Bitmap

GetUpdateType returns a bitmap populated with updates to the driver

func (*SANStorageDriver) GetVolumeExternal

func (d *SANStorageDriver) GetVolumeExternal(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(
	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(
	volConfig *storage.VolumeConfig,
	pool *storage.Pool,
	requests map[string]sa.Request,
) (map[string]string, error)

func (*SANStorageDriver) Import

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

func (*SANStorageDriver) Initialize

func (d *SANStorageDriver) Initialize(
	context tridentconfig.DriverContext, configJSON string, commonConfig *drivers.CommonStorageDriverConfig,
) 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) Publish

func (d *SANStorageDriver) Publish(name string, 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) Rename

func (d *SANStorageDriver) Rename(name string, newName string) error

func (*SANStorageDriver) Resize

func (d *SANStorageDriver) Resize(volConfig *storage.VolumeConfig, sizeBytes uint64) error

Resize expands the volume size.

func (*SANStorageDriver) RestoreSnapshot

func (d *SANStorageDriver) RestoreSnapshot(snapConfig *storage.SnapshotConfig) error

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

func (*SANStorageDriver) StoreConfig

func (*SANStorageDriver) Terminate

func (d *SANStorageDriver) Terminate()

type StorageDriver

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

type Telemetry

type Telemetry struct {
	tridentconfig.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(d StorageDriver) *Telemetry

func (*Telemetry) Start

func (t *Telemetry) Start()

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()

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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