-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathstorage.go
More file actions
21 lines (14 loc) · 751 Bytes
/
storage.go
File metadata and controls
21 lines (14 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package gounity
import types "github.com/equelin/gounity/types/v1"
//GetPool purpose is to get information about pool in the storage system. .
func (session *Session) GetPool() (resp *types.Pool, err error) {
fields := "id,name,sizeFree,sizeTotal,sizeUsed,sizeSubscribed"
err = session.Request("GET", "/api/types/pool/instances", fields, "", false, nil, &resp)
return resp, err
}
//GetStorageResource purpose is to get information about storage resources in the storage system.
func (session *Session) GetStorageResource() (resp *types.StorageResource, err error) {
fields := "id,name,sizeAllocated,sizeTotal,sizeUsed"
err = session.Request("GET", "/api/types/storageResource/instances", fields, "", false, nil, &resp)
return resp, err
}