func (c context) WaitUntilActive(id string) { err := gophercloud.WaitFor(60, func() (bool, error) { inst, err := instances.Get(c.client, id).Extract() if err != nil { return false, err } if inst.Status == "ACTIVE" { return true, nil } return false, nil }) c.AssertNoErr(err) }
// Get retrieves the status and information for a specified database instance. func Get(client *gophercloud.ServiceClient, id string) GetResult { return GetResult{os.Get(client, id)} }
func (c context) getInstance() { instance, err := instances.Get(c.client, c.instanceID).Extract() c.AssertNoErr(err) c.Logf("Getting instance: %s", instance.ID) }