storageattribute

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: 6 Imported by: 178

Documentation

Index

Constants

View Source
const (
	// Constants for integer storage category attributes
	IOPS = "IOPS"

	// Constants for boolean storage category attributes
	Snapshots   = "snapshots"
	Clones      = "clones"
	Encryption  = "encryption"
	Replication = "replication"

	// Constants for string list attributes
	ProvisioningType = "provisioningType"
	BackendType      = "backendType"
	Media            = "media"
	Region           = "region"
	Zone             = "zone"
	NASType          = "nasType"
	SANType          = "sanType"

	// Constants for label attributes
	Labels   = "labels"
	Selector = "selector"

	// Testing constants
	RecoveryTest     = "recoveryTest"
	UniqueOptions    = "uniqueOptions"
	TestingAttribute = "testingAttribute"
	NonexistentBool  = "nonexistentBool"

	// Values for media
	HDD    = "hdd"
	SSD    = "ssd"
	Hybrid = "hybrid"

	// Values for provisioning type
	Thick = "thick"
	Thin  = "thin"

	// Values for NAS protocol
	NFS = "nfs"
	SMB = "smb"

	// Values for SAN protocol
	ISCSI = "iscsi"
	NVMe  = "nvme"
	FCP   = "fcp"

	// NVMeTransport is used to get NVMe TCP dataLIFs.
	NVMeTransport = "nvme_tcp"

	RequiredStorage        = "requiredStorage" // deprecated, use additionalStoragePools
	StoragePools           = "storagePools"
	AdditionalStoragePools = "additionalStoragePools"
	ExcludeStoragePools    = "excludeStoragePools"
)

Variables

This section is empty.

Functions

func CreateBackendStoragePoolsMapFromEncodedString

func CreateBackendStoragePoolsMapFromEncodedString(
	arg string,
) (map[string][]string, error)

func MarshalRequestMap

func MarshalRequestMap(requestMap map[string]Request) ([]byte, error)

func UnmarshalOfferMap

func UnmarshalOfferMap(mapJSON json.RawMessage) (map[string]Offer, error)

func UnmarshalRequestMap

func UnmarshalRequestMap(mapJSON json.RawMessage) (
	map[string]Request, error,
)

Types

type LabelOffer

type LabelOffer interface {
	Offer
	Labels() map[string]string
}

type Offer

type Offer interface {
	Matches(requested Request) bool
	ToString() string
}

func NewBoolOffer

func NewBoolOffer(offer bool) Offer

func NewBoolOfferFromOffers

func NewBoolOfferFromOffers(offers ...Offer) Offer

func NewIntOffer

func NewIntOffer(min, max int) Offer

func NewLabelOffer

func NewLabelOffer(labelMaps ...map[string]string) Offer

func NewStringOffer

func NewStringOffer(offers ...string) Offer

func NewStringOfferFromOffers

func NewStringOfferFromOffers(offers ...Offer) Offer

type Request

type Request interface {
	GetType() Type
	Value() interface{}
	String() string
}

At the moment, there aren't any terribly useful methods to put here, but there might be. This is more here for symmetry at the moment.

func CreateAttributeRequestFromAttributeValue

func CreateAttributeRequestFromAttributeValue(name, val string) (Request, error)

func NewBoolRequest

func NewBoolRequest(request bool) Request

func NewIntRequest

func NewIntRequest(request int) Request

func NewLabelRequest

func NewLabelRequest(request string) (Request, error)

func NewLabelRequestMustCompile

func NewLabelRequestMustCompile(request string) Request

func NewStringRequest

func NewStringRequest(request string) Request

type Type

type Type string

Jump to

Keyboard shortcuts

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