private int checkAvailability(String vmTypeName, List<Cluster> authorizedClusters)
     throws NotEnoughResourcesException {
   int available = 0;
   for (Cluster authorizedCluster : authorizedClusters) {
     VmTypeAvailability vmAvailability =
         authorizedCluster.getNodeState().getAvailability(vmTypeName);
     available += vmAvailability.getAvailable();
     LOG.info(
         "Availability: "
             + authorizedCluster.getName()
             + " -> "
             + vmAvailability.getAvailable());
   }
   return available;
 }
    private int checkZoneAvailability(
        String vmTypeName, Partition partition, List<Cluster> authorizedClusters)
        throws NotEnoughResourcesException {
      int available = 0;
      for (Cluster authorizedCluster : authorizedClusters) {
        if (!authorizedCluster.getConfiguration().lookupPartition().equals(partition)) continue;

        VmTypeAvailability vmAvailability =
            authorizedCluster.getNodeState().getAvailability(vmTypeName);
        available += vmAvailability.getAvailable();
        LOG.info(
            "Availability: "
                + authorizedCluster.getName()
                + " -> "
                + vmAvailability.getAvailable());
      }
      return available;
    }