Jamie Hannaford | 7db63f2 | 2014-09-29 11:18:45 +0200 | [diff] [blame] | 1 | package external |
| 2 | |
| 3 | import "github.com/rackspace/gophercloud/openstack/networking/v2/networks" |
| 4 | |
| 5 | type CreateOpts struct { |
| 6 | Parent networks.CreateOpts |
| 7 | External bool |
| 8 | } |
| 9 | |
| 10 | func (o CreateOpts) ToMap() map[string]map[string]interface{} { |
| 11 | outer := o.Parent.ToMap() |
| 12 | |
| 13 | outer["network"]["router:external"] = o.External |
| 14 | |
| 15 | return outer |
| 16 | } |
| 17 | |
| 18 | func (o CreateOpts) IsCreateOpts() bool { return true } |
| 19 | |
| 20 | type UpdateOpts struct { |
| 21 | Parent networks.UpdateOpts |
| 22 | External bool |
| 23 | } |
| 24 | |
| 25 | func (o UpdateOpts) ToMap() map[string]map[string]interface{} { |
| 26 | outer := o.Parent.ToMap() |
| 27 | |
| 28 | outer["network"]["router:external"] = o.External |
| 29 | |
| 30 | return outer |
| 31 | } |
| 32 | |
| 33 | func (o UpdateOpts) IsUpdateOpts() bool { return true } |