dest="pause_period",
help=("Amount of time in seconds watcher"
" should be suspended from running"))
+_CLUSTERMERGE_ECID = "clustermerge-ecid"
def Flatten(unflattened_list):
for data in self.merger_data:
other_config = config.ConfigWriter(data.config_path, accept_foreign=True)
+ self._MergeNodeGroups(my_config, other_config)
for node in other_config.GetNodeList():
node_info = other_config.GetNodeInfo(node)
fake_ec_id += 1
# R0201: Method could be a function
+ def _MergeNodeGroups(self, my_config, other_config):
+ """Adds foreign node groups
+
+ ConfigWriter.AddNodeGroup takes care of making sure there are no conflicts.
+ """
+ # pylint: disable-msg=R0201
+ for (_, grp) in other_config.GetAllNodeGroupsInfo():
+ #TODO: handle node group conflicts
+ my_config.AddNodeGroup(grp, _CLUSTERMERGE_ECID)
+
+ # R0201: Method could be a function
def _StartMasterDaemon(self, no_vote=False): # pylint: disable-msg=R0201
"""Starts the local master daemon.