Revision b459a848 tools/cluster-merge
b/tools/cluster-merge | ||
---|---|---|
24 | 24 |
|
25 | 25 |
""" |
26 | 26 |
|
27 |
# pylint: disable-msg=C0103
|
|
27 |
# pylint: disable=C0103 |
|
28 | 28 |
# C0103: Invalid name cluster-merge |
29 | 29 |
|
30 | 30 |
import logging |
... | ... | |
374 | 374 |
utils.WriteFile(data.config_path, data=result.stdout) |
375 | 375 |
|
376 | 376 |
# R0201: Method could be a function |
377 |
def _KillMasterDaemon(self): # pylint: disable-msg=R0201
|
|
377 |
def _KillMasterDaemon(self): # pylint: disable=R0201 |
|
378 | 378 |
"""Kills the local master daemon. |
379 | 379 |
|
380 | 380 |
@raise errors.CommandError: If unable to kill |
... | ... | |
574 | 574 |
other_cluster.cluster_name) |
575 | 575 |
|
576 | 576 |
# R0201: Method could be a function |
577 |
def _GetOsHypervisor(self, cluster, os_name, hyp): # pylint: disable-msg=R0201
|
|
577 |
def _GetOsHypervisor(self, cluster, os_name, hyp): # pylint: disable=R0201 |
|
578 | 578 |
if os_name in cluster.os_hvp: |
579 | 579 |
return cluster.os_hvp[os_name].get(hyp, None) |
580 | 580 |
else: |
... | ... | |
586 | 586 |
|
587 | 587 |
ConfigWriter.AddNodeGroup takes care of making sure there are no conflicts. |
588 | 588 |
""" |
589 |
# pylint: disable-msg=R0201
|
|
589 |
# pylint: disable=R0201 |
|
590 | 590 |
logging.info("Node group conflict strategy: %s", self.groups) |
591 | 591 |
|
592 | 592 |
my_grps = my_config.GetAllNodeGroupsInfo().values() |
... | ... | |
626 | 626 |
for node_name in other_grp.members[:]: |
627 | 627 |
node = other_config.GetNodeInfo(node_name) |
628 | 628 |
# Access to a protected member of a client class |
629 |
# pylint: disable-msg=W0212
|
|
629 |
# pylint: disable=W0212 |
|
630 | 630 |
other_config._UnlockedRemoveNodeFromGroup(node) |
631 | 631 |
|
632 | 632 |
# Access to a protected member of a client class |
633 |
# pylint: disable-msg=W0212
|
|
633 |
# pylint: disable=W0212 |
|
634 | 634 |
my_grp_uuid = my_config._UnlockedLookupNodeGroup(other_grp.name) |
635 | 635 |
|
636 | 636 |
# Access to a protected member of a client class |
637 |
# pylint: disable-msg=W0212
|
|
637 |
# pylint: disable=W0212 |
|
638 | 638 |
my_config._UnlockedAddNodeToGroup(node, my_grp_uuid) |
639 | 639 |
node.group = my_grp_uuid |
640 | 640 |
# Remove from list of groups to add |
... | ... | |
645 | 645 |
my_config.AddNodeGroup(grp, _CLUSTERMERGE_ECID) |
646 | 646 |
|
647 | 647 |
# R0201: Method could be a function |
648 |
def _StartMasterDaemon(self, no_vote=False): # pylint: disable-msg=R0201
|
|
648 |
def _StartMasterDaemon(self, no_vote=False): # pylint: disable=R0201 |
|
649 | 649 |
"""Starts the local master daemon. |
650 | 650 |
|
651 | 651 |
@param no_vote: Should the masterd started without voting? default: False |
... | ... | |
683 | 683 |
result.output)) |
684 | 684 |
|
685 | 685 |
# R0201: Method could be a function |
686 |
def _StartupAllInstances(self): # pylint: disable-msg=R0201
|
|
686 |
def _StartupAllInstances(self): # pylint: disable=R0201 |
|
687 | 687 |
"""Starts up all instances (locally). |
688 | 688 |
|
689 | 689 |
@raise errors.CommandError: If unable to start clusters |
... | ... | |
698 | 698 |
|
699 | 699 |
# R0201: Method could be a function |
700 | 700 |
# TODO: make this overridable, for some verify errors |
701 |
def _VerifyCluster(self): # pylint: disable-msg=R0201
|
|
701 |
def _VerifyCluster(self): # pylint: disable=R0201 |
|
702 | 702 |
"""Runs gnt-cluster verify to verify the health. |
703 | 703 |
|
704 | 704 |
@raise errors.ProgrammError: If cluster fails on verification |
Also available in: Unified diff