blob: e121f68376b3418697b050b928a2e2ea327739bf [file] [log] [blame]
// +build acceptance db
package v1
import (
"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, c.instanceID).EachPage(func(page pagination.Page) (bool, error) {
flavorList, err := db.ExtractFlavors(page)
c.AssertNoErr(err)
for _, f := range flavorList {
c.Logf("Flavor: %#v", f)
}
return true, nil
})
c.CheckNoErr(err)
}
func (c context) getFlavor() {
flavor, err := flavors.Get(c.client, "1").Extract()
c.Logf("Getting flavor %s", flavor.ID)
c.CheckNoErr(err)
}