def _setup(self): from ovirt_host_deploy import hardware virtualization = hardware.Virtualization() result = virtualization.detect() if result == virtualization.DETECT_RESULT_SUPPORTED: self.logger.info(_('Hardware supports virtualization')) self.environment[oenginecons.AIOEnv.SUPPORTED] = True
def _setup(self): virtualization = hardware.Virtualization() result = virtualization.detect() if result == virtualization.DETECT_RESULT_UNSUPPORTED: raise RuntimeError(_('Hardware does not support virtualization')) elif result == virtualization.DETECT_RESULT_SUPPORTED: self.logger.info(_('Hardware supports virtualization')) else: self.logger.warning( _('Cannot detect if hardware supports virtualization'))