use of org.ovirt.engine.api.model.Vm in project ovirt-engine by oVirt.
the class NicStatisticalQuery method clone.
private Nic clone(Nic parent) {
Nic nic = new Nic();
nic.setId(parent.getId());
nic.setVm(new Vm());
nic.getVm().setId(parent.getVm().getId());
return nic;
}
use of org.ovirt.engine.api.model.Vm in project ovirt-engine by oVirt.
the class DiskStatisticalQuery method clone.
private Disk clone(Disk parent) {
Disk disk = new Disk();
disk.setId(parent.getId());
if (parent.isSetVm()) {
disk.setVm(new Vm());
disk.getVm().setId(parent.getVm().getId());
}
return disk;
}
use of org.ovirt.engine.api.model.Vm in project ovirt-engine by oVirt.
the class BackendExternalVmImportsResourceTest method createVmImport.
private ExternalVmImport createVmImport() {
File file = new File();
file.setId(DRIVERS_ISO);
ExternalVmImport vmImport = new ExternalVmImport();
vmImport.setName(EXTERNAL_VM_NAME);
vmImport.setVm(new Vm());
vmImport.getVm().setName(CREATED_VM_NAME);
vmImport.setCluster(new Cluster());
vmImport.getCluster().setId(CLUSTER_ID.toString());
vmImport.setStorageDomain(new StorageDomain());
vmImport.getStorageDomain().setId(STORAGE_DOMAIN_ID.toString());
vmImport.setHost(new Host());
vmImport.getHost().setId(HOST_ID.toString());
vmImport.setSparse(true);
vmImport.setProvider(ExternalVmProviderType.VMWARE);
vmImport.setDriversIso(file);
vmImport.setUsername(USERNAME);
vmImport.setPassword(PASSWORD);
vmImport.setUrl(VMWARE_URL);
return vmImport;
}
use of org.ovirt.engine.api.model.Vm in project ovirt-engine by oVirt.
the class VmMapperTest method testGlobalSpiceProxy.
@Test
public void testGlobalSpiceProxy() {
org.ovirt.engine.core.common.businessentities.VM entity = new org.ovirt.engine.core.common.businessentities.VM();
mcr.mockConfigValue(ConfigValues.SpiceProxyDefault, GLOBAL_SPICE_PROXY);
Vm model = VmMapper.map(entity, (Vm) null);
assertEquals(GLOBAL_SPICE_PROXY, model.getDisplay().getProxy());
}
use of org.ovirt.engine.api.model.Vm in project ovirt-engine by oVirt.
the class VmMapperTest method testPoolSpiceProxy.
@Test
public void testPoolSpiceProxy() {
org.ovirt.engine.core.common.businessentities.VM entity = new org.ovirt.engine.core.common.businessentities.VM();
entity.setVmPoolSpiceProxy(POOL_SPICE_PROXY);
Vm model = VmMapper.map(entity, (Vm) null);
assertEquals(POOL_SPICE_PROXY, model.getDisplay().getProxy());
}
Aggregations