Search in sources :

Example 1 with ObjectVirtualPoolForm

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

Example 2 with ObjectVirtualPoolForm

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

Example 3 with ObjectVirtualPoolForm

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

Aggregations

ObjectVirtualPoolForm (models.virtualpool.ObjectVirtualPoolForm)3 ObjectVirtualPoolRestRep (com.emc.storageos.model.vpool.ObjectVirtualPoolRestRep)2