コード例 #1
0
 def _run_upgrade(self):
     self._logger.info("hooks: %s" % self._options.skip_existing_hooks)
     self._python_lib = glob.glob("%s/rootfs/usr/lib/python*"
                                  % self._tmp_dir)
     if not self._python_lib:
         raise RuntimeError("Unable to determine python path")
     self._python_lib = self._python_lib[0]
     self._tmp_python_path = "%s/site-packages/ovirtnode" \
         % self._python_lib
     shutil.copytree(self._tmp_python_path, self._ovirtnode_dir)
     # import install and ovirtfunctions modules from new image
     f, filename, description = imp.find_module(
         'install',
         [self._ovirtnode_dir],
     )
     install = imp.load_module(
         'install',
         f,
         filename,
         description,
     )
     # log module detail for debugging
     self._logger.debug(install)
     from install import Install
     upgrade = Install()
     self._logger.propagate = True
     self._logger.info("Installing Bootloader")
     if not upgrade.ovirt_boot_setup():
         raise RuntimeError("Bootloader Installation Failed")
コード例 #2
0
 def _run_upgrade(self):
     self._logger.info("hooks: %s" % self._options.skip_existing_hooks)
     self._python_lib = glob.glob("%s/rootfs/usr/lib/python*"
                                  % self._tmp_dir)
     if not self._python_lib:
         raise RuntimeError("Unable to determine python path")
     self._python_lib = self._python_lib[0]
     self._tmp_python_path = "%s/site-packages/ovirtnode" \
         % self._python_lib
     shutil.copytree(self._tmp_python_path, self._ovirtnode_dir)
     # import install and ovirtfunctions modules from new image
     f, filename, description = imp.find_module(
         'install',
         [self._ovirtnode_dir],
     )
     install = imp.load_module(
         'install',
         f,
         filename,
         description,
     )
     # log module detail for debugging
     self._logger.debug(install)
     from install import Install
     upgrade = Install()
     self._logger.propagate = True
     self._logger.info("Installing Bootloader")
     if not upgrade.ovirt_boot_setup():
         raise RuntimeError("Bootloader Installation Failed")