blob: 0d20bb170720dfdb593815edbbfdef4eb2a4863e [file] [log] [blame]
Jamie Hannaford7db63f22014-09-29 11:18:45 +02001package external
2
3import "github.com/rackspace/gophercloud/openstack/networking/v2/networks"
4
5type CreateOpts struct {
6 Parent networks.CreateOpts
7 External bool
8}
9
10func (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
18func (o CreateOpts) IsCreateOpts() bool { return true }
19
20type UpdateOpts struct {
21 Parent networks.UpdateOpts
22 External bool
23}
24
25func (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
33func (o UpdateOpts) IsUpdateOpts() bool { return true }