summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xplugins/check_vol_server.py14
-rwxr-xr-xplugins/discovery.py2
-rw-r--r--plugins/network_utils.py2
-rw-r--r--tests/test_network_utils.py2
4 files changed, 10 insertions, 10 deletions
diff --git a/plugins/check_vol_server.py b/plugins/check_vol_server.py
index a45a24d..ba2a88a 100755
--- a/plugins/check_vol_server.py
+++ b/plugins/check_vol_server.py
@@ -16,7 +16,7 @@ def _getListHosts(hostgroup):
"GET hostgroups\nColumns: members_with_state\n"
"Filter: name = " + hostgroup + "\n"))[0][0]
# Get the only those nodes which are UP and
- #glusterd service is running
+ # glusterd service is running
for row in table:
if row[1] == utils.HostStatusCode.UP and \
_getGlusterdStatus(row[0]) \
@@ -243,13 +243,13 @@ def _executeRandomHost(hostgroup, command):
if status != utils.PluginStatusCode.UNKNOWN:
return status, output
- #random host is not able to execute the command
- #Now try to iterate through the list of hosts
- #in the host group and send the command until
- #the command is successful
+ # random host is not able to execute the command
+ # Now try to iterate through the list of hosts
+ # in the host group and send the command until
+ # the command is successful
- #No need to send it to host which we already sent unless volume locked
- if not "UNKNOWN: temporary error" in output:
+ # No need to send it to host which we already sent unless volume locked
+ if "UNKNOWN: temporary error" not in output:
# if volume locked,we can try on same host
list_hosts.remove(host)
for host in list_hosts:
diff --git a/plugins/discovery.py b/plugins/discovery.py
index b17c81f..c4fa149 100755
--- a/plugins/discovery.py
+++ b/plugins/discovery.py
@@ -568,7 +568,7 @@ if __name__ == '__main__':
args.nagiosServerIP, args.mode, args.timeout)
print "Cluster configurations synced successfully from host %s" % \
(args.hostip)
- #Unregister the temp_node1
+ # Unregister the temp_node1
unRegisterHost("temp_node1")
# If Nagios is running then try to restart. Otherwise don't do
# anything.
diff --git a/plugins/network_utils.py b/plugins/network_utils.py
index 83fecc0..0566aaf 100644
--- a/plugins/network_utils.py
+++ b/plugins/network_utils.py
@@ -65,7 +65,7 @@ def validateHostAddress(address):
return "Please specify host Address"
if IPADDR_RE.match(address):
- if not address in getNonLoopbackAddresses():
+ if address not in getNonLoopbackAddresses():
return "Address '%s' can't be mapped to non loopback devices " \
"on this host" % address
else:
diff --git a/tests/test_network_utils.py b/tests/test_network_utils.py
index f379e0c..7619cb3 100644
--- a/tests/test_network_utils.py
+++ b/tests/test_network_utils.py
@@ -48,7 +48,7 @@ class TestNetworkUtils(TestCaseBase):
network_utils.ethtool.get_ipaddr = self.mockGetIpAddr
network_utils.socket.gethostbyname_ex = self.mockGethostbyname_ex
- #Methods to test validateHostAddress(address)
+ # Methods to test validateHostAddress(address)
def testValidateHostAddressWithEmptyAddress(self):
self.setUpMocks()
validationMsg = network_utils.validateHostAddress(None)