func (sr ApplicationResources) Updates() ([]resource.Resource, error) {
	storeResources, err := sr.alignStoreResources()
	if err != nil {
		return nil, errors.Trace(err)
	}

	var updates []resource.Resource
	for i, res := range sr.Resources {
		if res.Origin != resource.OriginStore {
			continue
		}
		csRes := storeResources[i]
		// If the revision is the same then all the other info must be.
		if res.Revision == csRes.Revision {
			continue
		}
		updates = append(updates, csRes)
	}
	return updates, nil
}
// Updates returns the list of charm store resources corresponding to
// the application's resources that are out of date. Note that there must be
// a charm store resource for each of the application resources and
// vice-versa. If they are out of sync then an error is returned.
Updates returns the list of charm store resources corresponding to
the application's resources that are out of date. Note that there must be
a charm store resource for each of the application resources and
vice-versa. If they are out of sync then an error is returned.
// Updates returns the list of charm store resources corresponding to // the application ' s resources that are out of date . Note that there must be // a charm store resource for each of the application resources and // vice - versa . If they are out of sync then an error is returned .
func (sr ApplicationResources) Updates() ([]resource.Resource, error) {
	storeResources, err := sr.alignStoreResources()
	if err != nil {
		return nil, errors.Trace(err)
	}
	var updates []resource.Resource
	for i, res := range sr.Resources {
		if res.Origin != resource.OriginStore {
			continue
		}
		csRes := storeResources[i]
		if res.Revision == csRes.Revision {
			continue
		}
		updates = append(updates, csRes)
	}
	return updates, nil
}
func ( sr ApplicationResources ) Updates ( ) ( [ ] resource . Resource , error ) { storeResources , err := sr . alignStoreResources ( ) if err != nil { return nil , errors . Trace ( err ) } var updates [ ] resource . Resource for i , res := range sr . Resources { if res . Origin != resource . OriginStore { continue } csRes := storeResources [ i ] if res . Revision == csRes . Revision { continue } updates = append ( updates , csRes ) } return updates , nil }
Updates returns the list of charm store resources corresponding to
the application's resources that are out of date.
Updates returns the list of charm store resources corresponding to the application ' s resources that are out of date .
// If the revision is the same then all the other info must be.