Ejemplo n.º 1
0
  public static Set<Guid> collectForHost(PendingResourceManager manager, Guid host) {
    Set<Guid> ids = new HashSet<>();

    for (PendingVM pending : manager.pendingHostResources(host, PendingVM.class)) {
      ids.add(pending.getVm());
    }

    return ids;
  }
Ejemplo n.º 2
0
 public static Guid getScheduledHost(PendingResourceManager manager, VM vm) {
   PendingVM template = new PendingVM((Guid) null, vm);
   PendingVM pending = manager.getExactPendingResource(template);
   return pending == null ? null : pending.getHost();
 }