blob: fc547cde5f4c9f9d865577dd412d7189bdf9bd14 [file] [log] [blame]
Ash Wilsonf4d63632014-10-09 14:54:06 -04001package extensions
2
3import (
4 "github.com/rackspace/gophercloud"
5 common "github.com/rackspace/gophercloud/openstack/common/extensions"
Ash Wilsonf4d63632014-10-09 14:54:06 -04006 "github.com/rackspace/gophercloud/pagination"
7)
8
Ash Wilsonf4d63632014-10-09 14:54:06 -04009// ExtractExtensions accepts a Page struct, specifically an ExtensionPage struct, and extracts the
10// elements into a slice of os.Extension structs.
Ash Wilson56d97a62014-10-13 12:07:47 -040011func ExtractExtensions(page pagination.Page) ([]common.Extension, error) {
12 return common.ExtractExtensions(page)
Ash Wilsonf4d63632014-10-09 14:54:06 -040013}
14
15// Get retrieves information for a specific extension using its alias.
Ash Wilson56d97a62014-10-13 12:07:47 -040016func Get(c *gophercloud.ServiceClient, alias string) common.GetResult {
17 return common.Get(c, alias)
Ash Wilsonf4d63632014-10-09 14:54:06 -040018}
19
20// List returns a Pager which allows you to iterate over the full collection of extensions.
21// It does not accept query parameters.
22func List(c *gophercloud.ServiceClient) pagination.Pager {
Ash Wilson56d97a62014-10-13 12:07:47 -040023 return common.List(c)
Ash Wilsonf4d63632014-10-09 14:54:06 -040024}