use of models.virtualpool.FileVirtualPoolForm in project coprhd-controller by CoprHD.
the class FileVirtualPools method edit.
public static void edit(String id) {
FileVirtualPoolRestRep virtualPool = VirtualPoolUtils.getFileVirtualPool(id);
if (virtualPool == null) {
flash.error(MessagesUtils.get(UNKNOWN, id));
backToReferrer();
}
FileVirtualPoolForm form = new FileVirtualPoolForm();
form.load(virtualPool);
edit(form);
}
use of models.virtualpool.FileVirtualPoolForm in project coprhd-controller by CoprHD.
the class FileVirtualPools method create.
public static void create() {
FileVirtualPoolForm form = new FileVirtualPoolForm();
// Set default values
form.protocols = Sets.newHashSet(FileProtocols.CIFS, FileProtocols.NFS);
edit(form);
}
use of models.virtualpool.FileVirtualPoolForm in project coprhd-controller by CoprHD.
the class FileVirtualPools method duplicate.
public static void duplicate(String ids) {
FileVirtualPoolRestRep targetVpool = VirtualPoolUtils.getFileVirtualPool(ids);
if (targetVpool == null) {
flash.error(MessagesUtils.get(UNKNOWN, ids));
backToReferrer();
}
FileVirtualPoolForm copy = new FileVirtualPoolForm();
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);
}
Aggregations