On Tue, Sep 02, 2014 at 04:19:40PM +0200, 'Helga Velroyen' via ganeti-devel 
wrote:
... to make lint shut up.

Signed-off-by: Helga Velroyen <[email protected]>
---
lib/cmdlib/cluster.py | 42 ++++++++++++++++++++++++------------------
1 file changed, 24 insertions(+), 18 deletions(-)

diff --git a/lib/cmdlib/cluster.py b/lib/cmdlib/cluster.py
index d0c54de..0836feb 100644
--- a/lib/cmdlib/cluster.py
+++ b/lib/cmdlib/cluster.py
@@ -3362,7 +3362,28 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors):
    """
    return ([], list(self.my_node_info.keys()))

-  def Exec(self, feedback_fn): # pylint: disable=R0915
+  @staticmethod
+  def _VerifyOtherNotes(feedback_fn, i_non_redundant, i_non_a_balanced,
+                        i_offline, n_offline, n_drained):
+    feedback_fn("* Other Notes")
+    if i_non_redundant:
+      feedback_fn("  - NOTICE: %d non-redundant instance(s) found."
+                  % len(i_non_redundant))
+
+    if i_non_a_balanced:
+      feedback_fn("  - NOTICE: %d non-auto-balanced instance(s) found."
+                  % len(i_non_a_balanced))
+
+    if i_offline:
+      feedback_fn("  - NOTICE: %d offline instance(s) found." % i_offline)
+
+    if n_offline:
+      feedback_fn("  - NOTICE: %d offline node(s) found." % n_offline)
+
+    if n_drained:
+      feedback_fn("  - NOTICE: %d drained node(s) found." % n_drained)
+
+  def Exec(self, feedback_fn):
    """Verify integrity of the node group, performing various test on nodes.

    """
@@ -3740,23 +3761,8 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors):
      feedback_fn("* Verifying N+1 Memory redundancy")
      self._VerifyNPlusOneMemory(node_image, self.my_inst_info)

-    feedback_fn("* Other Notes")
-    if i_non_redundant:
-      feedback_fn("  - NOTICE: %d non-redundant instance(s) found."
-                  % len(i_non_redundant))
-
-    if i_non_a_balanced:
-      feedback_fn("  - NOTICE: %d non-auto-balanced instance(s) found."
-                  % len(i_non_a_balanced))
-
-    if i_offline:
-      feedback_fn("  - NOTICE: %d offline instance(s) found." % i_offline)
-
-    if n_offline:
-      feedback_fn("  - NOTICE: %d offline node(s) found." % n_offline)
-
-    if n_drained:
-      feedback_fn("  - NOTICE: %d drained node(s) found." % n_drained)
+    self._VerifyOtherNotes(feedback_fn, i_non_redundant, i_non_a_balanced,
+                           i_offline, n_offline, n_drained)

    return not self.bad

--
2.1.0.rc2.206.gedb03e5


LGTM

Reply via email to