Roy Golan has uploaded a new change for review.

Change subject: core: Use the cluster emulated machine to run a VM
......................................................................

core: Use the cluster emulated machine to run a VM

According to http://www.ovirt.org/Cluster_emulation_modes#Run%20VM

Instead of a global config value, use the cluster emulated machine
field.

Deleted the deprecated emulatedMachine Config value

Change-Id: I23736fcc1748e47ce82b84d5167c18dc370bd3ad
Signed-off-by: Roy Golan <[email protected]>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
M packaging/etc/engine-config/engine-config.properties
3 files changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/10/15910/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
index e33fd4c..f2986f5 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
@@ -536,10 +536,6 @@
     @TypeConverterAttribute(Boolean.class)
     @DefaultValueAttribute("true")
     SendSMPOnRunVm(215),
-    @Reloadable
-    @TypeConverterAttribute(String.class)
-    @DefaultValueAttribute("pc")
-    EmulatedMachine(216),
     @TypeConverterAttribute(String.class)
     @DefaultValueAttribute(" WHERE RowNum BETWEEN %1$s AND %2$s")
     @OptionBehaviourAttribute(behaviour = OptionBehaviour.ValueDependent, 
dependentOn = ConfigValues.DBEngine,
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
index cc5a848..3b272e4 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
@@ -62,8 +62,10 @@
         }
         final String compatibilityVersion = 
vm.getVdsGroupCompatibilityVersion().toString();
         addCpuPinning(compatibilityVersion);
-        createInfo.put(VdsProperties.emulatedMachine, Config.<String> GetValue(
-                ConfigValues.EmulatedMachine, compatibilityVersion));
+        createInfo.put(VdsProperties.emulatedMachine, DbFacade.getInstance()
+                .getVdsGroupDao()
+                .get(vm.getVdsGroupId())
+                .getEmulatedMachine());
         // send cipher suite and spice secure channels parameters only if ssl
         // enabled.
         if (Config.<Boolean> GetValue(ConfigValues.SSLEnabled)) {
diff --git a/packaging/etc/engine-config/engine-config.properties 
b/packaging/etc/engine-config/engine-config.properties
index 910f9f6..0845807 100644
--- a/packaging/etc/engine-config/engine-config.properties
+++ b/packaging/etc/engine-config/engine-config.properties
@@ -21,7 +21,7 @@
 CpuOverCommitDurationMinutes.type=Integer
 DisableFenceAtStartupInSec.description="Disable Fence Operations At oVirt 
Startup In Seconds"
 DisableFenceAtStartupInSec.type=Integer
-EmulatedMachine.description="Supported machine types"
+ClusterEmulatedMachines.description="Supported machine types"
 WANDisableEffects.description="Disabled WAN Effects value to send to the SPICE 
console"
 WANDisableEffects.validValues=animation,wallpaper,font-smooth,all
 WANDisableEffects.type=StringMultiple


-- 
To view, visit http://gerrit.ovirt.org/15910
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23736fcc1748e47ce82b84d5167c18dc370bd3ad
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to