diskparams

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BusTypeIDE  = BusType{/* contains filtered or unexported fields */} // Bus type IDE
	BusTypeSATA = BusType{/* contains filtered or unexported fields */} // Bus type SATA
	BusTypeSCSI = BusType{/* contains filtered or unexported fields */} // Bus type SCSI
	BusTypeNVME = BusType{/* contains filtered or unexported fields */} // Bus type NVME
)
View Source
var ListOfBusTypes = []string{BusTypeIDE.Name(), BusTypeSATA.Name(), BusTypeSCSI.Name(), BusTypeNVME.Name()}
View Source
var StorageProfileValues = []string{
	storageProfileSilver.String(),
	storageProfileSilverR1.String(),
	storageProfileSilverR2.String(),
	storageProfileGold.String(),
	storageProfileGoldR1.String(),
	storageProfileGoldR2.String(),
	storageProfileGoldHM.String(),
	storageProfilePlatinum3.String(),
	storageProfilePlatinum3R1.String(),
	storageProfilePlatinum3R2.String(),
	storageProfilePlatinum3HM.String(),
	storageProfilePlatinum7.String(),
	storageProfilePlatinum7R1.String(),
	storageProfilePlatinum7R2.String(),
	storageProfilePlatinum7HM.String(),
}

Functions

func BusNumberAttribute

func BusNumberAttribute() schema.Attribute

BusNumberAttribute

returns a schema.Attribute with a value. if value is not set, the api try to compute value automaticaly.

func BusNumberAttributeComputed

func BusNumberAttributeComputed() schema.Attribute

BusNumberAttributeComputed returns a schema.Attribute with a computed value.

func BusNumberAttributeRequired

func BusNumberAttributeRequired() schema.Attribute

BusNumberAttributeRequired returns a schema.Attribute with a required value.

func BusTypeAttribute

func BusTypeAttribute() schema.Attribute

BusTypeAttribute

returns a schema.Attribute with a value.

This is Optional and has a default value of busTypeSCSI.String().

func BusTypeAttributeComputed

func BusTypeAttributeComputed() schema.Attribute

BusTypeAttributeComputed returns a schema.Attribute with a computed value.

func BusTypeAttributeRequired

func BusTypeAttributeRequired() schema.Attribute

BusTypeAttributeRequired returns a schema.Attribute with a required value.

func ComputeBusAndUnitNumber

func ComputeBusAndUnitNumber(disks []*govcdtypes.DiskSettings) (busNumber, unitNumber int)

Max BusNumber is 4 (0,1,2,3) Max UnitNumber is 16 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)

Compute BusNumber and UnitNumber

if busNumber is not set, the api try to compute value automaticaly.

func SizeInMBAttribute

func SizeInMBAttribute() schema.Attribute

SizeInMBAttribute

returns a schema.Attribute with a value.

func SizeInMBAttributeComputed

func SizeInMBAttributeComputed() schema.Attribute

SizeInMBAttributeComputed returns a schema.Attribute with a computed value.

func SizeInMBAttributeRequired

func SizeInMBAttributeRequired() schema.Attribute

SizeInMBAttributeRequired returns a schema.Attribute with a required value.

func StorageProfileAttribute

func StorageProfileAttribute() schema.Attribute

StorageProfileAttribute returns the schema.Attribute for the storage profile.

func StorageProfileAttributeComputed

func StorageProfileAttributeComputed() schema.Attribute

StorageProfileAttributeComputed returns the schema.Attribute for the storage profile.

func StorageProfileAttributeRequired

func StorageProfileAttributeRequired() schema.Attribute

StorageProfileAttributeRequired returns the schema.Attribute for the storage profile.

func UnitNumberAttribute

func UnitNumberAttribute() schema.Attribute

UnitNumberAttribute

returns a schema.Attribute with a value. if value is not set, the api try to compute value automaticaly.

func UnitNumberAttributeComputed

func UnitNumberAttributeComputed() schema.Attribute

UnitNumberAttributeComputed returns a schema.Attribute with a computed value.

func UnitNumberAttributeRequired

func UnitNumberAttributeRequired() schema.Attribute

UnitNumberAttributeRequired returns a schema.Attribute with a required value.

Types

type BusType added in v0.3.0

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

func GetBusTypeByCode

func GetBusTypeByCode(code, subtype string) BusType

func GetBusTypeByName

func GetBusTypeByName(name string) BusType

func (BusType) Code added in v0.3.0

func (b BusType) Code() string

func (BusType) Name added in v0.3.0

func (b BusType) Name() string

func (BusType) SubType added in v0.3.0

func (b BusType) SubType() string

Jump to

Keyboard shortcuts

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