Change os_driver to a global variable

Change-Id: I0ff277995272f1a8b6ccb8646c10ac89d5c33c0c
This commit is contained in:
Zhou Ya
2016-10-19 15:52:00 +08:00
parent 682681a83a
commit 99bd70a5ac

View File

@@ -144,10 +144,10 @@ class InstallTask(object):
# hosts with role put the head of the list
order_hosts_need_os = hosts_with_role_need_os + \
hosts_without_role_need_os
os_driver = os_handle.load_install_os_driver(OS_INSTALL_TYPE)
while order_hosts_need_os:
# all os will be installed batch by batch with
# max_parallel_os_number which was set in daisy-api.conf
os_driver = os_handle.load_install_os_driver(OS_INSTALL_TYPE)
os_install = os_driver(self.req, self.cluster_id)
(order_hosts_need_os, role_hosts_need_os) = os_install.install_os(
order_hosts_need_os, role_hosts_need_os)