storagesubtests

package
v0.0.0-...-976ef50 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CephfsEmpty = proxmox.ConfigStorage{
	Type: "cephfs",
	CephFS: &proxmox.ConfigStorageCephFS{
		Monitors: []string{"10.20.1.1"},
		Username: "test-ceph-user",
		FSname:   "test-fs-name",
	},
	Content: &proxmox.ConfigStorageContent{
		Iso: util.Pointer(true),
	},
}
View Source
var CephfsFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "cephfs",
	CephFS: &proxmox.ConfigStorageCephFS{
		Monitors: []string{"10.20.1.1", "10.20.1.2"},
		Username: "test-ceph-user",
		FSname:   "test-fs-name",
	},
	Content: &proxmox.ConfigStorageContent{
		Backup:   util.Pointer(true),
		Iso:      util.Pointer(true),
		Snippets: util.Pointer(true),
		Template: util.Pointer(true),
	},
	BackupRetention: &proxmox.ConfigStorageBackupRetention{
		Last:    util.Pointer(6),
		Hourly:  util.Pointer(5),
		Daily:   util.Pointer(4),
		Monthly: util.Pointer(3),
		Weekly:  util.Pointer(2),
		Yearly:  util.Pointer(1),
	},
}
View Source
var DirectoryEmpty = proxmox.ConfigStorage{
	Type: "directory",
	Directory: &proxmox.ConfigStorageDirectory{
		Path: "/test",
	},
	Content: &proxmox.ConfigStorageContent{
		Iso: util.Pointer(true),
	},
}
View Source
var DirectoryFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "directory",
	Directory: &proxmox.ConfigStorageDirectory{
		Path:          "/test",
		Preallocation: util.Pointer("full"),
		Shared:        true,
	},
	Content: &proxmox.ConfigStorageContent{
		Backup:    util.Pointer(true),
		Container: util.Pointer(true),
		DiskImage: util.Pointer(true),
		Iso:       util.Pointer(true),
		Snippets:  util.Pointer(true),
		Template:  util.Pointer(true),
	},
	BackupRetention: &proxmox.ConfigStorageBackupRetention{
		Last:    util.Pointer(6),
		Hourly:  util.Pointer(5),
		Daily:   util.Pointer(4),
		Monthly: util.Pointer(3),
		Weekly:  util.Pointer(2),
		Yearly:  util.Pointer(1),
	},
}
View Source
var GlusterfsEmpty = proxmox.ConfigStorage{
	Type: "glusterfs",
	GlusterFS: &proxmox.ConfigStorageGlusterFS{
		Server1: "10.20.1.3",
		Volume:  "test",
	},
	Content: &proxmox.ConfigStorageContent{
		Iso: util.Pointer(true),
	},
}
View Source
var GlusterfsFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "glusterfs",
	GlusterFS: &proxmox.ConfigStorageGlusterFS{
		Server1:       "10.20.1.1",
		Server2:       "10.20.1.2",
		Preallocation: util.Pointer("full"),
		Volume:        "test",
	},
	Content: &proxmox.ConfigStorageContent{
		Backup:    util.Pointer(true),
		DiskImage: util.Pointer(true),
		Iso:       util.Pointer(true),
		Snippets:  util.Pointer(true),
		Template:  util.Pointer(true),
	},
	BackupRetention: &proxmox.ConfigStorageBackupRetention{
		Last:    util.Pointer(6),
		Hourly:  util.Pointer(5),
		Daily:   util.Pointer(4),
		Monthly: util.Pointer(3),
		Weekly:  util.Pointer(2),
		Yearly:  util.Pointer(1),
	},
}
View Source
var IscsiEmpty = proxmox.ConfigStorage{
	Type: "iscsi",
	ISCSI: &proxmox.ConfigStorageISCSI{
		Portal: "10.20.1.1",
		Target: "target-volume",
	},
	Content: &proxmox.ConfigStorageContent{},
}
View Source
var IscsiFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "iscsi",
	ISCSI: &proxmox.ConfigStorageISCSI{
		Portal: "10.20.1.1",
		Target: "target-volume",
	},
	Content: &proxmox.ConfigStorageContent{
		DiskImage: util.Pointer(true),
	},
}
View Source
var LVMEmpty = proxmox.ConfigStorage{
	Type: "lvm",
	LVM: &proxmox.ConfigStorageLVM{
		VGname: "TestVolumeGroup",
	},
	Content: &proxmox.ConfigStorageContent{
		DiskImage: util.Pointer(true),
	},
}
View Source
var LVMFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "lvm",
	LVM: &proxmox.ConfigStorageLVM{
		VGname: "TestVolumeGroup",
		Shared: true,
	},
	Content: &proxmox.ConfigStorageContent{
		Container: util.Pointer(true),
		DiskImage: util.Pointer(true),
	},
}
View Source
var LVMThinEmpty = proxmox.ConfigStorage{
	Type: "lvm-thin",
	LVMThin: &proxmox.ConfigStorageLVMThin{
		VGname:   "pve",
		Thinpool: "data",
	},
	Content: &proxmox.ConfigStorageContent{
		Container: util.Pointer(true),
	},
}
View Source
var LVMThinFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "lvm-thin",
	LVMThin: &proxmox.ConfigStorageLVMThin{
		VGname:   "pve",
		Thinpool: "data",
	},
	Content: &proxmox.ConfigStorageContent{
		Container: util.Pointer(true),
		DiskImage: util.Pointer(true),
	},
}
View Source
var NFSEmpty = proxmox.ConfigStorage{
	Type: "nfs",
	NFS: &proxmox.ConfigStorageNFS{
		Server: "10.20.1.1",
		Export: "/exports",
	},
	Content: &proxmox.ConfigStorageContent{
		DiskImage: util.Pointer(true),
	},
}
View Source
var NFSFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "nfs",
	NFS: &proxmox.ConfigStorageNFS{
		Server:        "10.20.1.1",
		Export:        "/exports",
		Preallocation: util.Pointer("full"),
		Version:       util.Pointer("4"),
	},
	Content: &proxmox.ConfigStorageContent{
		Backup:    util.Pointer(true),
		Container: util.Pointer(true),
		DiskImage: util.Pointer(true),
		Iso:       util.Pointer(true),
		Snippets:  util.Pointer(true),
		Template:  util.Pointer(true),
	},
	BackupRetention: &proxmox.ConfigStorageBackupRetention{
		Last:    util.Pointer(6),
		Hourly:  util.Pointer(5),
		Daily:   util.Pointer(4),
		Monthly: util.Pointer(3),
		Weekly:  util.Pointer(2),
		Yearly:  util.Pointer(1),
	},
}
View Source
var PBSEmpty = proxmox.ConfigStorage{
	Type: "pbs",
	PBS: &proxmox.ConfigStoragePBS{
		Server:    "10.20.1.1",
		Datastore: "proxmox",
		Username:  "root@pam",
	},
}
View Source
var PBSFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "pbs",
	PBS: &proxmox.ConfigStoragePBS{
		Server:      "10.20.1.1",
		Datastore:   "proxmox",
		Username:    "root@pam",
		Fingerprint: "B7:BC:55:10:CC:1C:63:7B:5E:5F:B7:85:81:6A:77:3D:BB:39:4B:68:33:7B:1B:11:7C:A5:AB:43:CC:F7:78:CF",
		Port:        util.Pointer(8007),
	},
	Content: &proxmox.ConfigStorageContent{
		Backup: util.Pointer(true),
	},
	BackupRetention: &proxmox.ConfigStorageBackupRetention{
		Last:    util.Pointer(6),
		Hourly:  util.Pointer(5),
		Daily:   util.Pointer(4),
		Monthly: util.Pointer(3),
		Weekly:  util.Pointer(2),
		Yearly:  util.Pointer(1),
	},
}
View Source
var RBDEmpty = proxmox.ConfigStorage{
	Type: "rbd",
	RBD: &proxmox.ConfigStorageRBD{
		Pool:      "test-pool",
		Monitors:  []string{"10.20.1.3"},
		Username:  "rbd-username",
		Namespace: "ceph-namespace",
	},
	Content: &proxmox.ConfigStorageContent{
		Container: util.Pointer(true),
	},
}
View Source
var RBDFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "rbd",
	RBD: &proxmox.ConfigStorageRBD{
		Pool:      "test-pool",
		Monitors:  []string{"10.20.1.1", "10.20.1.2", "10.20.1.3"},
		Username:  "rbd-username",
		Namespace: "ceph-namespace",
		KRBD:      true,
	},
	Content: &proxmox.ConfigStorageContent{
		Container: util.Pointer(true),
		DiskImage: util.Pointer(true),
	},
}
View Source
var SMBEmpty = proxmox.ConfigStorage{
	Type: "smb",
	SMB: &proxmox.ConfigStorageSMB{
		Username: "b.wayne",
		Share:    "NetworkShare",
		Domain:   "organization.pve",
		Server:   "10.20.1.1",
	},
	Content: &proxmox.ConfigStorageContent{
		Snippets: util.Pointer(true),
	},
}
View Source
var SMBFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "smb",
	SMB: &proxmox.ConfigStorageSMB{
		Username:      "b.wayne",
		Share:         "NetworkShare",
		Preallocation: util.Pointer("full"),
		Domain:        "organization.pve",
		Server:        "10.20.1.1",
		Version:       util.Pointer("3"),
	},
	Content: &proxmox.ConfigStorageContent{
		Backup:    util.Pointer(true),
		Container: util.Pointer(true),
		DiskImage: util.Pointer(true),
		Iso:       util.Pointer(true),
		Snippets:  util.Pointer(true),
		Template:  util.Pointer(true),
	},
	BackupRetention: &proxmox.ConfigStorageBackupRetention{
		Last:    util.Pointer(6),
		Hourly:  util.Pointer(5),
		Daily:   util.Pointer(4),
		Monthly: util.Pointer(3),
		Weekly:  util.Pointer(2),
		Yearly:  util.Pointer(1),
	},
}
View Source
var ZFSEmpty = proxmox.ConfigStorage{
	Type: "zfs",
	ZFS: &proxmox.ConfigStorageZFS{
		Pool: "test-pool",
	},
	Content: &proxmox.ConfigStorageContent{
		DiskImage: util.Pointer(true),
	},
}
View Source
var ZFSFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "zfs",
	ZFS: &proxmox.ConfigStorageZFS{
		Pool:          "test-pool",
		Blocksize:     util.Pointer("4k"),
		Thinprovision: true,
	},
	Content: &proxmox.ConfigStorageContent{
		Container: util.Pointer(true),
		DiskImage: util.Pointer(true),
	},
}
View Source
var ZFSoverISCSIEmpty = proxmox.ConfigStorage{
	Type: "zfs-over-iscsi",
	ZFSoverISCSI: &proxmox.ConfigStorageZFSoverISCSI{
		Portal:        "test-portal",
		Pool:          "test-pool",
		Target:        "test-target",
		ISCSIprovider: "iet",
	},
}
View Source
var ZFSoverISCSIFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "zfs-over-iscsi",
	ZFSoverISCSI: &proxmox.ConfigStorageZFSoverISCSI{
		Portal:        "test-portal",
		Pool:          "test-pool",
		Blocksize:     util.Pointer("8k"),
		Target:        "test-target",
		Thinprovision: true,
		ISCSIprovider: "iet",
	},
	Content: &proxmox.ConfigStorageContent{
		DiskImage: util.Pointer(true),
	},
}
View Source
var ZFSoverISCSI_ComstarEmpty = proxmox.ConfigStorage{
	Type: "zfs-over-iscsi",
	ZFSoverISCSI: &proxmox.ConfigStorageZFSoverISCSI{
		Portal:        "test-portal",
		Pool:          "test-pool",
		Target:        "test-target",
		ISCSIprovider: "comstar",
		Comstar:       &proxmox.ConfigStorageZFSoverISCSI_Comstar{},
	},
}
View Source
var ZFSoverISCSI_ComstarFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "zfs-over-iscsi",
	ZFSoverISCSI: &proxmox.ConfigStorageZFSoverISCSI{
		Portal:        "test-portal",
		Pool:          "test-pool",
		Blocksize:     util.Pointer("8k"),
		Target:        "test-target",
		Thinprovision: true,
		ISCSIprovider: "comstar",
		Comstar: &proxmox.ConfigStorageZFSoverISCSI_Comstar{
			TargetGroup: "t-group",
			HostGroup:   "h-group",
			Writecache:  true,
		},
	},
	Content: &proxmox.ConfigStorageContent{
		DiskImage: util.Pointer(true),
	},
}
View Source
var ZFSoverISCSI_IstgtEmpty = proxmox.ConfigStorage{
	Type: "zfs-over-iscsi",
	ZFSoverISCSI: &proxmox.ConfigStorageZFSoverISCSI{
		Portal:        "test-portal",
		Pool:          "test-pool",
		Target:        "test-target",
		ISCSIprovider: "istgt",
		Istgt:         &proxmox.ConfigStorageZFSoverISCSI_istgt{},
	},
}
View Source
var ZFSoverISCSI_IstgtFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "zfs-over-iscsi",
	ZFSoverISCSI: &proxmox.ConfigStorageZFSoverISCSI{
		Portal:        "test-portal",
		Pool:          "test-pool",
		Blocksize:     util.Pointer("8k"),
		Target:        "test-target",
		Thinprovision: true,
		ISCSIprovider: "istgt",
		Istgt: &proxmox.ConfigStorageZFSoverISCSI_istgt{
			Writecache: true,
		},
	},
	Content: &proxmox.ConfigStorageContent{
		DiskImage: util.Pointer(true),
	},
}
View Source
var ZFSoverISCSI_LioEmpty = proxmox.ConfigStorage{
	Type: "zfs-over-iscsi",
	ZFSoverISCSI: &proxmox.ConfigStorageZFSoverISCSI{
		Portal:        "test-portal",
		Pool:          "test-pool",
		Target:        "test-target",
		ISCSIprovider: "lio",
		LIO: &proxmox.ConfigStorageZFSoverISCSI_LIO{
			TargetPortalGroup: "t-group",
		},
	},
}
View Source
var ZFSoverISCSI_LioFull = proxmox.ConfigStorage{
	Enable: true,
	Nodes:  []string{"pve"},
	Type:   "zfs-over-iscsi",
	ZFSoverISCSI: &proxmox.ConfigStorageZFSoverISCSI{
		Portal:        "test-portal",
		Pool:          "test-pool",
		Blocksize:     util.Pointer("8k"),
		Target:        "test-target",
		Thinprovision: true,
		ISCSIprovider: "lio",
		LIO: &proxmox.ConfigStorageZFSoverISCSI_LIO{
			TargetPortalGroup: "t-group",
		},
	},
	Content: &proxmox.ConfigStorageContent{
		DiskImage: util.Pointer(true),
	},
}

Functions

func CephfsGetEmpty

func CephfsGetEmpty(name string, t *testing.T)

func CephfsGetFull

func CephfsGetFull(name string, t *testing.T)

func Cleanup

func Cleanup(name string, t *testing.T)

func CloneJson

func CloneJson(jsonStruct proxmox.ConfigStorage) *proxmox.ConfigStorage

func Create

func Create(s *proxmox.ConfigStorage, name string, t *testing.T)

func Delete

func Delete(name string, t *testing.T)

func DirectoryGetEmpty

func DirectoryGetEmpty(name string, t *testing.T)

func DirectoryGetFull

func DirectoryGetFull(name string, t *testing.T)

func Get

func Get(s *proxmox.ConfigStorage, name string, t *testing.T)

func GlusterfsGetEmpty

func GlusterfsGetEmpty(name string, t *testing.T)

func GlusterfsGetFull

func GlusterfsGetFull(name string, t *testing.T)

func InlineMarshal

func InlineMarshal(jsonStruct *proxmox.ConfigStorage) string

func IscsiGetEmpty

func IscsiGetEmpty(name string, t *testing.T)

func IscsiGetFull

func IscsiGetFull(name string, t *testing.T)

func LVMGetEmpty

func LVMGetEmpty(name string, t *testing.T)

func LVMGetFull

func LVMGetFull(name string, t *testing.T)

func LVMThinGetEmpty

func LVMThinGetEmpty(name string, t *testing.T)

func LVMThinGetFull

func LVMThinGetFull(name string, t *testing.T)

func NFSGetEmpty

func NFSGetEmpty(name string, t *testing.T)

func NFSGetFull

func NFSGetFull(name string, t *testing.T)

func RBDGetEmpty

func RBDGetEmpty(name string, t *testing.T)

func RBDGetFull

func RBDGetFull(name string, t *testing.T)

func SMBGetEmpty

func SMBGetEmpty(name string, t *testing.T)

func SMBGetFull

func SMBGetFull(name string, t *testing.T)

func Update

func Update(s *proxmox.ConfigStorage, name string, t *testing.T)

func ZFSGetEmpty

func ZFSGetEmpty(name string, t *testing.T)

func ZFSGetFull

func ZFSGetFull(name string, t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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