Python convention is for functions to be in lower case.
Signed-off-by: Tony Asleson <***@redhat.com>
---
plugin/nstor/nstor.py | 4 ++--
plugin/ontap/ontap.py | 4 ++--
plugin/smispy/smis.py | 4 ++--
python_binding/lsm/__init__.py | 2 +-
python_binding/lsm/_common.py | 8 ++++----
python_binding/lsm/_pluginrunner.py | 14 +++++++-------
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/plugin/nstor/nstor.py b/plugin/nstor/nstor.py
index 78173f7..aa4e2ea 100644
--- a/plugin/nstor/nstor.py
+++ b/plugin/nstor/nstor.py
@@ -31,7 +31,7 @@ import traceback
from lsm import (AccessGroup, Capabilities, ErrorNumber, FileSystem, INfs,
IStorageAreaNetwork, LsmError, NfsExport, Pool,
- FsSnapshot, System, VERSION, Volume, md5, Error,
+ FsSnapshot, System, VERSION, Volume, md5, error,
common_urllib2_error_handler, search_property)
@@ -42,7 +42,7 @@ def handle_nstor_errors(method):
except LsmError as lsm:
raise
except Exception as e:
- Error("Unexpected exception:\n" + traceback.format_exc())
+ error("Unexpected exception:\n" + traceback.format_exc())
raise LsmError(ErrorNumber.PLUGIN_ERROR, str(e),
traceback.format_exc())
return nstor_wrapper
diff --git a/plugin/ontap/ontap.py b/plugin/ontap/ontap.py
index fba6660..bc364d0 100644
--- a/plugin/ontap/ontap.py
+++ b/plugin/ontap/ontap.py
@@ -26,7 +26,7 @@ import na
from lsm import (Volume, FileSystem, FsSnapshot, NfsExport,
AccessGroup, System, Capabilities, Disk, Pool,
IStorageAreaNetwork, INfs, LsmError, ErrorNumber, JobStatus,
- md5, Error, VERSION, common_urllib2_error_handler,
+ md5, error, VERSION, common_urllib2_error_handler,
search_property, TargetPort)
#Maps na to lsm, this is expected to expand over time.
@@ -499,7 +499,7 @@ class Ontap(IStorageAreaNetwork, INfs):
#Anything happens here we are only going to report the
#primary error through the API and log the secondary
#error to syslog.
- Error("Exception on trying to restore NA volume size:"
+ error("Exception on trying to restore NA volume size:"
+ traceback.format_exc())
finally:
#Restore timeout.
diff --git a/plugin/smispy/smis.py b/plugin/smispy/smis.py
index 9bc83ba..81e0dcd 100644
--- a/plugin/smispy/smis.py
+++ b/plugin/smispy/smis.py
@@ -24,7 +24,7 @@ import traceback
import pywbem
from pywbem import CIMError
-from lsm import (IStorageAreaNetwork, Error, uri_parse, LsmError, ErrorNumber,
+from lsm import (IStorageAreaNetwork, error, uri_parse, LsmError, ErrorNumber,
JobStatus, md5, Pool, Volume, AccessGroup, System,
Capabilities, Disk, txt_a, VERSION, TargetPort,
search_property)
@@ -83,7 +83,7 @@ def handle_cim_errors(method):
except pywbem.cim_http.Error as te:
raise LsmError(ErrorNumber.NETWORK_ERROR, str(te))
except Exception as e:
- Error("Unexpected exception:\n" + traceback.format_exc())
+ error("Unexpected exception:\n" + traceback.format_exc())
raise LsmError(ErrorNumber.PLUGIN_ERROR, str(e),
traceback.format_exc())
return cim_wrapper
diff --git a/python_binding/lsm/__init__.py b/python_binding/lsm/__init__.py
index 7bd8a94..1887c93 100644
--- a/python_binding/lsm/__init__.py
+++ b/python_binding/lsm/__init__.py
@@ -2,7 +2,7 @@ __all__ = []
from version import VERSION
-from _common import Error, Info, LsmError, ErrorLevel, ErrorNumber, \
+from _common import error, info, LsmError, ErrorLevel, ErrorNumber, \
JobStatus, uri_parse, md5, Proxy, size_bytes_2_size_human, \
common_urllib2_error_handler, size_human_2_size_bytes
from _data import (Disk, Volume, Pool, System, FileSystem, FsSnapshot,
diff --git a/python_binding/lsm/_common.py b/python_binding/lsm/_common.py
index 452f8fd..3f4d5e9 100644
--- a/python_binding/lsm/_common.py
+++ b/python_binding/lsm/_common.py
@@ -68,11 +68,11 @@ def common_urllib2_error_handler(exp):
if 'Errno 113' in desc:
raise LsmError(ErrorNumber.NETWORK_HOSTDOWN,
'Host is down')
- Error("Unexpected network error:\n" + traceback.format_exc())
+ error("Unexpected network error:\n" + traceback.format_exc())
raise LsmError(ErrorNumber.NETWORK_ERROR, desc)
stack_trace = traceback.format_exc()
- Error("Unexpected exception:\n" + stack_trace)
+ error("Unexpected exception:\n" + stack_trace)
raise LsmError(ErrorNumber.PLUGIN_ERROR, "Unexpected exception",
stack_trace)
@@ -346,12 +346,12 @@ def post_msg(level, prg, msg):
syslog.syslog(level, prg + ": " + l)
-def Error(*msg):
+def error(*msg):
post_msg(syslog.LOG_ERR, os.path.basename(sys.argv[0]),
params_to_string(*msg))
-def Info(*msg):
+def info(*msg):
if LOG_VERBOSE:
post_msg(syslog.LOG_INFO, os.path.basename(sys.argv[0]),
params_to_string(*msg))
diff --git a/python_binding/lsm/_pluginrunner.py b/python_binding/lsm/_pluginrunner.py
index 8882b53..024fc0d 100644
--- a/python_binding/lsm/_pluginrunner.py
+++ b/python_binding/lsm/_pluginrunner.py
@@ -19,7 +19,7 @@ import socket
import traceback
import sys
from _common import SocketEOF as _SocketEOF
-from lsm import LsmError, Error, ErrorNumber
+from lsm import LsmError, error, ErrorNumber
import _transport
from lsm.lsmcli import cmd_line_wrapper
@@ -72,8 +72,8 @@ class PluginRunner(object):
raise exception_info[1], None, exception_info[2]
except Exception:
- Error(traceback.format_exc())
- Error('Plug-in exiting.')
+ error(traceback.format_exc())
+ error('Plug-in exiting.')
sys.exit(2)
else:
@@ -123,19 +123,19 @@ class PluginRunner(object):
break
except ValueError as ve:
- Error(traceback.format_exc())
+ error(traceback.format_exc())
self.tp.send_error(msg_id, -32700, str(ve))
except AttributeError as ae:
- Error(traceback.format_exc())
+ error(traceback.format_exc())
self.tp.send_error(msg_id, -32601, str(ae))
except LsmError as lsm_err:
self.tp.send_error(msg_id, lsm_err.code, lsm_err.msg,
lsm_err.data)
except _SocketEOF:
#Client went away
- Error('Client went away, exiting plug-in')
+ error('Client went away, exiting plug-in')
except Exception:
- Error("Unhandled exception in plug-in!\n" + traceback.format_exc())
+ error("Unhandled exception in plug-in!\n" + traceback.format_exc())
try:
self.tp.send_error(msg_id, ErrorNumber.PLUGIN_ERROR,
--
1.8.2.1