Documentation
¶
Overview ¶
Package constants is related with provider constants
Package constants is storage-related constants
Index ¶
Constants ¶
const ( // ProviderVendorName defines provider vendor name ProviderVendorName = "Huawei" // EndpointDirPermission defines permission of endpoint dir EndpointDirPermission = 0755 // CentralizedStorageNas is the centralized storage nas type CentralizedStorageNas = "centralized-storage-nas" // LicenseValid is a valid license LicenseValid = 1 // LicenseExpired is an expired license LicenseExpired = 2 // NamespaceEnv is driver namespace env NamespaceEnv = "CSI_NAMESPACE" // DefaultNamespace is driver default namespace DefaultNamespace = "huawei-csi" // Ext2 defines the fileType ext2 Ext2 FileType = "ext2" // Ext3 defines the fileType ext3 Ext3 FileType = "ext3" // Ext4 defines the fileType ext4 Ext4 FileType = "ext4" // Xfs defines the fileType xfs Xfs FileType = "xfs" // NodeNameEnv is defined in helm file NodeNameEnv = "CSI_NODENAME" // DefaultDriverName is default huawei csi driver name DefaultDriverName = "csi.huawei.com" // DefaultTopoDriverName is default topo driver name DefaultTopoDriverName = "cmi.huawei.com" // PVKind is defined by k8s PVKind = "PersistentVolume" // PodKind is defined by k8s PodKind = "Pod" // KubernetesV1 is kubernetes v1 api version KubernetesV1 = "v1" // XuanwuV1 is xuanwu v1 api version XuanwuV1 = "xuanwu.huawei.io/v1" // NotMountStr defines not mount str NotMountStr = "not mounted" // DefaultKubeletVolumeDevicesDirName default kubelet volumeDevice name DefaultKubeletVolumeDevicesDirName = "/volumeDevices/" // AllocationUnitBytes default is 512 Bytes, it is the allocation and capacity unit for OceanStor AllocationUnitBytes = 512 // FusionAllocUnitBytes default is 1Mi, it is the allocation unit for FusionStorage FusionAllocUnitBytes = 1024 * 1024 // FusionFileCapacityUnit default is 1024 Bytes, it is the capacity unit for FusionStorage FusionFileCapacityUnit int64 = 1024 // FusionDTreeCapacityUnit default is 1 Bytes, it is the capacity unit for FusionStorage DTree quota FusionDTreeCapacityUnit int64 = 1 // DmeCapacityUnitGb default is 1GB, it is the capacity unit for Dme DmeCapacityUnitGb int64 = 1024 * 1024 * 1024 // DmeCapacityUnitMb default is 1MB, it is the capacity unit for Dme DmeCapacityUnitMb int64 = 1024 * 1024 // DefaultIntBase is the default value of int base DefaultIntBase = 10 // DefaultIntBitSize is the default value of bit size DefaultIntBitSize = 64 // DTreeParentKey is the key of DTree parent name parameter DTreeParentKey = "dTreeParentName" // DisableVerifyCapacityKey is the key of disableVerifyCapacity parameter DisableVerifyCapacityKey = "disableVerifyCapacity" // AdvancedOptionsKey is the key of advanced volume options parameter in StorageClass AdvancedOptionsKey = "advancedOptions" // ScVolumeNameKey is the key of volumeName in StorageClass ScVolumeNameKey = "volumeName" // PVCNameKey is the key of PVC name in CreateVolumeRequest parameters PVCNameKey = "csi.storage.k8s.io/pvc/name" // PVCNamespaceKey is the key of PVC namespace in CreateVolumeRequest parameters PVCNamespaceKey = "csi.storage.k8s.io/pvc/namespace" // PVNameKey is the key of PV name in CreateVolumeRequest parameters PVNameKey = "csi.storage.k8s.io/pv/name" // AuthenticationModeKey is the param for login backend AuthenticationModeKey = "authenticationMode" // AuthModeLocal is the login backend param AuthModeLocal = "local" // AuthModeLDAP is the login backend param AuthModeLDAP = "ldap" // AuthModeScopeLocal is the login backend scope param AuthModeScopeLocal = "0" // AuthModeScopeLDAP is the login backend scope param AuthModeScopeLDAP = "1" )
const ( // DoradoV615 is Dorado V6.1.5 DoradoV615 = "6.1.5" // MinVersionSupportNfsPlus version gte 6.1.7 support label function MinVersionSupportNfsPlus = "6.1.7" // OceanStor9000 storage type is oceanstor-9000 OceanStor9000 = "oceanstor-9000" // OceanStorDtree storage type is oceanstor-dtree OceanStorDtree = "oceanstor-dtree" // OceanStorNas storage type is oceanstor-nas OceanStorNas = "oceanstor-nas" // OceanStorSan storage type is oceanstor-san OceanStorSan = "oceanstor-san" // OceandiskSan storage type is oceandisk-san OceandiskSan = "oceandisk-san" // OceanStorASeriesNas storage type is "oceanstor-a-series-nas" OceanStorASeriesNas = "oceanstor-a-series-nas" // OceanStorASeriesNasDme storage type is "oceanstor-a-series-nas-dme" OceanStorASeriesNasDme = "oceanstor-a-series-nas-dme" // FusionSan storage type is fusionstorage-san FusionSan = "fusionstorage-san" // FusionNas storage type is fusionstorage-nas FusionNas = "fusionstorage-nas" // FusionDTree storage type is fusionstorage-dtree FusionDTree = "fusionstorage-dtree" // CloneSpeedLevel1 means level1 of the clone speed CloneSpeedLevel1 = 1 // CloneSpeedLevel2 means level2 of the clone speed CloneSpeedLevel2 = 2 // CloneSpeedLevel3 means level3 of the clone speed CloneSpeedLevel3 = 3 // CloneSpeedLevel4 means level4 of the clone speed CloneSpeedLevel4 = 4 // ProtocolNfs defines the NFS protocol type ProtocolNfs = "nfs" // ProtocolNfsPlus defines protocol type nfs+ ProtocolNfsPlus = "nfs+" // ProtocolDpc defines the DPC protocol type ProtocolDpc = "dpc" // ProtocolDtfs defines the dtfs protocol type, which stands for DataTurbo ProtocolDtfs = "dtfs" // ProtocolIscsi defines the iscsi protocol type ProtocolIscsi = "iscsi" // ProtocolScsi defines the scsi protocol type ProtocolScsi = "scsi" // AllSquash is the value of all squash configured on the StorageClass AllSquash = "all_squash" // AllSquashValue is the value of all squash when request AllSquashValue = 0 // NoAllSquash is the value of no all squash configured on the StorageClass NoAllSquash = "no_all_squash" // NoAllSquashValue is the value of no all squash when request NoAllSquashValue = 1 // RootSquash is the value of root squash configured on the StorageClass RootSquash = "root_squash" // RootSquashValue is the value of root squash when request RootSquashValue = 0 // NoRootSquash is the value of no root squash configured on the StorageClass NoRootSquash = "no_root_squash" // NoRootSquashValue is the value of no root squash when request NoRootSquashValue = 1 )
const SupportNFS3 = "SupportNFS3"
SupportNFS3 defines backend capability SupportNFS3
const SupportNFS4 = "SupportNFS4"
SupportNFS4 defines backend capability SupportNFS4
const SupportNFS41 = "SupportNFS41"
SupportNFS41 defines backend capability SupportNFS41
Variables ¶
var ( // CSIVersion defines version for CSI, and it will be assigned value dynamic at build time CSIVersion string // ProviderVersion defines provider version ProviderVersion = CSIVersion )
var ( // NasStorageTypes contains all of nas storage types NasStorageTypes = []string{OceanStorNas, OceanStorDtree, FusionNas, FusionDTree, OceanStorASeriesNas, OceanStorASeriesNasDme} // FusionstorageProtocol contains all of fusionstorage protocols supported FusionstorageProtocol = []string{ProtocolIscsi, ProtocolScsi} )
var ( // ErrTimeout defines the timeout error ErrTimeout = errors.New("timeout") )
Functions ¶
This section is empty.
Types ¶
type AuthClientAccessVal ¶ added in v4.10.0
type AuthClientAccessVal int
AuthClientAccessVal is the access value of auth client
const ( // AuthClientReadOnly means read only access AuthClientReadOnly AuthClientAccessVal = 0 // AuthClientReadWrite means read and write access AuthClientReadWrite AuthClientAccessVal = 1 // AuthClientNoAccess means no access AuthClientNoAccess AuthClientAccessVal = 5 )
type BackendCapability ¶
type BackendCapability string
BackendCapability backend capability
var SupportApplicationType BackendCapability = "SupportApplicationType"
SupportApplicationType defines backend capability SupportApplicationType
var SupportClone BackendCapability = "SupportClone"
SupportClone defines backend capability SupportClone
var SupportMetro BackendCapability = "SupportMetro"
SupportMetro defines backend capability SupportMetro
var SupportMetroNAS BackendCapability = "SupportMetroNAS"
SupportMetroNAS defines backend capability SupportMetroNAS
var SupportQoS BackendCapability = "SupportQoS"
SupportQoS defines backend capability SupportQoS
var SupportQuota BackendCapability = "SupportQuota"
SupportQuota defines backend capability SupportQuota
var SupportReplication BackendCapability = "SupportReplication"
SupportReplication defines backend capability SupportReplication
var SupportThick BackendCapability = "SupportThick"
SupportThick defines backend capability SupportThick
var SupportThin BackendCapability = "SupportThin"
SupportThin defines backend capability SupportThin
type DRCSIConfig ¶
type DRCSIConfig struct {
Backends map[string]interface{} `json:"backends"`
}
DRCSIConfig contains storage normal configuration
type DRCSISecret ¶
type DRCSISecret struct {
Secrets map[string]interface{} `json:"secrets"`
}
DRCSISecret contains storage sensitive configuration
type OceanDiskVersion ¶
type OceanDiskVersion string
OceanDiskVersion defines OceanDisk storage's version
type OceanstorVersion ¶
type OceanstorVersion string
OceanstorVersion defines Oceantor storage's version
const ( // OceanStorDoradoV7 is dorado v7 OceanStorDoradoV7 OceanstorVersion = "DoradoV7" // OceanStorDoradoV6 Dorado V6 and OceanStor V6 are exactly the same OceanStorDoradoV6 OceanstorVersion = "DoradoV6" // OceanStorDoradoV3 is dorado v3 OceanStorDoradoV3 OceanstorVersion = "DoradoV3" // OceanStorV3 is oceanstor v3 OceanStorV3 OceanstorVersion = "OceanStorV3" // OceanStorV5 is oceanstor v5 OceanStorV5 OceanstorVersion = "OceanStorV5" )
func (OceanstorVersion) IsDorado ¶
func (ver OceanstorVersion) IsDorado() bool
IsDorado checks whether the version is Dorado
func (OceanstorVersion) IsDoradoV6 ¶
func (ver OceanstorVersion) IsDoradoV6() bool
IsDoradoV6 checks whether the version is Dorado v6
func (OceanstorVersion) IsDoradoV6OrV7 ¶
func (ver OceanstorVersion) IsDoradoV6OrV7() bool
IsDoradoV6OrV7 checks whether the version is Dorado v6 or Dorado v7
func (OceanstorVersion) IsDoradoV7 ¶
func (ver OceanstorVersion) IsDoradoV7() bool
IsDoradoV7 checks whether the version is Dorado v7