Rackspace Auto Scale: Add policies Execute()
diff --git a/rackspace/autoscale/v1/policies/requests.go b/rackspace/autoscale/v1/policies/requests.go
index 1ce7b11..8b56c2e 100644
--- a/rackspace/autoscale/v1/policies/requests.go
+++ b/rackspace/autoscale/v1/policies/requests.go
@@ -216,3 +216,15 @@
return result
}
+
+// Execute requests the given policy be executed immediately.
+func Execute(client *gophercloud.ServiceClient, groupID, policyID string) ExecuteResult {
+ var result ExecuteResult
+
+ url := executeURL(client, groupID, policyID)
+ _, result.Err = client.Post(url, nil, &result.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{202},
+ })
+
+ return result
+}