func (c *Client) ResolveUnitErrors(units []string, all, retry bool) error {
	if len(units) > 0 && all {
		return errors.NotSupportedf("specifying units with all=true")
	}
	if len(units) != set.NewStrings(units...).Size() {
		return errors.New("duplicate unit specified")
	}
	args := params.UnitsResolved{
		All:   all,
		Retry: retry,
	}
	if !all {
		entities := make([]params.Entity, len(units))
		for i, unit := range units {
			if !names.IsValidUnit(unit) {
				return errors.NotValidf("unit name %q", unit)
			}
			entities[i].Tag = names.NewUnitTag(unit).String()
		}
		args.Tags = params.Entities{Entities: entities}
	}

	results := new(params.ErrorResults)
	err := c.facade.FacadeCall("ResolveUnitErrors", args, results)
	if err != nil {
		return errors.Trace(err)
	}
	return errors.Trace(results.Combine())
}
// ResolveUnitErrors clears errors on one or more units.
// Either specify one or more units, or all.
ResolveUnitErrors clears errors on one or more units.
Either specify one or more units, or all.
// ResolveUnitErrors clears errors on one or more units . // Either specify one or more units or all .
func (c *Client) ResolveUnitErrors(units []string, all, retry bool) error {
	if len(units) > 0 && all {
		return errors.NotSupportedf("specifying units with all=true")
	}
	if len(units) != set.NewStrings(units...).Size() {
		return errors.New("duplicate unit specified")
	}
	args := params.UnitsResolved{
		All:   all,
		Retry: retry,
	}
	if !all {
		entities := make([]params.Entity, len(units))
		for i, unit := range units {
			if !names.IsValidUnit(unit) {
				return errors.NotValidf("unit name %q", unit)
			}
			entities[i].Tag = names.NewUnitTag(unit).String()
		}
		args.Tags = params.Entities{Entities: entities}
	}
	results := new(params.ErrorResults)
	err := c.facade.FacadeCall("ResolveUnitErrors", args, results)
	if err != nil {
		return errors.Trace(err)
	}
	return errors.Trace(results.Combine())
}
func ( c * Client ) ResolveUnitErrors ( units [ ] string , all , retry bool ) error { if len ( units ) > 0 && all { return errors . NotSupportedf ( " " ) } if len ( units ) != set . NewStrings ( units ... ) . Size ( ) { return errors . New ( " " ) } args := params . UnitsResolved { All : all , Retry : retry , } if ! all { entities := make ( [ ] params . Entity , len ( units ) ) for i , unit := range units { if ! names . IsValidUnit ( unit ) { return errors . NotValidf ( " " , unit ) } entities [ i ] . Tag = names . NewUnitTag ( unit ) . String ( ) } args . Tags = params . Entities { Entities : entities } } results := new ( params . ErrorResults ) err := c . facade . FacadeCall ( " " , args , results ) if err != nil { return errors . Trace ( err ) } return errors . Trace ( results . Combine ( ) ) }
ResolveUnitErrors clears errors on one or more units.
ResolveUnitErrors clears errors on one or more units .