blob: 95ae39c95ae5ed888ee9770e06f962d84951f257 [file] [log] [blame]
Samuel A. Falvo II0262e972014-01-24 16:06:56 -08001package notificationPlans
2
3import (
4 "fmt"
Samuel A. Falvo II0262e972014-01-24 16:06:56 -08005 "github.com/racker/perigee"
Samuel A. Falvo IId7aa3bd2014-01-24 16:11:10 -08006 "github.com/rackspace/gophercloud/rackspace/monitoring"
Samuel A. Falvo II0262e972014-01-24 16:06:56 -08007)
8
9var ErrNotImplemented = fmt.Errorf("notificationPlans feature not yet implemented")
10
11type Client struct {
12 options monitoring.Options
13}
14
15type DeleteResults map[string]interface{}
16
17func NewClient(mo monitoring.Options) *Client {
18 return &Client{
19 options: mo,
20 }
21}
22
23func (c *Client) Delete(id string) (DeleteResults, error) {
24 var dr DeleteResults
25
26 url := fmt.Sprintf("%s/notification_plans/%s", c.options.Endpoint, id)
27 err := perigee.Delete(url, perigee.Options{
28 Results: &dr,
29 OkCodes: []int{204},
30 })
31 return dr, err
32}