blob: b406c5169dcef2d6d02a5199485e39a7e6c59bfc [file] [log] [blame]
package networks
import (
"github.com/racker/perigee"
"github.com/rackspace/gophercloud"
)
func Get(c *gophercloud.ServiceClient, name string) (*Extension, error) {
var ext Extension
_, err := perigee.Request("GET", ExtensionURL(c, name), perigee.Options{
MoreHeaders: c.Provider.AuthenticatedHeaders(),
Results: &struct {
Extension *Extension `json:"extension"`
}{&ext},
OkCodes: []int{200},
})
if err != nil {
return nil, err
}
return &ext, nil
}