From 0634fd53e4b8b9519574449ee35a40edfcf6a9d2 Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Mon, 3 Sep 2018 11:20:59 +0800 Subject: Passing ipmi credentials to cobbler JIRA: COMPASS-616 Add host ipmi credentials into cobbler system to manage host power. Change-Id: I6ffbb390f920fe146887513d3f7e48f05630a25f Signed-off-by: Harry Huang --- compass-tasks-base/db/api/cluster.py | 2 +- compass-tasks-base/deployment/installers/config_manager.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'compass-tasks-base') diff --git a/compass-tasks-base/db/api/cluster.py b/compass-tasks-base/db/api/cluster.py index 7a7022c..9a0b8f0 100644 --- a/compass-tasks-base/db/api/cluster.py +++ b/compass-tasks-base/db/api/cluster.py @@ -50,7 +50,7 @@ RESP_CLUSTERHOST_FIELDS = [ 'os_installed', 'distributed_system_installed', 'os_name', 'os_id', 'ip', 'reinstall_os', 'reinstall_distributed_system', - 'owner', 'cluster_id', + 'owner', 'cluster_id', 'ipmi_credentials', 'created_at', 'updated_at', 'patched_roles' ] diff --git a/compass-tasks-base/deployment/installers/config_manager.py b/compass-tasks-base/deployment/installers/config_manager.py index 597c3a6..d3b28e0 100644 --- a/compass-tasks-base/deployment/installers/config_manager.py +++ b/compass-tasks-base/deployment/installers/config_manager.py @@ -170,6 +170,7 @@ class HostInfo(object): self.roles = self.host_info.setdefault(const.ROLES, []) self.patched_roles = self.host_info.setdefault(const.PATCHED_ROLES, []) self.ipmi = deepcopy(self.host_info.setdefault(const.IPMI, {})) + self.ipmi_credentials = deepcopy(self.host_info.setdefault(const.IPMI_CREDS, {})) self.reinstall_os_flag = self.host_info.get(const.REINSTALL_OS_FLAG) self.deployed_os_config = self.host_info.setdefault( const.DEPLOYED_OS_CONFIG, {} @@ -275,6 +276,7 @@ class HostInfo(object): def baseinfo(self): return { const.REINSTALL_OS_FLAG: self.reinstall_os_flag, + const.IPMI_CREDS: self.ipmi_credentials, const.MAC_ADDR: self.mac, const.NAME: self.name, const.HOSTNAME: self.hostname, -- cgit 1.2.3-korg