func (c *profileCmd) doProfileAssign(client *lxd.Client, d string, p string) error { resp, err := client.AssignProfile(d, p) if err != nil { return err } err = client.WaitForSuccess(resp.Operation) if err == nil { if p == "" { p = i18n.G("(none)") } fmt.Printf(i18n.G("Profiles %s applied to %s")+"\n", p, d) } return err }