Search in sources :

Example 16 with Vms

use of org.ovirt.engine.api.model.Vms in project ovirt-engine by oVirt.

the class EntityHelperTest method testGetCollectionGettter.

@Test
public void testGetCollectionGettter() {
    Method method = EntityHelper.getCollectionGetter(new Vms());
    assertEquals("getVms", method.getName());
}
Also used : Method(java.lang.reflect.Method) Vms(org.ovirt.engine.api.model.Vms) Test(org.junit.Test)

Example 17 with Vms

use of org.ovirt.engine.api.model.Vms in project ovirt-engine by oVirt.

the class V3FloppyInAdapter method adapt.

@Override
public Floppy adapt(V3Floppy from) {
    Floppy to = new Floppy();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptIn(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetFile()) {
        to.setFile(adaptIn(from.getFile()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetInstanceType()) {
        to.setInstanceType(adaptIn(from.getInstanceType()));
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetTemplate()) {
        to.setTemplate(adaptIn(from.getTemplate()));
    }
    if (from.isSetVm()) {
        to.setVm(adaptIn(from.getVm()));
    }
    if (from.isSetVms()) {
        to.setVms(new Vms());
        to.getVms().getVms().addAll(adaptIn(from.getVms().getVMs()));
    }
    return to;
}
Also used : V3Floppy(org.ovirt.engine.api.v3.types.V3Floppy) Floppy(org.ovirt.engine.api.model.Floppy) Vms(org.ovirt.engine.api.model.Vms)

Aggregations

Vms (org.ovirt.engine.api.model.Vms)17 Vm (org.ovirt.engine.api.model.Vm)8 ArrayList (java.util.ArrayList)4 Guid (org.ovirt.engine.core.compat.Guid)4 List (java.util.List)3 Test (org.junit.Test)3 AffinityGroup (org.ovirt.engine.api.model.AffinityGroup)3 Statistics (org.ovirt.engine.api.model.Statistics)3 StorageDomains (org.ovirt.engine.api.model.StorageDomains)2 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)2 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)2 Method (java.lang.reflect.Method)1 LinkedList (java.util.LinkedList)1 AffinityRule (org.ovirt.engine.api.model.AffinityRule)1 Cdrom (org.ovirt.engine.api.model.Cdrom)1 Cluster (org.ovirt.engine.api.model.Cluster)1 Disk (org.ovirt.engine.api.model.Disk)1 DiskSnapshot (org.ovirt.engine.api.model.DiskSnapshot)1 Disks (org.ovirt.engine.api.model.Disks)1 Floppy (org.ovirt.engine.api.model.Floppy)1