class AdministrationAgent implements InitializingBean {

    protected List<HostResources> getClusterIdleHosts(ClusterVO cluster) {
        List<HostResources> hosts = getClusterUpHosts(cluster);
        List<HostResources> hostsIdle = new ArrayList<>();
        for (HostResources currentHost : hosts) {
            if (CollectionUtils.isEmpty(currentHost.getVmsResources())) {
                hostsIdle.add(currentHost);
            }
        }
        return hostsIdle;
    }

}