コード例 #1
0
ファイル: cpu.py プロジェクト: jtux270/translate
 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
コード例 #2
0
ファイル: cpu.py プロジェクト: wenzt/my_hosted_engine_setup
 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'))