blob: b5695b7654d844d59cf0417e088ea99c0fffd9f9 [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
20// ReserveResult contains the response body and error from a Get request.
21type ReserveResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020022 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080023}
24
25// UnreserveResult contains the response body and error from a Get request.
26type UnreserveResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020027 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080028}
29
feiskycf0c7fe2015-11-05 22:06:17 +080030// TerminateConnectionResult contains the response body and error from a Get request.
31type TerminateConnectionResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020032 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080033}
34
jrperritt9b7b9e62016-07-11 22:30:50 -050035type commonResult struct {
36 gophercloud.Result
37}
38
feiskycf0c7fe2015-11-05 22:06:17 +080039// Extract will get the Volume object out of the commonResult object.
40func (r commonResult) Extract() (map[string]interface{}, error) {
jrperritt9b7b9e62016-07-11 22:30:50 -050041 var s struct {
42 ConnectionInfo map[string]interface{} `json:"connection_info"`
feiskycf0c7fe2015-11-05 22:06:17 +080043 }
jrperritt9b7b9e62016-07-11 22:30:50 -050044 err := r.ExtractInto(&s)
45 return s.ConnectionInfo, err
46}
feiskycf0c7fe2015-11-05 22:06:17 +080047
jrperritt9b7b9e62016-07-11 22:30:50 -050048// InitializeConnectionResult contains the response body and error from a Get request.
49type InitializeConnectionResult struct {
50 commonResult
feiskycf0c7fe2015-11-05 22:06:17 +080051}
Mario Luana4d49302016-09-02 11:37:24 -040052
53// ExtendSizeResult contains the response body and error from an ExtendSize request.
54type ExtendSizeResult struct {
55 gophercloud.ErrResult
56}