Shahar Havivi has uploaded a new change for review. Change subject: engine: set multi monitor only when compatible on import ......................................................................
engine: set multi monitor only when compatible on import Set true only for windows on 3.3 and higher, Also fix tests Change-Id: I8a5ae4a6367fd5e4184f42b514f9be6e42879c26 Bug-Url: https://bugzilla.redhat.com/1007784 Signed-off-by: Shahar Havivi <shav...@redhat.com> --- M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java M backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ovf/OvfManagerTest.java 3 files changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/17/19517/1 diff --git a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java index df77321..67292a7 100644 --- a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java +++ b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java @@ -7,6 +7,7 @@ import java.util.Map; import org.apache.commons.lang.StringUtils; +import org.ovirt.engine.core.common.FeatureSupported; import org.ovirt.engine.core.common.businessentities.BootSequence; import org.ovirt.engine.core.common.businessentities.DiskImage; import org.ovirt.engine.core.common.businessentities.DiskInterface; @@ -22,12 +23,15 @@ import org.ovirt.engine.core.common.businessentities.VolumeType; import org.ovirt.engine.core.common.businessentities.network.VmInterfaceType; import org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; +import org.ovirt.engine.core.common.osinfo.OsRepository; +import org.ovirt.engine.core.common.utils.SimpleDependecyInjector; import org.ovirt.engine.core.common.utils.VmDeviceType; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.compat.backendcompat.XmlDocument; import org.ovirt.engine.core.compat.backendcompat.XmlNamespaceManager; import org.ovirt.engine.core.compat.backendcompat.XmlNode; import org.ovirt.engine.core.compat.backendcompat.XmlNodeList; +import org.ovirt.engine.core.compat.Version; import org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils; import org.ovirt.engine.core.utils.linq.LinqUtils; import org.ovirt.engine.core.utils.linq.Predicate; @@ -35,6 +39,7 @@ import org.w3c.dom.NodeList; public abstract class OvfReader implements IOvfBuilder { + protected OsRepository osRepository = SimpleDependecyInjector.getInstance().get(OsRepository.class); protected java.util.ArrayList<DiskImage> _images; protected java.util.ArrayList<VmNetworkInterface> interfaces; protected XmlDocument _document; @@ -389,7 +394,10 @@ if ("ovf:OperatingSystemSection_Type".equals(value)) { readOsSection(section); - + if (!osRepository.isLinux(vmBase.getOsId()) || + !FeatureSupported.singleQxlPci(new Version(getVersion()))) { + vmBase.setSingleQxlPci(false); + } } else if ("ovf:VirtualHardwareSection_Type".equals(value)) { readHardwareSection(section); diff --git a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java index 60f5965..cb2569e 100644 --- a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java +++ b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java @@ -18,7 +18,6 @@ import org.ovirt.engine.core.common.businessentities.VmStatic; import org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; import org.ovirt.engine.core.common.osinfo.OsRepository; -import org.ovirt.engine.core.common.utils.SimpleDependecyInjector; import org.ovirt.engine.core.common.utils.VmDeviceCommonUtils; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.compat.backendcompat.XmlDocument; @@ -29,7 +28,6 @@ public class OvfVmReader extends OvfReader { private static final String EXPORT_ONLY_PREFIX = "exportonly_"; - private OsRepository osRepository = SimpleDependecyInjector.getInstance().get(OsRepository.class); protected VM _vm; public OvfVmReader(XmlDocument document, diff --git a/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ovf/OvfManagerTest.java b/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ovf/OvfManagerTest.java index 571be94..7232c73 100644 --- a/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ovf/OvfManagerTest.java +++ b/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ovf/OvfManagerTest.java @@ -160,6 +160,7 @@ vm.getStaticData().setDomain("domain_name"); vm.setTimeZone("Israel Standard Time"); vm.setDbGeneration(2L); + vm.setSingleQxlPci(false); initInterfaces(vm); return vm; } -- To view, visit http://gerrit.ovirt.org/19517 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a5ae4a6367fd5e4184f42b514f9be6e42879c26 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.3 Gerrit-Owner: Shahar Havivi <shav...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches