storagedrivers

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

Documentation

Overview

Copyright 2019 NetApp, Inc. All Rights Reserved.

Index

Constants

View Source
const (
	EseriesIscsiStorageDriverName      = "eseries-iscsi"
	OntapNASStorageDriverName          = "ontap-nas"
	OntapNASFlexGroupStorageDriverName = "ontap-nas-flexgroup"
	OntapNASQtreeStorageDriverName     = "ontap-nas-economy"
	OntapSANStorageDriverName          = "ontap-san"
	OntapSANEconomyStorageDriverName   = "ontap-san-economy"
	SolidfireSANStorageDriverName      = "solidfire-san"
	AWSNFSStorageDriverName            = "aws-cvs"
	AzureNFSStorageDriverName          = "azure-netapp-files"
	GCPNFSStorageDriverName            = "gcp-cvs"
	FakeStorageDriverName              = "fake"
)

Storage driver names specified in the config file, etc.

View Source
const (
	FsXfs  = "xfs"
	FsExt3 = "ext3"
	FsExt4 = "ext4"
	FsRaw  = "raw"
)

Filesystem types

View Source
const ConfigVersion = 1

ConfigVersion is the expected version specified in the config file

View Source
const DefaultDockerIgroupName = "netappdvp"

Default SAN igroup / host group names

View Source
const DefaultDockerStoragePrefix = "netappdvp_"

Default storage prefix

View Source
const DefaultFileSystemType = FsExt4

Default Filesystem value

View Source
const DefaultTridentIgroupName = "trident"
View Source
const DefaultTridentStoragePrefix = "trident_"
View Source
const DefaultVolumeSize = "1G"
View Source
const UnsetPool = ""

Variables

This section is empty.

Functions

func CheckSupportedFilesystem

func CheckSupportedFilesystem(fs string, volumeInternalName string) (string, error)

CheckSupportedFilesystem checks for a supported file system type

func CheckVolumeSizeLimits

func CheckVolumeSizeLimits(requestedSizeInt uint64, config *CommonStorageDriverConfig) (bool, uint64, error)

CheckVolumeSizeLimits if a limit has been set, ensures the requestedSize is under it.

func Clone

func Clone(source, destination interface{})

Clone will create a copy of the source object and store it into the destination object (which must be a pointer)

func GetCommonInternalVolumeName

func GetCommonInternalVolumeName(c *CommonStorageDriverConfig, name string) string

func GetDefaultIgroupName

func GetDefaultIgroupName(context trident.DriverContext) string

func GetDefaultStoragePrefix

func GetDefaultStoragePrefix(context trident.DriverContext) string

func IsBackendIneligibleError

func IsBackendIneligibleError(err error) bool

func IsVolumeExistsError

func IsVolumeExistsError(err error) bool

func NewBackendIneligibleError

func NewBackendIneligibleError(volumeName string, errors []error) error

func NewSnapshotsNotSupportedError

func NewSnapshotsNotSupportedError(backendType string) error

func NewVolumeExistsError

func NewVolumeExistsError(name string) error

func SanitizeCommonStorageDriverConfig

func SanitizeCommonStorageDriverConfig(c *CommonStorageDriverConfig)

Types

type AWSNFSStorageDriverConfig

type AWSNFSStorageDriverConfig struct {
	*CommonStorageDriverConfig
	APIURL          string `json:"apiURL"`
	APIKey          string `json:"apiKey"`
	APIRegion       string `json:"apiRegion"`
	SecretKey       string `json:"secretKey"`
	ProxyURL        string `json:"proxyURL"`
	NfsMountOptions string `json:"nfsMountOptions"`
	AWSNFSStorageDriverPool
	Storage []AWSNFSStorageDriverPool `json:"storage"`
}

type AWSNFSStorageDriverConfigDefaults

type AWSNFSStorageDriverConfigDefaults struct {
	ExportRule      string `json:"exportRule"`
	SnapshotDir     string `json:"snapshotDir"`
	SnapshotReserve string `json:"snapshotReserve"`
	CommonStorageDriverConfigDefaults
}

type AWSNFSStorageDriverPool

type AWSNFSStorageDriverPool struct {
	Labels                            map[string]string `json:"labels"`
	Region                            string            `json:"region"`
	Zone                              string            `json:"zone"`
	ServiceLevel                      string            `json:"serviceLevel"`
	AWSNFSStorageDriverConfigDefaults `json:"defaults"`
}

type AzureNFSStorageDriverConfig

type AzureNFSStorageDriverConfig struct {
	*CommonStorageDriverConfig
	SubscriptionID  string `json:"subscriptionID"`
	TenantID        string `json:"tenantID"`
	ClientID        string `json:"clientID"`
	ClientSecret    string `json:"clientSecret"`
	NfsMountOptions string `json:"nfsMountOptions"`
	AzureNFSStorageDriverPool
	Storage []AzureNFSStorageDriverPool `json:"storage"`
}

type AzureNFSStorageDriverConfigDefaults

type AzureNFSStorageDriverConfigDefaults struct {
	ExportRule string `json:"exportRule"`
	CommonStorageDriverConfigDefaults
}

type AzureNFSStorageDriverPool

type AzureNFSStorageDriverPool struct {
	Labels                              map[string]string `json:"labels"`
	Region                              string            `json:"region"`
	Zone                                string            `json:"zone"`
	Location                            string            `json:"location"`
	ServiceLevel                        string            `json:"serviceLevel"`
	VirtualNetwork                      string            `json:"virtualNetwork"`
	Subnet                              string            `json:"subnet"`
	AzureNFSStorageDriverConfigDefaults `json:"defaults"`
}

Note that 'Region' and 'Zone' are internal specifiers, not related to Azure's 'Location' field.

type BackendIneligibleError

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

func (*BackendIneligibleError) Error

func (e *BackendIneligibleError) Error() string

type CommonStorageDriverConfig

type CommonStorageDriverConfig struct {
	Version           int                   `json:"version"`
	StorageDriverName string                `json:"storageDriverName"`
	BackendName       string                `json:"backendName"`
	Debug             bool                  `json:"debug"`           // Unsupported!
	DebugTraceFlags   map[string]bool       `json:"debugTraceFlags"` // Example: {"api":false, "method":true}
	DisableDelete     bool                  `json:"disableDelete"`
	StoragePrefixRaw  json.RawMessage       `json:"storagePrefix,string"`
	StoragePrefix     *string               `json:"-"`
	SerialNumbers     []string              `json:"serialNumbers,omitEmpty"`
	DriverContext     trident.DriverContext `json:"-"`
	LimitVolumeSize   string                `json:"limitVolumeSize"`
}

CommonStorageDriverConfig holds settings in common across all StorageDrivers

func ValidateCommonSettings

func ValidateCommonSettings(configJSON string) (*CommonStorageDriverConfig, error)

ValidateCommonSettings attempts to "partially" decode the JSON into just the settings in CommonStorageDriverConfig

type CommonStorageDriverConfigDefaults

type CommonStorageDriverConfigDefaults struct {
	Size string `json:"size"`
}

type ESeriesStorageDriverConfig

type ESeriesStorageDriverConfig struct {
	*CommonStorageDriverConfig

	// Web Proxy Services Info
	WebProxyHostname  string `json:"webProxyHostname"`
	WebProxyPort      string `json:"webProxyPort"`      // optional
	WebProxyUseHTTP   bool   `json:"webProxyUseHTTP"`   // optional
	WebProxyVerifyTLS bool   `json:"webProxyVerifyTLS"` // optional
	Username          string `json:"username"`
	Password          string `json:"password"`

	// Array Info
	ControllerA   string `json:"controllerA"`
	ControllerB   string `json:"controllerB"`
	PasswordArray string `json:"passwordArray"` //optional

	// Options
	PoolNameSearchPattern string `json:"poolNameSearchPattern"` //optional

	// Host Networking
	HostDataIPDeprecated string `json:"hostData_IP,omitempty"` // for backward compatibility only
	HostDataIP           string `json:"hostDataIP"`            // for iSCSI can be either port if multipathing is setup
	AccessGroup          string `json:"accessGroupName"`       // name for host group
	HostType             string `json:"hostType"`              // host type, default is 'linux_dm_mp'

	EseriesStorageDriverPool
	Storage []EseriesStorageDriverPool `json:"storage"`
}

ESeriesStorageDriverConfig holds settings for ESeriesStorageDriver

type EseriesStorageDriverConfigDefaults

type EseriesStorageDriverConfigDefaults struct {
	CommonStorageDriverConfigDefaults
}

type EseriesStorageDriverPool

type EseriesStorageDriverPool struct {
	Labels                             map[string]string `json:"labels"`
	Region                             string            `json:"region"`
	Zone                               string            `json:"zone"`
	EseriesStorageDriverConfigDefaults `json:"defaults"`
}

type FakeStorageDriverConfig

type FakeStorageDriverConfig struct {
	*CommonStorageDriverConfig
	Protocol trident.Protocol `json:"protocol"`
	// Pools are the modeled physical pools.  At least one is required.
	Pools map[string]*fake.StoragePool `json:"pools"`
	// Volumes are the modeled backend volumes that exist when the driver starts.  Optional.
	Volumes      []fake.Volume `json:"volumes"`
	InstanceName string        `json:"instanceName"`
	FakeStorageDriverPool
	Storage []FakeStorageDriverPool `json:"storage"`
}

type FakeStorageDriverConfigDefaults

type FakeStorageDriverConfigDefaults struct {
	CommonStorageDriverConfigDefaults
}

type FakeStorageDriverPool

type FakeStorageDriverPool struct {
	Labels                          map[string]string `json:"labels"`
	Region                          string            `json:"region"`
	Zone                            string            `json:"zone"`
	FakeStorageDriverConfigDefaults `json:"defaults"`
}

type GCPNFSStorageDriverConfig

type GCPNFSStorageDriverConfig struct {
	*CommonStorageDriverConfig
	ProjectNumber   string        `json:"projectNumber"`
	APIKey          GCPPrivateKey `json:"apiKey"`
	APIRegion       string        `json:"apiRegion"`
	ProxyURL        string        `json:"proxyURL"`
	NfsMountOptions string        `json:"nfsMountOptions"`
	GCPNFSStorageDriverPool
	Storage []GCPNFSStorageDriverPool `json:"storage"`
}

type GCPNFSStorageDriverConfigDefaults

type GCPNFSStorageDriverConfigDefaults struct {
	ExportRule      string `json:"exportRule"`
	SnapshotDir     string `json:"snapshotDir"`
	SnapshotReserve string `json:"snapshotReserve"`
	CommonStorageDriverConfigDefaults
}

type GCPNFSStorageDriverPool

type GCPNFSStorageDriverPool struct {
	Labels                            map[string]string `json:"labels"`
	Region                            string            `json:"region"`
	Zone                              string            `json:"zone"`
	ServiceLevel                      string            `json:"serviceLevel"`
	Network                           string            `json:"network"`
	GCPNFSStorageDriverConfigDefaults `json:"defaults"`
}

type GCPPrivateKey

type GCPPrivateKey struct {
	Type                    string `json:"type"`
	ProjectID               string `json:"project_id"`
	PrivateKeyID            string `json:"private_key_id"`
	PrivateKey              string `json:"private_key"`
	ClientEmail             string `json:"client_email"`
	ClientID                string `json:"client_id"`
	AuthURI                 string `json:"auth_uri"`
	TokenURI                string `json:"token_uri"`
	AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url"`
	ClientX509CertURL       string `json:"client_x509_cert_url"`
}

type OntapStorageDriverConfig

type OntapStorageDriverConfig struct {
	*CommonStorageDriverConfig              // embedded types replicate all fields
	ManagementLIF                    string `json:"managementLIF"`
	DataLIF                          string `json:"dataLIF"`
	IgroupName                       string `json:"igroupName"`
	SVM                              string `json:"svm"`
	Username                         string `json:"username"`
	Password                         string `json:"password"`
	Aggregate                        string `json:"aggregate"`
	UsageHeartbeat                   string `json:"usageHeartbeat"`                   // in hours, default to 24.0
	QtreePruneFlexvolsPeriod         string `json:"qtreePruneFlexvolsPeriod"`         // in seconds, default to 600
	QtreeQuotaResizePeriod           string `json:"qtreeQuotaResizePeriod"`           // in seconds, default to 60
	EmptyFlexvolDeferredDeletePeriod string `json:"emptyFlexvolDeferredDeletePeriod"` // in seconds, default to 28800
	NfsMountOptions                  string `json:"nfsMountOptions"`
	LimitAggregateUsage              string `json:"limitAggregateUsage"`
	OntapStorageDriverConfigDefaults `json:"defaults"`
}

OntapStorageDriverConfig holds settings for OntapStorageDrivers

type OntapStorageDriverConfigDefaults

type OntapStorageDriverConfigDefaults struct {
	SpaceAllocation string `json:"spaceAllocation"`
	SpaceReserve    string `json:"spaceReserve"`
	SnapshotPolicy  string `json:"snapshotPolicy"`
	SnapshotReserve string `json:"snapshotReserve"`
	SnapshotDir     string `json:"snapshotDir"`
	UnixPermissions string `json:"unixPermissions"`
	ExportPolicy    string `json:"exportPolicy"`
	SecurityStyle   string `json:"securityStyle"`
	SplitOnClone    string `json:"splitOnClone"`
	FileSystemType  string `json:"fileSystemType"`
	Encryption      string `json:"encryption"`
	CommonStorageDriverConfigDefaults
}

type SnapshotsNotSupportedError

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

func (*SnapshotsNotSupportedError) Error

type SolidfireStorageDriverConfig

type SolidfireStorageDriverConfig struct {
	*CommonStorageDriverConfig // embedded types replicate all fields
	TenantName                 string
	EndPoint                   string
	SVIP                       string
	InitiatorIFace             string //iface to use of iSCSI initiator
	Types                      *[]sfapi.VolType
	LegacyNamePrefix           string //name prefix used in earlier ndvp versions
	AccessGroups               []int64
	UseCHAP                    bool
	DefaultBlockSize           int64 //blocksize to use on create when not specified  (512|4096, 512 is default)

	SolidfireStorageDriverPool
	Storage []SolidfireStorageDriverPool `json:"storage"`
}

SolidfireStorageDriverConfig holds settings for SolidfireStorageDrivers

type SolidfireStorageDriverConfigDefaults

type SolidfireStorageDriverConfigDefaults struct {
	CommonStorageDriverConfigDefaults
}

type SolidfireStorageDriverPool

type SolidfireStorageDriverPool struct {
	Labels                               map[string]string `json:"labels"`
	Region                               string            `json:"region"`
	Zone                                 string            `json:"zone"`
	Type                                 string            `json:"type"`
	SolidfireStorageDriverConfigDefaults `json:"defaults"`
}

type VolumeExistsError

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

func (*VolumeExistsError) Error

func (e *VolumeExistsError) Error() string

Directories

Path Synopsis
aws
api
This package provides a high-level interface to the NetApp AWS Cloud Volumes NFS REST API.
This package provides a high-level interface to the NetApp AWS Cloud Volumes NFS REST API.
sdk
Package sdk provides a high-level interface to the Azure NetApp Files SDK
Package sdk provides a high-level interface to the Azure NetApp Files SDK
api
This package provides a high-level interface to the E-series Web Services Proxy REST API.
This package provides a high-level interface to the E-series Web Services Proxy REST API.
gcp
api
This package provides a high-level interface to the NetApp GCP Cloud Volumes NFS REST API.
This package provides a high-level interface to the NetApp GCP Cloud Volumes NFS REST API.
api
api

Jump to

Keyboard shortcuts

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