Simplify pool management.

This commit is contained in:
Michael Lipp 2025-01-15 21:58:08 +01:00
parent 4943baf3e3
commit bd5227fda3
2 changed files with 53 additions and 71 deletions

View file

@ -36,10 +36,20 @@ import org.jdrupes.vmoperator.util.DataPath;
public class VmPool {
private String name;
private boolean defined;
private List<Grant> permissions = Collections.emptyList();
private final Set<String> vms
= Collections.synchronizedSet(new HashSet<>());
/**
* Instantiates a new vm pool.
*
* @param name the name
*/
public VmPool(String name) {
this.name = name;
}
/**
* Returns the name.
*
@ -58,6 +68,24 @@ public class VmPool {
this.name = name;
}
/**
* Checks if is defined.
*
* @return the result
*/
public boolean isDefined() {
return defined;
}
/**
* Sets if is.
*
* @param defined the defined to set
*/
public void setDefined(boolean defined) {
this.defined = defined;
}
/**
* Permissions granted for a VM from the pool.
*