Documentation ¶
Index ¶
- Constants
- Variables
- type AllowClone
- type AllowShare
- type AllowSnapshot
- type Content
- type GlusterFSTransport
- type ISCSIProvider
- type ImageFormat
- type Kind
- type NFSVersion
- type Properties
- type SMBVersion
- type Storage
- type StorageCIFS
- type StorageCIFSProperties
- type StorageCephFS
- type StorageCephFSProperties
- type StorageDRBD
- type StorageDRBDProperties
- type StorageDir
- type StorageDirProperties
- type StorageGlusterFS
- type StorageGlusterFSProperties
- type StorageISCSIKernel
- type StorageISCSIKernelProperties
- type StorageISCSIUser
- type StorageISCSIUserProperties
- type StorageLVM
- type StorageLVMProperties
- type StorageLVMThin
- type StorageLVMThinProperties
- type StorageNFS
- type StorageNFSProperties
- type StorageRBD
- type StorageRBDProperties
- type StorageZFS
- type StorageZFSOverISCSI
- type StorageZFSOverISCSIProperties
- type StorageZFSProperties
Constants ¶
View Source
const ( StorageCephFSContents = ContentContainerTemplate & ContentISO & ContentBackup & ContentSnippet StorageCephFSImageFormat = ContentNone StorageCephFSSnapshots = AllowSnapshotAll StorageCephFSClones = AllowCloneNever )
View Source
const ( DefaultStorageCephFSUsername = "" DefaultStorageCephFSUseFUSE = false DefaultStorageCephFSServerPath = "/" )
View Source
const ( StorageCIFSContents = ContentQEMUData & ContentContainerData & ContentContainerTemplate & ContentISO & ContentBackup & ContentSnippet StorageCIFSImageFormat = ImageFormatRaw & ImageFormatQcow2 & ImageFormatVMDK StorageCIFSSnapshots = AllowSnapshotQcow2 StorageCIFSClones = AllowCloneQcow2 )
View Source
const ( DefaultStorageCIFSSMBVersion = SMBVersion30 DefaultStorageCIFSDomain = "" DefaultStorageCIFSUsername = "" DefaultStorageCIFSPassword = "" DefaultStorageCIFSLocalPathCreate = false )
View Source
const ( StorageDirContent = ContentQEMUData & ContentContainerData & ContentISO & ContentContainerTemplate & ContentBackup & ContentSnippet StorageDirImageFormat = ImageFormatRaw & ImageFormatQcow2 & ImageFormatVMDK StorageDirAllowSnapshot = AllowSnapshotQcow2 StorageDirAllowClone = AllowCloneQcow2 )
View Source
const ( DefaultStorageDirLocalPathCreate = true DefaultStorageDirLocalIsManaged = false )
View Source
const ( StorageDRBDContents = ContentQEMUData & ContentContainerData StorageDRBDImageFormat = ImageFormatRaw StorageDRBDSnapshots = AllowSnapshotNever StorageDRBDClones = AllowCloneNever )
View Source
const ( StorageGlusterFSContents = ContentQEMUData & ContentContainerTemplate & ContentISO & ContentBackup & ContentSnippet StorageGlusterFSImageFormat = ImageFormatRaw & ImageFormatQcow2 & ImageFormatVMDK StorageGlusterFSSnapshots = AllowSnapshotQcow2 StorageGlusterFSClones = AllowSnapshotQcow2 )
View Source
const ( DefaultStorageGlusterFSBackupServer = "" DefaultStorageGlusterFSTransport = GlusterFSTransportNone )
View Source
const ( StorageISCSIKernelContents = ContentQEMUData StorageISCSIKernelImageFormat = ImageFormatRaw StorageISCSIKernelSnapshots = AllowSnapshotNever StorageISCSIKernelClones = AllowCloneNever )
View Source
const ( StorageISCSIUserContents = ContentQEMUData StorageISCSIUserImageFormat = ImageFormatRaw StorageISCSIUserSnapshots = AllowSnapshotNever StorageISCSIUserClones = AllowCloneNever )
View Source
const ( StorageLVMContent = ContentQEMUData & ContentContainerData StorageLVMImageFormat = ImageFormatRaw StorageLVMAllowSnapshot = AllowSnapshotNever StorageLVMAllowClone = AllowCloneNever )
View Source
const ( DefaultStorageLVMBaseStorage = "" DefaultStorageLVMSafeRemove = false DefaultStorageLVMSafeRemoveThroughput = -10485760 DefaultStorageLVMTaggedOnly = false )
View Source
const ( StorageLVMThinContents = ContentQEMUData & ContentContainerData StorageLVMThinImageFormat = ImageFormatRaw StorageLVMThinSnapshots = AllowSnapshotAll StorageLVMThinClones = AllowCloneAll )
View Source
const ( StorageNFSContents = ContentQEMUData & ContentContainerData & ContentContainerTemplate & ContentISO & ContentBackup & ContentSnippet StorageNFSImageFormat = ImageFormatRaw & ImageFormatQcow2 & ImageFormatVMDK StorageNFSSnapshots = AllowSnapshotQcow2 StorageNFSClones = AllowCloneQcow2 )
View Source
const ( DefaultStorageNFSVersion = NFSVersionNone DefaultStorageNFSLocalPathCreate = false )
View Source
const ( StorageRBDContents = ContentQEMUData & ContentContainerData StorageRBDImageFormat = ImageFormatRaw StorageRBDSnapshots = AllowSnapshotAll StorageRBDClones = AllowCloneAll )
View Source
const ( DefaultStorageRBDUsername = "" DefaultStorageRBDUseKRBD = false DefaultStorageRBDPoolName = "rbd" )
View Source
const ( StorageZFSContents = ContentQEMUData & ContentContainerData StorageZFSImageFormat = ImageFormatRaw & ImageFormatSubVolume StorageZFSSnapshots = AllowSnapshotAll StorageZFSClones = AllowCloneAll )
View Source
const ( DefaultStorageZFSBlockSize = "8192" DefaultStorageZFSUseSparse = false DefaultStorageZFSMountPoint = "" )
View Source
const ( StorageZFSOverISCSIKernelContents = ContentQEMUData StorageZFSOverISCSIKernelImageFormat = ImageFormatRaw StorageZFSOverISCSIKernelSnapshots = AllowSnapshotAll StorageZFSOverISCSIKernelClones = AllowCloneAll )
View Source
const ( DefaultStorageZFSOverISCSIUseSparse = false DefaultStorageZFSOverISCSIWriteCache = true DefaultStorageZFSOverISCSICOMSTARHostGroup = "" DefaultStorageZFSOverISCSICOMSTARTargetGroup = "" DefaultStorageZFSOverISCSILIOTargetPortalGroup = "" )
View Source
const (
DefaultStorageDRBDRedundancy uint = 2
)
View Source
const (
ErrInvalidKind = errors.ClientError("unsupported storage type")
)
Variables ¶
View Source
var DefaultStorageCephFSMonitorHosts = []string{}
View Source
var DefaultStorageRBDMonitorHosts = []string{}
Functions ¶
This section is empty.
Types ¶
type AllowClone ¶
type AllowClone int
const ( AllowCloneNever AllowClone = iota AllowCloneQcow2 AllowCloneAll )
type AllowSnapshot ¶
type AllowSnapshot int
const ( AllowSnapshotNever AllowSnapshot = iota AllowSnapshotQcow2 AllowSnapshotAll )
type Content ¶
type Content int
const ( ContentUnknown Content = 1 << iota // ContentQEMUData represents QEMU virtual machine image files. It's treated as the internal "images" type, which shows up as "Disk image" in the UI. ContentQEMUData // ContentContainerData represents LXC container filesystems. It's treated as the internal "rootdir" type, which shows up as "ISO image" in the UI. ContentContainerData // ContentISO represents ISO image files. It's treated as the internal "iso" type, which shows up as "ISO files" in the UI. ContentISO // ContentContainerTemplate represents LXC container template files. It's treated as the internal "vztml" type, which shows up as "Container template" in the UI. ContentContainerTemplate // ContentBackup represents QEMU and LXC backup files. It's treated as the internal "backup" type, which shows up as "VZDump backup file" in the UI. ContentBackup // ContentSnippet represents snippet files like guest hook scripts. It's treated as the internal "snippets" type, which shows up as "Snippets" in the UI. ContentSnippet )
const ContentNone Content = 0
func (*Content) UnmarshalJSON ¶
type GlusterFSTransport ¶
type GlusterFSTransport string
const ( GlusterFSTransportNone GlusterFSTransport = "" GlusterFSTransportTCP GlusterFSTransport = "tcp" GlusterFSTransportUNIX GlusterFSTransport = "unix" GlusterFSTransportRDMA GlusterFSTransport = "rdma" )
func (GlusterFSTransport) IsUnknown ¶
func (obj GlusterFSTransport) IsUnknown() bool
func (GlusterFSTransport) IsValid ¶
func (obj GlusterFSTransport) IsValid() bool
func (GlusterFSTransport) Marshal ¶
func (obj GlusterFSTransport) Marshal() (string, error)
func (*GlusterFSTransport) Unmarshal ¶
func (obj *GlusterFSTransport) Unmarshal(s string) error
func (*GlusterFSTransport) UnmarshalJSON ¶
func (obj *GlusterFSTransport) UnmarshalJSON(b []byte) error
type ISCSIProvider ¶
type ISCSIProvider string
const ( ISCSIProviderCOMSTAR ISCSIProvider = "comstar" ISCSIProviderISTGT ISCSIProvider = "istgt" ISCSIProviderIET ISCSIProvider = "iet" ISCSIProviderLIO ISCSIProvider = "LIO" )
func (ISCSIProvider) IsUnknown ¶
func (obj ISCSIProvider) IsUnknown() bool
func (ISCSIProvider) IsValid ¶
func (obj ISCSIProvider) IsValid() bool
func (ISCSIProvider) Marshal ¶
func (obj ISCSIProvider) Marshal() (string, error)
func (*ISCSIProvider) Unmarshal ¶
func (obj *ISCSIProvider) Unmarshal(s string) error
func (*ISCSIProvider) UnmarshalJSON ¶
func (obj *ISCSIProvider) UnmarshalJSON(b []byte) error
type ImageFormat ¶
type ImageFormat int
const ( ImageFormatRaw ImageFormat = 1 << iota ImageFormatQcow2 ImageFormatVMDK ImageFormatSubVolume )
const ImageFormatUnknown ImageFormat = -1
func (ImageFormat) Marshal ¶
func (obj ImageFormat) Marshal() (string, error)
func (*ImageFormat) Unmarshal ¶
func (obj *ImageFormat) Unmarshal(s string) error
func (*ImageFormat) UnmarshalJSON ¶
func (obj *ImageFormat) UnmarshalJSON(b []byte) error
type Kind ¶
type Kind string
const ( KindDir Kind = "dir" KindLVM Kind = "lvm" KindLVMThin Kind = "lvmthin" KindZFS Kind = "zfspool" KindNFS Kind = "nfs" KindCIFS Kind = "cifs" KindGlusterFS Kind = "glusterfs" KindISCSIKernel Kind = "iscsi" KindISCSIUser Kind = "iscsidirect" KindCephFS Kind = "cephfs" KindRBD Kind = "rbd" KindDRBD Kind = "drbd" KindZFSOverISCSI Kind = "zfs" )
func (*Kind) UnmarshalJSON ¶
type NFSVersion ¶
type NFSVersion string
const ( NFSVersionNone NFSVersion = "" NFSVersion30 NFSVersion = "3" NFSVersion40 NFSVersion = "4" NFSVersion41 NFSVersion = "4.1" NFSVersion42 NFSVersion = "4.2" )
func (NFSVersion) IsUnknown ¶
func (obj NFSVersion) IsUnknown() bool
func (NFSVersion) IsValid ¶
func (obj NFSVersion) IsValid() bool
func (NFSVersion) Marshal ¶
func (obj NFSVersion) Marshal() (string, error)
func (*NFSVersion) Unmarshal ¶
func (obj *NFSVersion) Unmarshal(s string) error
func (*NFSVersion) UnmarshalJSON ¶
func (obj *NFSVersion) UnmarshalJSON(b []byte) error
type Properties ¶
type SMBVersion ¶
type SMBVersion string
const ( SMBVersion20 SMBVersion = "2.0" SMBVersion21 SMBVersion = "2.1" SMBVersion30 SMBVersion = "3.0" )
func (SMBVersion) IsUnknown ¶
func (obj SMBVersion) IsUnknown() bool
func (SMBVersion) IsValid ¶
func (obj SMBVersion) IsValid() bool
func (SMBVersion) Marshal ¶
func (obj SMBVersion) Marshal() (string, error)
func (*SMBVersion) Unmarshal ¶
func (obj *SMBVersion) Unmarshal(s string) error
func (*SMBVersion) UnmarshalJSON ¶
func (obj *SMBVersion) UnmarshalJSON(b []byte) error
type StorageCIFS ¶
type StorageCIFSProperties ¶
type StorageCIFSProperties struct { Server string SMBVersion SMBVersion Domain string Username string Password string LocalPath string LocalPathCreate bool }
func NewStorageCIFSProperties ¶
func NewStorageCIFSProperties( props types.Properties, ) (*StorageCIFSProperties, error)
type StorageCephFS ¶
type StorageCephFSProperties ¶
type StorageCephFSProperties struct { MonitorHosts []string Username string UseFUSE bool ServerPath string LocalPath string }
func NewStorageCephFSProperties ¶
func NewStorageCephFSProperties( props types.Properties, ) (*StorageCephFSProperties, error)
type StorageDRBD ¶
type StorageDRBDProperties ¶
type StorageDRBDProperties struct {
Redundancy uint
}
func NewStorageDRBDProperties ¶
func NewStorageDRBDProperties( props types.Properties, ) (*StorageDRBDProperties, error)
type StorageDir ¶
type StorageDirProperties ¶
func NewStorageDirProperties ¶
func NewStorageDirProperties( props types.Properties, ) (*StorageDirProperties, error)
type StorageGlusterFS ¶
type StorageGlusterFS interface { Storage MainServer() string BackupServer() string Transport() GlusterFSTransport Volume() string }
type StorageGlusterFSProperties ¶
type StorageGlusterFSProperties struct { MainServer string BackupServer string Transport GlusterFSTransport Volume string }
func NewStorageGlusterFSProperties ¶
func NewStorageGlusterFSProperties( props types.Properties, ) (*StorageGlusterFSProperties, error)
type StorageISCSIKernel ¶
type StorageISCSIKernelProperties ¶
func NewStorageISCSIKernelProperties ¶
func NewStorageISCSIKernelProperties( props types.Properties, ) (*StorageISCSIKernelProperties, error)
type StorageISCSIUser ¶
type StorageISCSIUserProperties ¶
func NewStorageISCSIUserProperties ¶
func NewStorageISCSIUserProperties( props types.Properties, ) (*StorageISCSIUserProperties, error)
type StorageLVM ¶
type StorageLVM interface { Storage // Base volume. This volume is automatically activated. BaseStorage() string // Volume group name. VolumeGroup() string // Zero-out data when removing LVs. SafeRemove() bool // Limit the thoughput of the data stream, in bytes per second. If the value is positive, tries to keep the overall rate at the specified value for the whole session. If the value is negative, it is an upper limit for each read/write system call pair. In other words, the negative number will never exceed that limit, the positive number will exceed it to make good for previous underutilization SafeRemoveThroughput() int // Only use logical volumes tagged with 'pve-vm-ID'. TaggedOnly() bool }
type StorageLVMProperties ¶
type StorageLVMProperties struct { BaseStorage string VolumeGroup string SafeRemove bool SafeRemoveThroughput int TaggedOnly bool }
func NewStorageLVMProperties ¶
func NewStorageLVMProperties( props types.Properties, ) (*StorageLVMProperties, error)
type StorageLVMThin ¶
type StorageLVMThinProperties ¶
func NewStorageLVMThinProperties ¶
func NewStorageLVMThinProperties( props types.Properties, ) (*StorageLVMThinProperties, error)
type StorageNFS ¶
type StorageNFSProperties ¶
type StorageNFSProperties struct { Server string NFSVersion NFSVersion ServerPath string LocalPath string LocalPathCreate bool }
func NewStorageNFSProperties ¶
func NewStorageNFSProperties( props types.Properties, ) (*StorageNFSProperties, error)
type StorageRBD ¶
type StorageRBDProperties ¶
type StorageRBDProperties struct { MonitorHosts []string Username string UseKRBD bool PoolName string }
func NewStorageRBDProperties ¶
func NewStorageRBDProperties( props types.Properties, ) (*StorageRBDProperties, error)
type StorageZFS ¶
type StorageZFSOverISCSI ¶
type StorageZFSOverISCSIProperties ¶
type StorageZFSOverISCSIProperties struct { Portal string Target string PoolName string BlockSize string UseSparse bool WriteCache bool ISCSIProvider ISCSIProvider COMSTARHostGroup string COMSTARTargetGroup string LIOTargetPortalGroup string }
func NewStorageZFSOverISCSIProperties ¶
func NewStorageZFSOverISCSIProperties( props types.Properties, ) (*StorageZFSOverISCSIProperties, error)
type StorageZFSProperties ¶
type StorageZFSProperties struct { PoolName string BlockSize string UseSparse bool LocalPath string }
func NewStorageZFSProperties ¶
func NewStorageZFSProperties( props types.Properties, ) (*StorageZFSProperties, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.