-
Notifications
You must be signed in to change notification settings - Fork 238
/
iscsi.go
43 lines (37 loc) · 866 Bytes
/
iscsi.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
package storagesubtests
import (
"testing"
"github.com/Telmate/proxmox-api-go/internal/util"
"github.com/Telmate/proxmox-api-go/proxmox"
)
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),
},
}
var IscsiEmpty = proxmox.ConfigStorage{
Type: "iscsi",
ISCSI: &proxmox.ConfigStorageISCSI{
Portal: "10.20.1.1",
Target: "target-volume",
},
Content: &proxmox.ConfigStorageContent{},
}
func IscsiGetFull(name string, t *testing.T) {
s := CloneJson(IscsiFull)
s.ID = name
Get(s, name, t)
}
func IscsiGetEmpty(name string, t *testing.T) {
s := CloneJson(IscsiEmpty)
s.ID = name
s.Content.DiskImage = util.Pointer(false)
Get(s, name, t)
}