Search in sources :

Example 6 with VolumeGroup

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

the class StorageVolumeGroupMapper method map.

@Mapping(from = org.ovirt.engine.core.common.businessentities.StorageDomain.class, to = HostStorage.class)
public static HostStorage map(org.ovirt.engine.core.common.businessentities.StorageDomain entity, HostStorage template) {
    HostStorage model = template != null ? template : new HostStorage();
    model.setId(entity.getStorage());
    model.setType(StorageDomainMapper.map(entity.getStorageType(), null));
    model.setVolumeGroup(new VolumeGroup());
    model.getVolumeGroup().setId(entity.getStorage());
    return model;
}
Also used : VolumeGroup(org.ovirt.engine.api.model.VolumeGroup) HostStorage(org.ovirt.engine.api.model.HostStorage)

Example 7 with VolumeGroup

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

the class StorageVolumeGroupMapperTest method postPopulate.

@Override
protected HostStorage postPopulate(HostStorage from) {
    from.setType(MappingTestHelper.shuffle(StorageType.class));
    from.setVolumeGroup(new VolumeGroup());
    from.getVolumeGroup().setId(from.getId());
    return from;
}
Also used : StorageType(org.ovirt.engine.api.model.StorageType) VolumeGroup(org.ovirt.engine.api.model.VolumeGroup)

Aggregations

VolumeGroup (org.ovirt.engine.api.model.VolumeGroup)7 LogicalUnits (org.ovirt.engine.api.model.LogicalUnits)4 LogicalUnit (org.ovirt.engine.api.model.LogicalUnit)3 HostStorage (org.ovirt.engine.api.model.HostStorage)2 StorageDomain (org.ovirt.engine.api.model.StorageDomain)2 LUNs (org.ovirt.engine.core.common.businessentities.storage.LUNs)2 StorageType (org.ovirt.engine.api.model.StorageType)1 V3VolumeGroup (org.ovirt.engine.api.v3.types.V3VolumeGroup)1 StorageServerConnections (org.ovirt.engine.core.common.businessentities.StorageServerConnections)1