Adding sort_key and sort_dir query params
diff --git a/openstack/networking/v2/subnets/requests.go b/openstack/networking/v2/subnets/requests.go
index 436e109..f592739 100644
--- a/openstack/networking/v2/subnets/requests.go
+++ b/openstack/networking/v2/subnets/requests.go
@@ -21,6 +21,8 @@
Limit int
Page string
PerPage string
+ SortKey string
+ SortDir string
}
func List(c *gophercloud.ServiceClient, opts ListOpts) pagination.Pager {
@@ -59,6 +61,12 @@
if opts.PerPage != "" {
q["per_page"] = opts.PerPage
}
+ if opts.SortKey != "" {
+ q["sort_key"] = opts.SortKey
+ }
+ if opts.SortDir != "" {
+ q["sort_dir"] = opts.SortDir
+ }
u := ListURL(c) + utils.BuildQuery(q)
return pagination.NewPager(c, u, func(r pagination.LastHTTPResponse) pagination.Page {