forked from Telmate/proxmox-api-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lvm.go
44 lines (38 loc) · 875 Bytes
/
lvm.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package storagesubtests
import (
"testing"
"github.com/Terraform-for-Proxmox/proxmox-api-go/proxmox"
)
var LVMFull = proxmox.ConfigStorage{
Enable: true,
Nodes: []string{"pve"},
Type: "lvm",
LVM: &proxmox.ConfigStorageLVM{
VGname: "TestVolumeGroup",
Shared: true,
},
Content: &proxmox.ConfigStorageContent{
Container: proxmox.PointerBool(true),
DiskImage: proxmox.PointerBool(true),
},
}
var LVMEmpty = proxmox.ConfigStorage{
Type: "lvm",
LVM: &proxmox.ConfigStorageLVM{
VGname: "TestVolumeGroup",
},
Content: &proxmox.ConfigStorageContent{
DiskImage: proxmox.PointerBool(true),
},
}
func LVMGetFull(name string, t *testing.T) {
s := CloneJson(LVMFull)
s.ID = name
Get(s, name, t)
}
func LVMGetEmpty(name string, t *testing.T) {
s := CloneJson(LVMEmpty)
s.ID = name
s.Content.Container = proxmox.PointerBool(false)
Get(s, name, t)
}