Ash Wilson | 0e5b92a | 2014-10-23 11:42:04 -0400 | [diff] [blame] | 1 | package diskconfig |
| 2 | |
Jon Perritt | 1239521 | 2016-02-24 10:41:17 -0600 | [diff] [blame] | 3 | import "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" |
Ash Wilson | 0e5b92a | 2014-10-23 11:42:04 -0400 | [diff] [blame] | 4 | |
Jon Perritt | 1239521 | 2016-02-24 10:41:17 -0600 | [diff] [blame] | 5 | type ServerWithDiskConfig struct { |
| 6 | servers.Server |
| 7 | DiskConfig DiskConfig `json:"OS-DCF:diskConfig"` |
Ash Wilson | 0e5b92a | 2014-10-23 11:42:04 -0400 | [diff] [blame] | 8 | } |
Ash Wilson | 0e5b92a | 2014-10-23 11:42:04 -0400 | [diff] [blame] | 9 | |
jrperritt | 9b7b9e6 | 2016-07-11 22:30:50 -0500 | [diff] [blame] | 10 | func (s ServerWithDiskConfig) ToServerCreateResult() (m map[string]interface{}) { |
| 11 | m["OS-DCF:diskConfig"] = s.DiskConfig |
| 12 | return |
Ash Wilson | 0e5b92a | 2014-10-23 11:42:04 -0400 | [diff] [blame] | 13 | } |
| 14 | |
jrperritt | 9b7b9e6 | 2016-07-11 22:30:50 -0500 | [diff] [blame] | 15 | type CreateServerResultBuilder interface { |
| 16 | ToServerCreateResult() map[string]interface{} |
Ash Wilson | 0e5b92a | 2014-10-23 11:42:04 -0400 | [diff] [blame] | 17 | } |