summaryrefslogtreecommitdiffstats
path: root/compass-tasks-base/deployment/deploy_manager.py
diff options
context:
space:
mode:
Diffstat (limited to 'compass-tasks-base/deployment/deploy_manager.py')
-rw-r--r--compass-tasks-base/deployment/deploy_manager.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/compass-tasks-base/deployment/deploy_manager.py b/compass-tasks-base/deployment/deploy_manager.py
index baf7cd6..225c31e 100644
--- a/compass-tasks-base/deployment/deploy_manager.py
+++ b/compass-tasks-base/deployment/deploy_manager.py
@@ -111,7 +111,34 @@ class DeployManager(object):
self.os_installer.set_package_installer_config(pk_installer_config)
# start to deploy OS
- return self.os_installer.deploy()
+ result = self.os_installer.deploy()
+ self.reset_server()
+
+ return result
+
+ def poweron_server(self):
+ if not self.os_installer:
+ return
+
+ host_id_list = self.os_installer.config_manager.get_host_id_list()
+ for host_id in host_id_list:
+ self.os_installer.poweron(host_id)
+
+ def poweroff_server(self):
+ if not self.os_installer:
+ return
+
+ host_id_list = self.os_installer.config_manager.get_host_id_list()
+ for host_id in host_id_list:
+ self.os_installer.poweroff(host_id)
+
+ def reset_server(self):
+ if not self.os_installer:
+ return
+
+ host_id_list = self.os_installer.config_manager.get_host_id_list()
+ for host_id in host_id_list:
+ self.os_installer.reset(host_id)
def deploy_target_system(self):
"""Deploy target system to all hosts in the cluster.