func (u *UpgradeSeriesAPI) UpgradeSeriesUnitStatus() (model.UpgradeSeriesStatus, string, error) {
	var results params.UpgradeSeriesStatusResults
	args := params.Entities{
		Entities: []params.Entity{{Tag: u.tag.String()}},
	}

	err := u.facade.FacadeCall("UpgradeSeriesUnitStatus", args, &results)
	if err != nil {
		return "", "", err
	}
	if len(results.Results) != 1 {
		return "", "", errors.Errorf("expected 1 result, got %d", len(results.Results))
	}

	res := results.Results[0]
	if res.Error != nil {
		// TODO (externalreality) The code to convert api errors (with
		// error codes) back to normal Go errors is in bad spot and
		// causes import cycles which is why we don't use it here and may
		// be the reason why it has few uses despite being useful.
		if params.IsCodeNotFound(res.Error) {
			return "", "", errors.NewNotFound(res.Error, "")
		}
		return "", "", res.Error
	}

	return res.Status, res.Target, nil
}
// UpgradeSeriesUnitStatus returns the upgrade series status of a
// unit from remote state.
UpgradeSeriesUnitStatus returns the upgrade series status of a
unit from remote state.
// UpgradeSeriesUnitStatus returns the upgrade series status of a // unit from remote state .
func (u *UpgradeSeriesAPI) UpgradeSeriesUnitStatus() (model.UpgradeSeriesStatus, string, error) {
	var results params.UpgradeSeriesStatusResults
	args := params.Entities{
		Entities: []params.Entity{{Tag: u.tag.String()}},
	}
	err := u.facade.FacadeCall("UpgradeSeriesUnitStatus", args, &results)
	if err != nil {
		return "", "", err
	}
	if len(results.Results) != 1 {
		return "", "", errors.Errorf("expected 1 result, got %d", len(results.Results))
	}
	res := results.Results[0]
	if res.Error != nil {
		if params.IsCodeNotFound(res.Error) {
			return "", "", errors.NewNotFound(res.Error, "")
		}
		return "", "", res.Error
	}
	return res.Status, res.Target, nil
}
func ( u * UpgradeSeriesAPI ) UpgradeSeriesUnitStatus ( ) ( model . UpgradeSeriesStatus , string , error ) { var results params . UpgradeSeriesStatusResults args := params . Entities { Entities : [ ] params . Entity { { Tag : u . tag . String ( ) } } , } err := u . facade . FacadeCall ( " " , args , & results ) if err != nil { return " " , " " , err } if len ( results . Results ) != 1 { return " " , " " , errors . Errorf ( " " , len ( results . Results ) ) } res := results . Results [ 0 ] if res . Error != nil { if params . IsCodeNotFound ( res . Error ) { return " " , " " , errors . NewNotFound ( res . Error , " " ) } return " " , " " , res . Error } return res . Status , res . Target , nil }
UpgradeSeriesUnitStatus returns the upgrade series status of a
unit from remote state.
UpgradeSeriesUnitStatus returns the upgrade series status of a unit from remote state .
// TODO (externalreality) The code to convert api errors (with // error codes) back to normal Go errors is in bad spot and // causes import cycles which is why we don't use it here and may // be the reason why it has few uses despite being useful.