feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 1 | package volumeactions |
| 2 | |
jrperritt | 9b7b9e6 | 2016-07-11 22:30:50 -0500 | [diff] [blame] | 3 | import "github.com/gophercloud/gophercloud" |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 4 | |
| 5 | // AttachResult contains the response body and error from a Get request. |
| 6 | type AttachResult struct { |
Jamie Hannaford | 531e0cc | 2016-05-13 13:03:39 +0200 | [diff] [blame] | 7 | gophercloud.ErrResult |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 8 | } |
| 9 | |
Eugene Yakubovich | b3a4f33 | 2016-10-13 11:01:06 -0700 | [diff] [blame] | 10 | // BeginDetachingResult contains the response body and error from a Get request. |
| 11 | type BeginDetachingResult struct { |
| 12 | gophercloud.ErrResult |
| 13 | } |
| 14 | |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 15 | // DetachResult contains the response body and error from a Get request. |
| 16 | type DetachResult struct { |
Jamie Hannaford | 531e0cc | 2016-05-13 13:03:39 +0200 | [diff] [blame] | 17 | gophercloud.ErrResult |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | // ReserveResult contains the response body and error from a Get request. |
| 21 | type ReserveResult struct { |
Jamie Hannaford | 531e0cc | 2016-05-13 13:03:39 +0200 | [diff] [blame] | 22 | gophercloud.ErrResult |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | // UnreserveResult contains the response body and error from a Get request. |
| 26 | type UnreserveResult struct { |
Jamie Hannaford | 531e0cc | 2016-05-13 13:03:39 +0200 | [diff] [blame] | 27 | gophercloud.ErrResult |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 28 | } |
| 29 | |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 30 | // TerminateConnectionResult contains the response body and error from a Get request. |
| 31 | type TerminateConnectionResult struct { |
Jamie Hannaford | 531e0cc | 2016-05-13 13:03:39 +0200 | [diff] [blame] | 32 | gophercloud.ErrResult |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 33 | } |
| 34 | |
jrperritt | 9b7b9e6 | 2016-07-11 22:30:50 -0500 | [diff] [blame] | 35 | type commonResult struct { |
| 36 | gophercloud.Result |
| 37 | } |
| 38 | |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 39 | // Extract will get the Volume object out of the commonResult object. |
| 40 | func (r commonResult) Extract() (map[string]interface{}, error) { |
jrperritt | 9b7b9e6 | 2016-07-11 22:30:50 -0500 | [diff] [blame] | 41 | var s struct { |
| 42 | ConnectionInfo map[string]interface{} `json:"connection_info"` |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 43 | } |
jrperritt | 9b7b9e6 | 2016-07-11 22:30:50 -0500 | [diff] [blame] | 44 | err := r.ExtractInto(&s) |
| 45 | return s.ConnectionInfo, err |
| 46 | } |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 47 | |
jrperritt | 9b7b9e6 | 2016-07-11 22:30:50 -0500 | [diff] [blame] | 48 | // InitializeConnectionResult contains the response body and error from a Get request. |
| 49 | type InitializeConnectionResult struct { |
| 50 | commonResult |
feisky | cf0c7fe | 2015-11-05 22:06:17 +0800 | [diff] [blame] | 51 | } |
Mario Luan | a4d4930 | 2016-09-02 11:37:24 -0400 | [diff] [blame] | 52 | |
| 53 | // ExtendSizeResult contains the response body and error from an ExtendSize request. |
| 54 | type ExtendSizeResult struct { |
| 55 | gophercloud.ErrResult |
| 56 | } |