Search in sources :

Example 1 with FileVirtualPoolForm

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);
}
Also used : FileVirtualPoolRestRep(com.emc.storageos.model.vpool.FileVirtualPoolRestRep) FileVirtualPoolForm(models.virtualpool.FileVirtualPoolForm)

Example 2 with FileVirtualPoolForm

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);
}
Also used : FileVirtualPoolForm(models.virtualpool.FileVirtualPoolForm)

Example 3 with FileVirtualPoolForm

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);
}
Also used : FileVirtualPoolRestRep(com.emc.storageos.model.vpool.FileVirtualPoolRestRep) FileVirtualPoolForm(models.virtualpool.FileVirtualPoolForm)

Aggregations

FileVirtualPoolForm (models.virtualpool.FileVirtualPoolForm)3 FileVirtualPoolRestRep (com.emc.storageos.model.vpool.FileVirtualPoolRestRep)2