Delete all network items from access list
diff --git a/rackspace/lb/v1/acl/requests.go b/rackspace/lb/v1/acl/requests.go
index 90cd7f3..ed58a85 100644
--- a/rackspace/lb/v1/acl/requests.go
+++ b/rackspace/lb/v1/acl/requests.go
@@ -108,3 +108,12 @@
})
return res
}
+
+func DeleteAll(c *gophercloud.ServiceClient, lbID int) DeleteResult {
+ var res DeleteResult
+ _, res.Err = perigee.Request("DELETE", rootURL(c, lbID), perigee.Options{
+ MoreHeaders: c.AuthenticatedHeaders(),
+ OkCodes: []int{200},
+ })
+ return res
+}
diff --git a/rackspace/lb/v1/acl/requests_test.go b/rackspace/lb/v1/acl/requests_test.go
index 785acde..c4961a3 100644
--- a/rackspace/lb/v1/acl/requests_test.go
+++ b/rackspace/lb/v1/acl/requests_test.go
@@ -79,3 +79,13 @@
err := Delete(client.ServiceClient(), lbID, itemID1).ExtractErr()
th.AssertNoErr(t, err)
}
+
+func TestDeleteAll(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+
+ mockDeleteAllResponse(t, lbID)
+
+ err := DeleteAll(client.ServiceClient(), lbID).ExtractErr()
+ th.AssertNoErr(t, err)
+}