Finalizing acceptance tests for subnets
diff --git a/openstack/networking/v2/networks/requests.go b/openstack/networking/v2/networks/requests.go
index 7cb3598..5782543 100644
--- a/openstack/networking/v2/networks/requests.go
+++ b/openstack/networking/v2/networks/requests.go
@@ -169,7 +169,7 @@
MoreHeaders: c.Provider.AuthenticatedHeaders(),
ReqBody: &reqBody,
Results: &res,
- OkCodes: []int{200},
+ OkCodes: []int{200, 201},
})
if err != nil {
return nil, err
diff --git a/openstack/networking/v2/subnets/requests.go b/openstack/networking/v2/subnets/requests.go
index f10bf18..436e109 100644
--- a/openstack/networking/v2/subnets/requests.go
+++ b/openstack/networking/v2/subnets/requests.go
@@ -18,6 +18,9 @@
GatewayIP string
CIDR string
ID string
+ Limit int
+ Page string
+ PerPage string
}
func List(c *gophercloud.ServiceClient, opts ListOpts) pagination.Pager {
@@ -47,6 +50,15 @@
if opts.ID != "" {
q["id"] = opts.ID
}
+ if opts.Limit != 0 {
+ q["limit"] = strconv.Itoa(opts.Limit)
+ }
+ if opts.Page != "" {
+ q["page"] = opts.Page
+ }
+ if opts.PerPage != "" {
+ q["per_page"] = opts.PerPage
+ }
u := ListURL(c) + utils.BuildQuery(q)
return pagination.NewPager(c, u, func(r pagination.LastHTTPResponse) pagination.Page {
@@ -202,7 +214,7 @@
MoreHeaders: c.Provider.AuthenticatedHeaders(),
ReqBody: &reqBody,
Results: &res,
- OkCodes: []int{201},
+ OkCodes: []int{200, 201},
})
if err != nil {
return nil, err