blob: e5131c7d513ab194be0edb085a5aa7cb34fce092 [file] [log] [blame]
// +build acceptance db
package v1
import (
os "github.com/rackspace/gophercloud/openstack/db/v1/flavors"
"github.com/rackspace/gophercloud/pagination"
"github.com/rackspace/gophercloud/rackspace/db/v1/flavors"
)
func (c context) listFlavors() {
c.Logf("Listing flavors")
err := flavors.List(c.client).EachPage(func(page pagination.Page) (bool, error) {
flavorList, err := os.ExtractFlavors(page)
c.AssertNoErr(err)
for _, f := range flavorList {
c.Logf("Flavor: %#v", f)
}
return true, nil
})
c.AssertNoErr(err)
}
func (c context) getFlavor() {
flavor, err := flavors.Get(c.client, 1).Extract()
c.Logf("Getting flavor %s", flavor.ID)
c.AssertNoErr(err)
}