Sandro Bonazzola has uploaded a new change for review.

Change subject: packaging: setup: fixed cpu validation
......................................................................

packaging: setup: fixed cpu validation

- removed unused constant AIO_VDSM_CAPS_MODULE.
- added check on virtualization hardware / bios support

Change-Id: I9c19c1d6bf80c0d5f54105f785d97ba7b203cccc
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M packaging/setup/ovirt_engine_setup/constants.py
M packaging/setup/plugins/ovirt-engine-setup/all-in-one/cpu.py
2 files changed, 16 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/15013/1

diff --git a/packaging/setup/ovirt_engine_setup/constants.py 
b/packaging/setup/ovirt_engine_setup/constants.py
index 29b6402..a7e6a9c 100644
--- a/packaging/setup/ovirt_engine_setup/constants.py
+++ b/packaging/setup/ovirt_engine_setup/constants.py
@@ -336,9 +336,12 @@
         DATADIR,
         'vdsm',
     )
-    AIO_VDSM_CAPS_MODULE = os.path.join(
-        AIO_VDSM_PATH,
-        'caps.py'
+    AIO_HOST_DEPLOY_VDSM_PATH = os.path.join(
+        DATADIR,
+        'ovirt-host-deploy',
+        'plugins',
+        'ovirt-host-deploy',
+        'vdsm'
     )
     AIO_STORAGE_DOMAIN_DEFAULT_DIR = os.path.join(
         LOCALSTATEDIR,
diff --git a/packaging/setup/plugins/ovirt-engine-setup/all-in-one/cpu.py 
b/packaging/setup/plugins/ovirt-engine-setup/all-in-one/cpu.py
index f878026..7016af6 100644
--- a/packaging/setup/plugins/ovirt-engine-setup/all-in-one/cpu.py
+++ b/packaging/setup/plugins/ovirt-engine-setup/all-in-one/cpu.py
@@ -104,6 +104,16 @@
     def _validation(self):
         shouldStopLibvirt = self._startLibvirt()
         try:
+            hardware = util.loadModule(
+                path=osetupcons.FileLocations.AIO_HOST_DEPLOY_VDSM_PATH,
+                name='hardware'
+            ).Plugin(context=self.context)
+            hardware._validate_virtualization()
+        except ImportError:
+            self.logger.debug("Can't validate virtualization support")
+        except RuntimeError as e:
+            self.logger.warning(e)
+        try:
             cpu, compatible = self._getCompatibleCpuModels()
             self.logger.debug(
                 'Compatible CPU models are: %s',


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

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

Reply via email to