+ def set_nodeindex(self):
+ hostsconf = self.confman.get_hosts_config_handler()
+ install_host = utils.get_installation_host_name(hostsconf)
+ self.config[self.ROOT][install_host]['caas_nodeindex'] = 1
+
+ masters = self.get_service_profile_hosts('caas_master')
+ masters.remove(install_host)
+ self._set_nodeindexes(masters, 2)
+ self._set_nodeindexes(self.get_service_profile_hosts('caas_worker'), 1)
+
+ def _set_nodeindexes(self, hosts, base_index):
+ index = base_index
+ for host in hosts:
+ self.config[self.ROOT][host]['caas_nodeindex'] = index
+ index += 1
+