-
Notifications
You must be signed in to change notification settings - Fork 24
/
example.go
59 lines (52 loc) · 1.07 KB
/
example.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
47
48
49
50
51
52
53
54
55
56
57
58
59
package main
import (
"fmt"
"github.com/k0kubun/pp"
"github.com/pepabo/go-netapp/netapp"
)
func main() {
c, err := netapp.NewClient(
"https://localhost:1443",
"1.20",
&netapp.ClientOptions{
BasicAuthUser: "oohori",
BasicAuthPassword: "F:T3pxJSEbuMLuWh",
SSLVerify: false,
Debug: true,
},
)
if err != nil {
panic(err)
}
q := "f8e9666a-364a-4eb0-98b9-1dc78d5ba641"
ql, _, _ := c.Quota.List(
&netapp.QuotaOptions{
Query: &netapp.QuotaQuery{
QuotaEntry: &netapp.QuotaEntry{
Volume: "volume6",
QuotaTarget: fmt.Sprintf("/vol/%s/%s", "volume6", q),
}},
})
pp.Println(ql)
/*
qll := ql.Results.AttributesList.QuotaEntry[0]
qll.FileLimit = strconv.Itoa(160000)
qll.Vserver = ""
qlu, _, err := c.Quota.Update(
"cl1_nfs01",
&qll,
)
qqq, _, err := c.Qtree.List(&netapp.QtreeOptions{
MaxRecords: 1,
Query: &netapp.QtreeQuery{
QtreeInfo: &netapp.QtreeInfo{
Vserver: "cl1_nfs01",
Volume: "volume6",
Qtree: q,
},
},
})
pp.Println(qqq)
pp.Println(err)
*/
}