blob: 3ba66f5196a61fbe2a323239bb42006c152798c8 [file] [log] [blame]
Ash Wilson0e5b92a2014-10-23 11:42:04 -04001package diskconfig
2
Jon Perritt12395212016-02-24 10:41:17 -06003import "github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
Ash Wilson0e5b92a2014-10-23 11:42:04 -04004
Jon Perritt12395212016-02-24 10:41:17 -06005type ServerWithDiskConfig struct {
6 servers.Server
7 DiskConfig DiskConfig `json:"OS-DCF:diskConfig"`
Ash Wilson0e5b92a2014-10-23 11:42:04 -04008}
Ash Wilson0e5b92a2014-10-23 11:42:04 -04009
jrperritt9b7b9e62016-07-11 22:30:50 -050010func (s ServerWithDiskConfig) ToServerCreateResult() (m map[string]interface{}) {
11 m["OS-DCF:diskConfig"] = s.DiskConfig
12 return
Ash Wilson0e5b92a2014-10-23 11:42:04 -040013}
14
jrperritt9b7b9e62016-07-11 22:30:50 -050015type CreateServerResultBuilder interface {
16 ToServerCreateResult() map[string]interface{}
Ash Wilson0e5b92a2014-10-23 11:42:04 -040017}