cbs

package
v1.27.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GB = 1 << (10 * 3)

	// cbs disk type
	DiskTypeAttr = "diskType"

	// cbs disk name
	DiskNameAttr = "diskName"
	// cbs disk tags
	DiskTagsAttr = "diskTags"

	// tencentcloud cbs types, now support CLOUD_BASIC, CLOUD_PREMIUM, CLOUD_SSD
	DiskTypeCloudBasic   = "CLOUD_BASIC"
	DiskTypeCloudPremium = "CLOUD_PREMIUM"
	DiskTypeCloudSsd     = "CLOUD_SSD"

	DiskTypeDefault = DiskTypeCloudBasic

	// cbs disk charge type
	DiskChargeTypeAttr           = "diskChargeType"
	DiskChargeTypePrePaid        = "PREPAID"
	DiskChargeTypePostPaidByHour = "POSTPAID_BY_HOUR"

	DiskChargeTypeDefault = DiskChargeTypePostPaidByHour

	// cbs disk charge prepaid options
	DiskChargePrepaidPeriodAttr = "diskChargeTypePrepaidPeriod"

	DiskChargePrepaidPeriodValidValues = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36}
	DiskChargePrepaidPeriodDefault     = 1

	DiskChargePrepaidRenewFlagAttr = "diskChargePrepaidRenewFlag"

	DiskChargePrepaidRenewFlagNotifyAndAutoRenew          = "NOTIFY_AND_AUTO_RENEW"
	DiskChargePrepaidRenewFlagNotifyAndManualRenewd       = "NOTIFY_AND_MANUAL_RENEW"
	DiskChargePrepaidRenewFlagDisableNotifyAndManualRenew = "DISABLE_NOTIFY_AND_MANUAL_RENEW"

	DiskChargePrepaidRenewFlagDefault = DiskChargePrepaidRenewFlagNotifyAndManualRenewd

	// cbs disk encrypt
	EncryptAttr   = "encrypt"
	EncryptEnable = "ENCRYPT"

	//cbs disk zone
	DiskZone = "diskZone"

	//cbs disk zones
	DiskZones = "diskZones"

	//cbs disk asp Id
	AspId = "aspId"
	// cbs status
	StatusUnattached = "UNATTACHED"
	StatusAttached   = "ATTACHED"
)
View Source
var (
	DriverName     = "com.tencent.cloud.csi.cbs"
	DriverVerision = "0.1.0"
)
View Source
var (
	DiskByIdDevicePath       = "/dev/disk/by-id"
	DiskByIdDeviceNamePrefix = "virtio-"
)

Functions

This section is empty.

Types

type Driver

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

func NewDriver

func NewDriver(region string, zone string, secretId string, secretKey string) (*Driver, error)

func (*Driver) Run

func (drv *Driver) Run(endpoint *url.URL, cbsUrl string) error

Jump to

Keyboard shortcuts

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