'Template method, so a subclass can implement caching.'

def _get_all_host_states(self, context, spec_obj, provider_summaries):

    compute_uuids = None
    if (provider_summaries is not None):
        compute_uuids = list(provider_summaries.keys())
    return self.host_manager.get_host_states_by_uuids(context, compute_uuids, spec_obj)
