-
Notifications
You must be signed in to change notification settings - Fork 0
/
ontapTypes.go
116 lines (104 loc) · 2.82 KB
/
ontapTypes.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package main
import (
"time"
"github.com/pivotal-cf/brokerapi/v7/domain"
)
type Aggregate struct {
Name string `json:"name,omitempty"`
UUID string `json:"uuid,omitempty"`
}
type Volume struct {
Aggregates []Aggregate `json:"aggregates"`
Comment string `json:"comment"`
Name string `json:"name"`
Size int64 `json:"size"`
Svm struct {
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
} `json:"svm"`
Nas struct {
GID int `json:"gid"`
UID int `json:"uid"`
Path string `json:"path"`
ExportPolicy struct {
Name string `json:"name"`
} `json:"export_policy"`
} `json:"nas"`
}
type CifsAccess struct {
Access string `json:"access"`
UserOrGroup string `json:"user_or_group"`
}
type ApplicationComponents struct {
Name string `json:"name"`
TotalSize int64 `json:"total_size"`
ShareCount int `json:"share_count"`
ScaleOut bool `json:"scale_out"`
Tiering struct {
Control string `json:"control"`
} `json:"tiering"`
StorageService struct {
Name string `json:"name"`
} `json:"storage_service"`
}
type CifsApplication struct {
Name string `json:"name"`
SmartContainer bool `json:"smart_container"`
Svm struct {
Name string `json:"name"`
} `json:"svm"`
Nas struct {
NfsAccess []interface{} `json:"nfs_access"`
CifsAccess []CifsAccess `json:"cifs_access"`
ApplicationComponents []ApplicationComponents `json:"application_components"`
ProtectionType struct {
RemoteRpo string `json:"remote_rpo"`
LocalPolicy string `json:"local_policy"`
} `json:"protection_type"`
} `json:"nas"`
Template struct {
Name string `json:"name"`
} `json:"template"`
}
type AcceptResponse struct {
Job struct {
UUID string `json:"uuid"`
Links struct {
Self struct {
Href string `json:"href"`
} `json:"self"`
} `json:"_links"`
} `json:"job"`
}
type JobStatus struct {
UUID string `json:"uuid"`
Description string `json:"description"`
State string `json:"state"`
Message string `json:"message"`
Code int `json:"code"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Links struct {
Self struct {
Href string `json:"href"`
} `json:"self"`
} `json:"_links"`
}
// maps ontap status to broker status
var statusMap = map[string]domain.LastOperationState{
"success": domain.Succeeded,
"running": domain.InProgress,
"failure": domain.Failed,
}
type ResultList struct {
Records []struct {
UUID string `json:"uuid"`
Name string `json:"name"`
} `json:"records"`
NumRecords int `json:"num_records"`
}
type cifsACL struct {
UserOrGroup string `json:"user_or_group"`
Type string `json:"type"`
Permission string `json:"permission"`
}