forked from Telmate/proxmox-api-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lvm-thin.go
45 lines (39 loc) · 929 Bytes
/
lvm-thin.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
45
package storagesubtests
import (
"testing"
"github.com/Terraform-for-Proxmox/proxmox-api-go/proxmox"
)
var LVMThinFull = proxmox.ConfigStorage{
Enable: true,
Nodes: []string{"pve"},
Type: "lvm-thin",
LVMThin: &proxmox.ConfigStorageLVMThin{
VGname: "pve",
Thinpool: "data",
},
Content: &proxmox.ConfigStorageContent{
Container: proxmox.PointerBool(true),
DiskImage: proxmox.PointerBool(true),
},
}
var LVMThinEmpty = proxmox.ConfigStorage{
Type: "lvm-thin",
LVMThin: &proxmox.ConfigStorageLVMThin{
VGname: "pve",
Thinpool: "data",
},
Content: &proxmox.ConfigStorageContent{
Container: proxmox.PointerBool(true),
},
}
func LVMThinGetFull(name string, t *testing.T) {
s := CloneJson(LVMThinFull)
s.ID = name
Get(s, name, t)
}
func LVMThinGetEmpty(name string, t *testing.T) {
s := CloneJson(LVMThinEmpty)
s.ID = name
s.Content.DiskImage = proxmox.PointerBool(false)
Get(s, name, t)
}