summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorevasquez <eric.vasquez@calxeda.com>2013-08-27 09:06:28 -0500
committerevasquez <eric.vasquez@calxeda.com>2013-08-27 09:06:28 -0500
commit5e066057941ad399eaa252f96b783f7fe1ea0209 (patch)
treeec9004ff914d7b14db58cbdfdaaef0fe6164c2da
parentc4d0f51633d3a9485541146b4213e543f6d13b0f (diff)
downloadcxmanage-5e066057941ad399eaa252f96b783f7fe1ea0209.tar.gz
nojira: pylint
-rw-r--r--cxmanage/commands/fabric.py5
-rw-r--r--cxmanage/commands/info.py4
-rw-r--r--cxmanage/commands/ipdiscover.py3
-rw-r--r--cxmanage/commands/ipmitool.py4
-rw-r--r--cxmanage/commands/mc.py6
-rw-r--r--cxmanage/commands/sensor.py6
-rw-r--r--cxmanage/commands/tspackage.py17
7 files changed, 36 insertions, 9 deletions
diff --git a/cxmanage/commands/fabric.py b/cxmanage/commands/fabric.py
index 3bf84c2..8bc3f65 100644
--- a/cxmanage/commands/fabric.py
+++ b/cxmanage/commands/fabric.py
@@ -1,3 +1,6 @@
+"""Calxeda: fabric.py"""
+
+
# Copyright (c) 2012, Calxeda Inc.
#
# All rights reserved.
@@ -41,7 +44,7 @@ def ipinfo_command(args):
if not args.quiet:
print "Getting IP addresses..."
- results, errors = run_command(args, nodes, "get_fabric_ipinfo")
+ results, _ = run_command(args, nodes, "get_fabric_ipinfo")
for node in nodes:
if node in results:
diff --git a/cxmanage/commands/info.py b/cxmanage/commands/info.py
index 531c939..b15d2c6 100644
--- a/cxmanage/commands/info.py
+++ b/cxmanage/commands/info.py
@@ -1,3 +1,6 @@
+"""Calxeda: info.py"""
+
+
# Copyright (c) 2012, Calxeda Inc.
#
# All rights reserved.
@@ -76,6 +79,7 @@ def info_basic_command(args):
def info_ubootenv_command(args):
+ """Print uboot info"""
tftp = get_tftp(args)
nodes = get_nodes(args, tftp)
diff --git a/cxmanage/commands/ipdiscover.py b/cxmanage/commands/ipdiscover.py
index f619d16..bd09413 100644
--- a/cxmanage/commands/ipdiscover.py
+++ b/cxmanage/commands/ipdiscover.py
@@ -1,3 +1,6 @@
+"""Calxeda: ipdiscover.py"""
+
+
# Copyright (c) 2012, Calxeda Inc.
#
# All rights reserved.
diff --git a/cxmanage/commands/ipmitool.py b/cxmanage/commands/ipmitool.py
index f8baf80..ac21e00 100644
--- a/cxmanage/commands/ipmitool.py
+++ b/cxmanage/commands/ipmitool.py
@@ -1,3 +1,6 @@
+"""Calxeda: ipmitool.py"""
+
+
# Copyright (c) 2012, Calxeda Inc.
#
# All rights reserved.
@@ -28,6 +31,7 @@
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
+
from cxmanage import get_tftp, get_nodes, get_node_strings, run_command
diff --git a/cxmanage/commands/mc.py b/cxmanage/commands/mc.py
index 2573540..6c42615 100644
--- a/cxmanage/commands/mc.py
+++ b/cxmanage/commands/mc.py
@@ -1,3 +1,6 @@
+"""Calxeda: mc.py"""
+
+
# Copyright (c) 2012, Calxeda Inc.
#
# All rights reserved.
@@ -28,6 +31,7 @@
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
+
from cxmanage import get_tftp, get_nodes, run_command
@@ -39,7 +43,7 @@ def mcreset_command(args):
if not args.quiet:
print 'Sending MC reset command...'
- results, errors = run_command(args, nodes, 'mc_reset')
+ _, errors = run_command(args, nodes, 'mc_reset')
if not args.quiet and not errors:
print 'Command completed successfully.\n'
diff --git a/cxmanage/commands/sensor.py b/cxmanage/commands/sensor.py
index c3fed32..3a27143 100644
--- a/cxmanage/commands/sensor.py
+++ b/cxmanage/commands/sensor.py
@@ -1,3 +1,6 @@
+"""Calxeda: sensor.py"""
+
+
# Copyright (c) 2012, Calxeda Inc.
#
# All rights reserved.
@@ -28,9 +31,10 @@
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
-from cxmanage import get_tftp, get_nodes, get_node_strings, run_command
+from cxmanage import get_tftp, get_nodes, get_node_strings, run_command
+# pylint: disable=R0914
def sensor_command(args):
"""read sensor values from a cluster or host"""
tftp = get_tftp(args)
diff --git a/cxmanage/commands/tspackage.py b/cxmanage/commands/tspackage.py
index 88f46e3..d6ee198 100644
--- a/cxmanage/commands/tspackage.py
+++ b/cxmanage/commands/tspackage.py
@@ -1,3 +1,6 @@
+"""Calxeda: tspackage.py"""
+
+
# Copyright 2013 Calxeda, Inc.
#
# All rights reserved.
@@ -29,12 +32,13 @@
# DAMAGE.
-"""A cxmanage command to collect information about a node and archive it.
-
-Example:
-cxmanage tspackage 10.10.10.10
+#
+# A cxmanage command to collect information about a node and archive it.
+#
+# Example:
+# cxmanage tspackage 10.10.10.10
+#
-"""
import os
import time
@@ -227,7 +231,7 @@ def write_mac_addrs(args, nodes):
write_to_file(node, lines)
-
+# pylint: disable=R0914
def write_sensor_info(args, nodes):
"""Write sensor information for each node to their respective files."""
args.sensor_name = ""
@@ -332,6 +336,7 @@ def write_sel(args, nodes):
for event in results[node]:
lines.append(event)
+ # pylint: disable=W0703
except Exception as error:
lines.append("Could not get SEL! " + str(error))
if not args.quiet: