use of models.virtualpool.ObjectVirtualPoolForm in project coprhd-controller by CoprHD.
the class ObjectVirtualPools method edit.
public static void edit(String id) {
ObjectVirtualPoolRestRep virtualPool = VirtualPoolUtils.getObjectVirtualPool(id);
if (virtualPool == null) {
flash.error(MessagesUtils.get(UNKNOWN, id));
backToReferrer();
}
ObjectVirtualPoolForm form = new ObjectVirtualPoolForm();
form.load(virtualPool);
edit(form);
}
use of models.virtualpool.ObjectVirtualPoolForm in project coprhd-controller by CoprHD.
the class ObjectVirtualPools method duplicate.
public static void duplicate(String ids) {
ObjectVirtualPoolRestRep targetVPool = VirtualPoolUtils.getObjectVirtualPool(ids);
if (targetVPool == null) {
flash.error(MessagesUtils.get(UNKNOWN, ids));
backToReferrer();
}
ObjectVirtualPoolForm copy = new ObjectVirtualPoolForm();
copy.load(targetVPool);
copy.id = null;
copy.name = Messages.get("virtualPools.duplicate.name", copy.name);
// Target VPool could have resources, set resources to 0 on the new Copy VPool so user can modify form
copy.numResources = 0;
edit(copy);
}
use of models.virtualpool.ObjectVirtualPoolForm in project coprhd-controller by CoprHD.
the class ObjectVirtualPools method create.
public static void create() {
ObjectVirtualPoolForm form = new ObjectVirtualPoolForm();
edit(form);
}
Aggregations