|
|
@@ -17,8 +17,9 @@ from coriolis.osmorphing import windows
|
|
|
LOG = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
-def get_os_morphing_tools(conn, os_type, os_root_dir, target_hypervisor,
|
|
|
- target_platform, event_manager):
|
|
|
+def get_os_morphing_tools(
|
|
|
+ conn, os_type, os_root_dir, os_root_dev,
|
|
|
+ target_hypervisor, target_platform, event_manager):
|
|
|
os_morphing_tools_clss = {
|
|
|
constants.OS_TYPE_LINUX: [debian.DebianMorphingTools,
|
|
|
ubuntu.UbuntuMorphingTools,
|
|
|
@@ -26,15 +27,16 @@ def get_os_morphing_tools(conn, os_type, os_root_dir, target_hypervisor,
|
|
|
redhat.RedHatMorphingTools,
|
|
|
suse.SUSEMorphingTools],
|
|
|
constants.OS_TYPE_WINDOWS: [windows.WindowsMorphingTools],
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
if os_type and os_type not in os_morphing_tools_clss:
|
|
|
raise exception.CoriolisException("Unsupported OS type: %s" % os_type)
|
|
|
|
|
|
for cls in os_morphing_tools_clss.get(
|
|
|
os_type, itertools.chain(*os_morphing_tools_clss.values())):
|
|
|
- tools = cls(conn, os_root_dir, target_hypervisor, target_platform,
|
|
|
- event_manager)
|
|
|
+ tools = cls(
|
|
|
+ conn, os_root_dir, os_root_dev, target_hypervisor,
|
|
|
+ target_platform, event_manager)
|
|
|
LOG.debug("Testing OS morphing tools: %s", cls.__name__)
|
|
|
os_info = tools.check_os()
|
|
|
if os_info:
|