provider/openstack: gophercloud migration: Ordering tweak in types.go - Now alphabetical :)

This commit is contained in:
Gavin Williams 2016-10-06 16:04:21 +01:00 committed by Joe Topjian
parent bfab530410
commit e7ef8bb647
1 changed files with 12 additions and 12 deletions

View File

@ -19,18 +19,6 @@ func (opts NetworkCreateOpts) ToNetworkCreateMap() (map[string]interface{}, erro
return BuildRequest(opts, "network") return BuildRequest(opts, "network")
} }
// SubnetCreateOpts represents the attributes used when creating a new subnet.
type SubnetCreateOpts struct {
subnets.CreateOpts
ValueSpecs map[string]string `json:"value_specs,omitempty"`
}
// ToSubnetCreateMap casts a CreateOpts struct to a map.
// It overrides subnets.ToSubnetCreateMap to add the ValueSpecs field.
func (opts SubnetCreateOpts) ToSubnetCreateMap() (map[string]interface{}, error) {
return BuildRequest(opts, "subnet")
}
// RouterCreateOpts represents the attributes used when creating a new router. // RouterCreateOpts represents the attributes used when creating a new router.
type RouterCreateOpts struct { type RouterCreateOpts struct {
routers.CreateOpts routers.CreateOpts
@ -42,3 +30,15 @@ type RouterCreateOpts struct {
func (opts RouterCreateOpts) ToRouterCreateMap() (map[string]interface{}, error) { func (opts RouterCreateOpts) ToRouterCreateMap() (map[string]interface{}, error) {
return BuildRequest(opts, "router") return BuildRequest(opts, "router")
} }
// SubnetCreateOpts represents the attributes used when creating a new subnet.
type SubnetCreateOpts struct {
subnets.CreateOpts
ValueSpecs map[string]string `json:"value_specs,omitempty"`
}
// ToSubnetCreateMap casts a CreateOpts struct to a map.
// It overrides subnets.ToSubnetCreateMap to add the ValueSpecs field.
func (opts SubnetCreateOpts) ToSubnetCreateMap() (map[string]interface{}, error) {
return BuildRequest(opts, "subnet")
}