blob: 634b04d8d63b7b197cad8ae9d9038e22e49914a0 [file] [log] [blame]
feiskycf0c7fe2015-11-05 22:06:17 +08001package volumeactions
2
jrperritt9b7b9e62016-07-11 22:30:50 -05003import "github.com/gophercloud/gophercloud"
feiskycf0c7fe2015-11-05 22:06:17 +08004
5// AttachResult contains the response body and error from a Get request.
6type AttachResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +02007 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +08008}
9
Eugene Yakubovichb3a4f332016-10-13 11:01:06 -070010// BeginDetachingResult contains the response body and error from a Get request.
11type BeginDetachingResult struct {
12 gophercloud.ErrResult
13}
14
feiskycf0c7fe2015-11-05 22:06:17 +080015// DetachResult contains the response body and error from a Get request.
16type DetachResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020017 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080018}
19
Joe Topjian48f36ae2017-02-20 14:36:44 -070020// UploadImageResult contains the response body and error from a UploadImage request.
21type UploadImageResult struct {
22 gophercloud.ErrResult
23}
24
feiskycf0c7fe2015-11-05 22:06:17 +080025// ReserveResult contains the response body and error from a Get request.
26type ReserveResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020027 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080028}
29
30// UnreserveResult contains the response body and error from a Get request.
31type UnreserveResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020032 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080033}
34
feiskycf0c7fe2015-11-05 22:06:17 +080035// TerminateConnectionResult contains the response body and error from a Get request.
36type TerminateConnectionResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020037 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080038}
39
jrperritt9b7b9e62016-07-11 22:30:50 -050040type commonResult struct {
41 gophercloud.Result
42}
43
feiskycf0c7fe2015-11-05 22:06:17 +080044// Extract will get the Volume object out of the commonResult object.
45func (r commonResult) Extract() (map[string]interface{}, error) {
jrperritt9b7b9e62016-07-11 22:30:50 -050046 var s struct {
47 ConnectionInfo map[string]interface{} `json:"connection_info"`
feiskycf0c7fe2015-11-05 22:06:17 +080048 }
jrperritt9b7b9e62016-07-11 22:30:50 -050049 err := r.ExtractInto(&s)
50 return s.ConnectionInfo, err
51}
feiskycf0c7fe2015-11-05 22:06:17 +080052
jrperritt9b7b9e62016-07-11 22:30:50 -050053// InitializeConnectionResult contains the response body and error from a Get request.
54type InitializeConnectionResult struct {
55 commonResult
feiskycf0c7fe2015-11-05 22:06:17 +080056}
Mario Luana4d49302016-09-02 11:37:24 -040057
58// ExtendSizeResult contains the response body and error from an ExtendSize request.
59type ExtendSizeResult struct {
60 gophercloud.ErrResult
61}