forked from Telmate/proxmox-api-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zfs.go
46 lines (40 loc) · 968 Bytes
/
zfs.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
46
package storagesubtests
import (
"testing"
"github.com/Terraform-for-Proxmox/proxmox-api-go/proxmox"
)
var ZFSFull = proxmox.ConfigStorage{
Enable: true,
Nodes: []string{"pve"},
Type: "zfs",
ZFS: &proxmox.ConfigStorageZFS{
Pool: "test-pool",
Blocksize: proxmox.PointerString("4k"),
Thinprovision: true,
},
Content: &proxmox.ConfigStorageContent{
Container: proxmox.PointerBool(true),
DiskImage: proxmox.PointerBool(true),
},
}
var ZFSEmpty = proxmox.ConfigStorage{
Type: "zfs",
ZFS: &proxmox.ConfigStorageZFS{
Pool: "test-pool",
},
Content: &proxmox.ConfigStorageContent{
DiskImage: proxmox.PointerBool(true),
},
}
func ZFSGetFull(name string, t *testing.T) {
s := CloneJson(ZFSFull)
s.ID = name
Get(s, name, t)
}
func ZFSGetEmpty(name string, t *testing.T) {
s := CloneJson(ZFSEmpty)
s.ID = name
s.ZFS.Blocksize = proxmox.PointerString("8k")
s.Content.Container = proxmox.PointerBool(false)
Get(s, name, t)
}