storage_drivers

package
v0.0.0-...-58f6e79 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANFStorageClassHardwareStandard = "netapp-anf-perf-standard"
	ANFStorageClassHardwarePremium  = "netapp-anf-perf-premium"
	ANFStorageClassHardwareUltra    = "netapp-anf-perf-ultra"

	ANFStorageClassHardwareStandardSMB = "netapp-anf-perf-standard-smb"
	ANFStorageClassHardwarePremiumSMB  = "netapp-anf-perf-premium-smb"
	ANFStorageClassHardwareUltraSMB    = "netapp-anf-perf-ultra-smb"

	NetAppSnapshotClassName = "netapp-snapshot-class"

	MaxNumberOfANFServiceLevels  = 3
	MaxNumberOfANFStorageClasses = 6
)
View Source
const (
	SvmStateCreated = "CREATED"
	AWSRegion       = "AWS_REGION"

	TridentSecretPattern    = "trident-%s"
	SvmNamePattern          = "trident-%s"
	StorageClassNamePattern = "trident-%s-%s"
	BackendNamePattern      = "trident-%s-%s"
	VsAdmin                 = "vsadmin"
	Description             = "Trident secret for FsxN for ONTAP"

	// Tags for the secret
	FileSystemId = "file-system-id"
)
View Source
const ANFTBCYaml = `` /* 583-byte string literal not displayed */
View Source
const ANFVPoolYAML = `` /* 147-byte string literal not displayed */
View Source
const FsxnTBCYaml = `` /* 322-byte string literal not displayed */

FsxnTBCYaml is a template for the FsxN san driver Trident backend config YAML

Variables

This section is empty.

Functions

func GetVolumeSnapshotClassYAML

func GetVolumeSnapshotClassYAML(name string) string

GetVolumeSnapshotClassYAML returns the VolumeSnapshotClass YAML

Types

type ANF

type ANF struct {
	ANFConfig

	AZClient   api.Azure
	ConfClient confClients.ConfiguratorClientInterface

	FilteredCapacityPoolMap map[string]*api.CapacityPool
	FilteredSubnetMap       map[string]*api.Subnet
	AvailabilityZones       []string

	AMIEnabled              bool
	WorkloadIdentityEnabled bool
	TBCNamePrefix           string
	TridentNamespace        string
}

func (*ANF) Create

func (a *ANF) Create() ([]string, error)

func (*ANF) CreateSnapshotClass

func (a *ANF) CreateSnapshotClass() error

func (*ANF) CreateStorageClass

func (a *ANF) CreateStorageClass() error

func (*ANF) DeleteBackend

func (a *ANF) DeleteBackend(map[string]interface{}) error

func (*ANF) DeleteSnapshotClass

func (a *ANF) DeleteSnapshotClass() error

func (*ANF) DeleteStorageClass

func (a *ANF) DeleteStorageClass(map[string]interface{}) error

func (*ANF) GetCloudProvider

func (a *ANF) GetCloudProvider() string

func (*ANF) Validate

func (a *ANF) Validate() error

type ANFConfig

type ANFConfig struct {
	// Access related
	SubscriptionID    string `json:"subscriptionID"`
	TenantID          string `json:"tenantID"`
	Location          string `json:"location"`
	ClientID          string `json:"clientID"`
	ClientSecret      string `json:"clientSecret"`
	ClientCredentials string `json:"clientCredentials"` // Client credential secret name.

	// Filters
	CapacityPools  []string `json:"capacityPools"`
	NetappAccounts []string `json:"netappAccounts"`
	ResourceGroups []string `json:"resourceGroups"`
	VirtualNetwork string   `json:"virtualNetwork"`
	Subnet         string   `json:"subnet"`

	// Encryption: Map of NetApp accounts and customer keys.
	CustomerEncryptionKeys map[string]string `json:"customerEncryptionKeys"`
}

type ANFStorageClass

type ANFStorageClass struct {
	Name         string
	ServiceLevel string
	NASType      string
}

type ANFStorageClassMap

type ANFStorageClassMap struct {
	SCMap map[string]ANFStorageClass
}

func NewANFStorageClassMap

func NewANFStorageClassMap() *ANFStorageClassMap

func (*ANFStorageClassMap) Add

func (asm *ANFStorageClassMap) Add(name, serviceLevel, nasType string)

type ANFVPool

type ANFVPool struct {
	ServiceLevel string
	CPools       []string
	AddPool      bool
}

func NewANFVPool

func NewANFVPool(serviceLevel string, addPool bool) *ANFVPool

func (*ANFVPool) AddCPool

func (avp *ANFVPool) AddCPool(cPoolName string)

func (*ANFVPool) GetYAML

func (avp *ANFVPool) GetYAML(nasType string) string

type ANFVPoolMap

type ANFVPoolMap struct {
	VPoolMap map[string]*ANFVPool
	AddPools bool
}

func NewANFVPoolMap

func NewANFVPoolMap(addPools bool) *ANFVPoolMap

func (*ANFVPoolMap) Add

func (avm *ANFVPoolMap) Add(serviceLevel string) *ANFVPool

func (*ANFVPoolMap) GetYAMLs

func (avm *ANFVPoolMap) GetYAMLs(nasType string) string

type AWS

type AWS struct {
	AwsConfig
	ConfClient       confClients.ConfiguratorClientInterface
	AwsClient        *awsapi.Client
	ManagementLif    string
	TBCNamePrefix    string
	TridentNamespace string
}

func NewFSxNInstance

func NewFSxNInstance(
	torcCR *operatorV1.TridentOrchestrator, configuratorCR *operatorV1.TridentConfigurator,
	client confClients.ConfiguratorClientInterface,
) (*AWS, error)

NewFSxNInstance creates a new instance of the AWS struct and populates it with the provided CRs and client

func (*AWS) Create

func (aws *AWS) Create() ([]string, error)

Create creates the Trident backend against the storage drivers

func (*AWS) CreateSnapshotClass

func (aws *AWS) CreateSnapshotClass() error

CreateSnapshotClass creates a snapshot class for the storage driver

func (*AWS) CreateStorageClass

func (aws *AWS) CreateStorageClass() error

CreateStorageClass creates a storage class for the storage driver

func (*AWS) DeleteBackend

func (aws *AWS) DeleteBackend(request map[string]interface{}) error

DeleteBackend deletes the backend if the FSxN instance is deleted

func (*AWS) DeleteSnapshotClass

func (aws *AWS) DeleteSnapshotClass() error

DeleteSnapshotClass deletes the snapshot class if the FSxN instance is deleted

func (*AWS) DeleteStorageClass

func (aws *AWS) DeleteStorageClass(request map[string]interface{}) error

DeleteStorageClass deletes the storage class if the FSxN instance is deleted

func (*AWS) GetCloudProvider

func (aws *AWS) GetCloudProvider() string

GetCloudProvider returns the cloud provider for the storage driver

func (*AWS) Validate

func (aws *AWS) Validate() error

Validate validates the AWS configuration and prepares each FSxN instance for the auto-backend configuration.

type AwsConfig

type AwsConfig struct {
	StorageDriverName string `json:"storageDriverName"`
	SVMs              []SVM  `json:"svms"`
}

type Backend

type Backend interface {
	Validate() error
	Create() ([]string, error)
	CreateStorageClass() error
	CreateSnapshotClass() error
	GetCloudProvider() string
	DeleteBackend(map[string]interface{}) error
	DeleteStorageClass(map[string]interface{}) error
	DeleteSnapshotClass() error
}

type SVM

type SVM struct {
	FsxnID        string   `json:"fsxnID"`
	Protocols     []string `json:"protocols"`
	AuthType      string   `json:"authType"`
	SvmName       string   `json:"svmName"`
	SecretARNName string   `json:"secretARNName"`
	ManagementLIF string   `json:"managementLIF"`
}

Jump to

Keyboard shortcuts

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