blob: f9e81208105b85192b6fa549e93aa084c0e00df7 [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
10// DetachResult contains the response body and error from a Get request.
11type DetachResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020012 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080013}
14
15// ReserveResult contains the response body and error from a Get request.
16type ReserveResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020017 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080018}
19
20// UnreserveResult contains the response body and error from a Get request.
21type UnreserveResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020022 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080023}
24
feiskycf0c7fe2015-11-05 22:06:17 +080025// TerminateConnectionResult contains the response body and error from a Get request.
26type TerminateConnectionResult struct {
Jamie Hannaford531e0cc2016-05-13 13:03:39 +020027 gophercloud.ErrResult
feiskycf0c7fe2015-11-05 22:06:17 +080028}
29
jrperritt9b7b9e62016-07-11 22:30:50 -050030type commonResult struct {
31 gophercloud.Result
32}
33
feiskycf0c7fe2015-11-05 22:06:17 +080034// Extract will get the Volume object out of the commonResult object.
35func (r commonResult) Extract() (map[string]interface{}, error) {
jrperritt9b7b9e62016-07-11 22:30:50 -050036 var s struct {
37 ConnectionInfo map[string]interface{} `json:"connection_info"`
feiskycf0c7fe2015-11-05 22:06:17 +080038 }
jrperritt9b7b9e62016-07-11 22:30:50 -050039 err := r.ExtractInto(&s)
40 return s.ConnectionInfo, err
41}
feiskycf0c7fe2015-11-05 22:06:17 +080042
jrperritt9b7b9e62016-07-11 22:30:50 -050043// InitializeConnectionResult contains the response body and error from a Get request.
44type InitializeConnectionResult struct {
45 commonResult
feiskycf0c7fe2015-11-05 22:06:17 +080046}
Mario Luana4d49302016-09-02 11:37:24 -040047
48// ExtendSizeResult contains the response body and error from an ExtendSize request.
49type ExtendSizeResult struct {
50 gophercloud.ErrResult
51}