[cura-tools] openlmi-tools-lmiwbem: check for job presence in synchronous method calls (212343e)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit 212343ebbf33ae531c478e061cb79c937da6385a
Author: Peter Hatina <phatina(a)redhat.com>
Date: Wed May 28 09:49:51 2014 +0200
check for job presence in synchronous method calls
>---------------------------------------------------------------
cli/lmi/shell/LMIMethod.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cli/lmi/shell/LMIMethod.py b/cli/lmi/shell/LMIMethod.py
index 8ef82e8..30e93e0 100644
--- a/cli/lmi/shell/LMIMethod.py
+++ b/cli/lmi/shell/LMIMethod.py
@@ -583,7 +583,7 @@ class LMIMethod(LMIWrapperBaseObject):
# Check if we can perform synchronous method call
job = call_rparams.get("job", None)
can_perform_sync_call = False
- if job.classname in LMIMethod._INDICATION_JOB_CLASSNAMES:
+ if job and job.classname in LMIMethod._INDICATION_JOB_CLASSNAMES:
can_perform_sync_call = True
if self._sync_method and job and can_perform_sync_call:
# We work with LMIInstance object, which simplifies the code
9 years, 10 months
[cura-tools] openlmi-tools-lmiwbem: code cleanup (2a0a6b8)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit 2a0a6b8bb5810b78fcfff1e415bf95bcb9c68047
Author: Peter Hatina <phatina(a)redhat.com>
Date: Mon May 26 09:38:31 2014 +0200
code cleanup
>---------------------------------------------------------------
cli/lmi/shell/LMIBaseClient.py | 6 +++---
cli/lmi/shell/LMIClass.py | 6 +++---
cli/lmi/shell/LMIConsole.py | 4 ++--
cli/lmi/shell/LMIConstantValues.py | 4 ++--
cli/lmi/shell/LMIFormatter.py | 2 +-
cli/lmi/shell/LMIInstance.py | 2 +-
cli/lmi/shell/LMIMethod.py | 4 ++--
cli/lmi/shell/LMIUtil.py | 2 +-
8 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/cli/lmi/shell/LMIBaseClient.py b/cli/lmi/shell/LMIBaseClient.py
index f300d66..54f70d9 100644
--- a/cli/lmi/shell/LMIBaseClient.py
+++ b/cli/lmi/shell/LMIBaseClient.py
@@ -163,7 +163,7 @@ class LMIBaseClient(object):
inst_name_list_filtered = []
for inst_name in inst_name_list:
append = True
- for (filter_key, filter_value) in inst_filter.iteritems():
+ for filter_key, filter_value in inst_filter.iteritems():
if inst_name[filter_key] != filter_value:
append = False
break
@@ -266,7 +266,7 @@ class LMIBaseClient(object):
if inst_filter:
more = False
query += " where"
- for (filter_key, filter_value) in inst_filter.iteritems():
+ for filter_key, filter_value in inst_filter.iteritems():
if more:
query += " and"
quotes = isinstance(filter_value, basestring)
@@ -292,7 +292,7 @@ class LMIBaseClient(object):
if inst_list and inst_filter:
inst_list_filtered = []
for inst in inst_list:
- for (filter_key, filter_value) in inst_filter.iteritems():
+ for filter_key, filter_value in inst_filter.iteritems():
if not filter_key in inst.properties or \
inst.properties[filter_key].value != filter_value:
break
diff --git a/cli/lmi/shell/LMIClass.py b/cli/lmi/shell/LMIClass.py
index 0b3d856..72fa765 100644
--- a/cli/lmi/shell/LMIClass.py
+++ b/cli/lmi/shell/LMIClass.py
@@ -95,7 +95,7 @@ class LMIClass(LMIWrapperBaseObject):
properties = properties if not properties is None else {}
qualifiers = qualifiers if not qualifiers is None else {}
self_properties = self._cim_class.properties
- for (key, value) in properties.iteritems():
+ for key, value in properties.iteritems():
if not key in self._cim_class.properties:
errorstr = "No such instance property '%s'" % key
lmi_raise_or_dump_exception(LMIUnknownPropertyError(errorstr))
@@ -164,7 +164,7 @@ class LMIClass(LMIWrapperBaseObject):
if full_fetch:
self._cim_class_full_fetch = full_fetch
# Store the constant values as a list. This can consume some time, if computed on demand.
- self._valuemap_properties_list = [k for (k, v) in self._cim_class.properties.iteritems() \
+ self._valuemap_properties_list = [k for k, v in self._cim_class.properties.iteritems() \
if "ValueMap" in v.qualifiers and "Values" in v.qualifiers]
# NOTE: usage with Key=something, Value=something is deprecated
@@ -353,7 +353,7 @@ class LMIClass(LMIWrapperBaseObject):
# can be called in the synchronous way. One type of such method is the
# method, which has its "counterpart" class __MethodParameters_<Method>.
# The other one is the method, which defines a Job return paremeter.
- for (name, method) in self._cim_class.methods.iteritems():
+ for name, method in self._cim_class.methods.iteritems():
if "__MethodParameters_" + name in class_names or \
"Job" in method.parameters:
methods_lst.append("Sync" + name)
diff --git a/cli/lmi/shell/LMIConsole.py b/cli/lmi/shell/LMIConsole.py
index 325828e..c9b04c7 100644
--- a/cli/lmi/shell/LMIConsole.py
+++ b/cli/lmi/shell/LMIConsole.py
@@ -146,7 +146,7 @@ class LMIConsole(code.InteractiveConsole):
if locals is None:
locals = {}
else:
- for (k, v) in locals.iteritems():
+ for k, v in locals.iteritems():
if isinstance(v, LMIConnection):
locals[k]._client.interactive = True
locals["clear_history"] = self.clear_history
@@ -239,7 +239,7 @@ class LMIConsole(code.InteractiveConsole):
if locals is None:
locals = {}
else:
- for (k, v) in locals.iteritems():
+ for k, v in locals.iteritems():
if isinstance(v, LMIConnection):
locals[k]._client.interactive = False
locals["connect"] = connect
diff --git a/cli/lmi/shell/LMIConstantValues.py b/cli/lmi/shell/LMIConstantValues.py
index 2f4a61d..5642cb9 100644
--- a/cli/lmi/shell/LMIConstantValues.py
+++ b/cli/lmi/shell/LMIConstantValues.py
@@ -44,7 +44,7 @@ class LMIConstantValues(object):
self._cast_type = cast_type
# Fill two dictionaries for bidirectional access to constant values.
cnt = 1
- for (key, value) in items:
+ for key, value in items:
try:
# Cast constant value first. If we get ValueError, no key
# modifications are necessary.
@@ -75,7 +75,7 @@ class LMIConstantValues(object):
:returns: pretty string
"""
result = ""
- for (k, v) in self._value_map.iteritems():
+ for k, v in self._value_map.iteritems():
result += "%s = %s\n" % (k, v)
return result[:-1]
diff --git a/cli/lmi/shell/LMIFormatter.py b/cli/lmi/shell/LMIFormatter.py
index c8193a6..47d5276 100644
--- a/cli/lmi/shell/LMIFormatter.py
+++ b/cli/lmi/shell/LMIFormatter.py
@@ -37,7 +37,7 @@ def _which(program):
:returns: full path of a selected executable
:rtype: string
"""
- (fpath, fname) = os.path.split(program)
+ fpath, fname = os.path.split(program)
if fpath:
if _is_executable(program):
return program
diff --git a/cli/lmi/shell/LMIInstance.py b/cli/lmi/shell/LMIInstance.py
index 118d45c..9085ef7 100644
--- a/cli/lmi/shell/LMIInstance.py
+++ b/cli/lmi/shell/LMIInstance.py
@@ -599,7 +599,7 @@ class LMIInstance(LMIWrapperBaseObject):
**Usage:** :ref:`instances_properties`.
"""
- for (name, prop) in self._cim_instance.properties.iteritems():
+ for name, prop in self._cim_instance.properties.iteritems():
value = str(prop.value)
if isinstance(prop.value, basestring):
value = "'%s'" % value
diff --git a/cli/lmi/shell/LMIMethod.py b/cli/lmi/shell/LMIMethod.py
index c612641..1cc84d5 100644
--- a/cli/lmi/shell/LMIMethod.py
+++ b/cli/lmi/shell/LMIMethod.py
@@ -179,7 +179,7 @@ class LMIMethod(LMIWrapperBaseObject):
self._lmi_instance._lmi_class.fetch(True)
self._method = self._lmi_instance._lmi_class._cim_class.methods[method]
# Store the constant values as a list. This can consume some time, if computed on demand.
- self._valuemap_parameters_list = [k for (k, v) in self._method.parameters.iteritems() \
+ self._valuemap_parameters_list = [k for k, v in self._method.parameters.iteritems() \
if "ValueMap" in v.qualifiers]
# For simplicity, we add return value constants to the same list
if "ValueMap" in self._method.qualifiers:
@@ -526,7 +526,7 @@ class LMIMethod(LMIWrapperBaseObject):
if method_args is None:
method_args = {}
method_args.update(kwargs)
- for (param, value) in method_args.iteritems():
+ for param, value in method_args.iteritems():
if param in self._method.parameters:
# Cast input parameters into acceptable CIM types
t = self._method.parameters[param].type
diff --git a/cli/lmi/shell/LMIUtil.py b/cli/lmi/shell/LMIUtil.py
index cb41d83..7e6dc6f 100644
--- a/cli/lmi/shell/LMIUtil.py
+++ b/cli/lmi/shell/LMIUtil.py
@@ -359,7 +359,7 @@ def lmi_associators(assoc_classes):
# Reference properties
ref_props = [
ref_prop_name \
- for (ref_prop_name, ref_prop) in assoc_class._cim_class.properties.iteritems() \
+ for ref_prop_name, ref_prop in assoc_class._cim_class.properties.iteritems() \
if ref_prop.type == "reference"
]
9 years, 10 months
[cura-tools] openlmi-tools-lmiwbem: drop unused LMIBaseClient::_get_classes() (53fa4f8)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit 53fa4f803fd2de51084493ad8824890d2ac1d3df
Author: Peter Hatina <phatina(a)redhat.com>
Date: Mon May 26 08:48:25 2014 +0200
drop unused LMIBaseClient::_get_classes()
>---------------------------------------------------------------
cli/lmi/shell/LMIBaseClient.py | 35 -----------------------------------
1 files changed, 0 insertions(+), 35 deletions(-)
diff --git a/cli/lmi/shell/LMIBaseClient.py b/cli/lmi/shell/LMIBaseClient.py
index ac0e7de..f300d66 100644
--- a/cli/lmi/shell/LMIBaseClient.py
+++ b/cli/lmi/shell/LMIBaseClient.py
@@ -326,41 +326,6 @@ class LMIBaseClient(object):
rval=self._cliconn.EnumerateClassNames(
namespace, **kwargs))
- # TODO: remove?
- @lmi_process_cim_exceptions(
- cimerror_callable=lambda r, e: [],
- conerror_callable=lambda r, e: [])
- def _get_classes(self, namespace=None, **kwargs):
- """
- Returns a :py:class:`CIMClass` object.
-
- :param string namespace: namespace, from which the class names list
- should be retrieved; if None, default namespace will be used (**NOTE:** see
- :py:mod:`wbem`)
- :param string ClassName: defines the class that is the basis for the enumeration.
- If the ClassName input parameter is absent, this implies that the names of all
- classes. Default value is None.
- :param bool DeepInheritance: if not present, of False, only the names of immediate
- child subclasses are returned, otherwise the names of all subclasses of the
- specified class should be returned. Default value is False.
- :param bool LocalOnly: indicates, if any CIM elements (properties, methods, and
- qualifiers) except those added or overridden in the class as specified in the
- classname input parameter shall not be included in the returned class.
- :param bool IncludeQualifiers: indicates, if all qualifiers for each class
- (including qualifiers on the class and on any returned properties, methods, or
- method parameters) shall be included as ``<QUALIFIER>`` elements in the
- response.
- :param bool IncludeClassOrigin: indicates, if the ``CLASSORIGIN`` attribute shall
- be present on all appropriate elements in each returned class.
- :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to a list of
- :py:class:`CIMClass` objects, if no error occurs; otherwise ``rval`` is set to
- None and ``errorstr`` to appropriate error string
- :raises: :py:exc:`CIMError`, :py:exc:`ConnectionError`
- """
- return LMIReturnValue(
- rval=self._cliconn.EnumerateClasses(
- namespace, **kwargs))
-
@lmi_process_cim_exceptions()
def _get_class(self, class_name, namespace=None, **kwargs):
"""
9 years, 10 months
[cura-tools] openlmi-tools-lmiwbem: switch to absolute imports (0d76857)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit 0d76857517f10fc4940d0e6c11aaf353a7d7fe42
Author: Peter Hatina <phatina(a)redhat.com>
Date: Fri May 23 15:16:19 2014 +0200
switch to absolute imports
>---------------------------------------------------------------
cli/lmi/shell/LMIBaseClient.py | 10 +++---
cli/lmi/shell/LMIClass.py | 36 ++++++++++++------------
cli/lmi/shell/LMICompleter.py | 18 ++++++------
cli/lmi/shell/LMIConsole.py | 40 ++++++++++++++--------------
cli/lmi/shell/LMIDecorators.py | 10 +++---
cli/lmi/shell/LMIFormatter.py | 4 +-
cli/lmi/shell/LMIIndicationListener.py | 2 +-
cli/lmi/shell/LMIInstance.py | 26 +++++++++---------
cli/lmi/shell/LMIInstanceName.py | 4 +-
cli/lmi/shell/LMIJob.py | 2 +-
cli/lmi/shell/LMIMethod.py | 46 ++++++++++++++++----------------
cli/lmi/shell/LMINamespace.py | 10 +++---
cli/lmi/shell/LMIShellClient.py | 6 ++--
cli/lmi/shell/LMIShellOptions.py | 2 +-
cli/lmi/shell/LMIUtil.py | 2 +-
cli/lmi/shell/__init__.py | 42 ++++++++++++++--------------
16 files changed, 130 insertions(+), 130 deletions(-)
diff --git a/cli/lmi/shell/LMIBaseClient.py b/cli/lmi/shell/LMIBaseClient.py
index c46a5f7..ac0e7de 100644
--- a/cli/lmi/shell/LMIBaseClient.py
+++ b/cli/lmi/shell/LMIBaseClient.py
@@ -18,13 +18,13 @@ import urlparse
from lmi.shell.compat import *
-from LMIReturnValue import LMIReturnValue
-from LMIUtil import lmi_raise_or_dump_exception
-from LMIUtil import lmi_instance_to_path
+from lmi.shell.LMIReturnValue import LMIReturnValue
+from lmi.shell.LMIUtil import lmi_raise_or_dump_exception
+from lmi.shell.LMIUtil import lmi_instance_to_path
-from LMIDecorators import lmi_process_cim_exceptions
+from lmi.shell.LMIDecorators import lmi_process_cim_exceptions
-from LMIExceptions import LMIFilterError
+from lmi.shell.LMIExceptions import LMIFilterError
class LMIBaseClient(object):
"""
diff --git a/cli/lmi/shell/LMIClass.py b/cli/lmi/shell/LMIClass.py
index ecc074f..0b3d856 100644
--- a/cli/lmi/shell/LMIClass.py
+++ b/cli/lmi/shell/LMIClass.py
@@ -17,24 +17,24 @@ import sys
from lmi.shell.compat import *
-from LMIBaseObject import LMIWrapperBaseObject
-from LMIBaseClient import LMIBaseClient
-from LMIFormatter import LMIClassFormatter
-from LMIConstantValues import LMIConstantValuesParamProp
-from LMIObjectFactory import LMIObjectFactory
-
-from LMIExceptions import LMIUnknownPropertyError
-
-from LMIDecorators import lmi_class_fetch_lazy
-from LMIDecorators import lmi_process_cim_exceptions
-from LMIDecorators import lmi_return_val_if_fail
-from LMIDecorators import lmi_return_if_fail
-
-from LMIUtil import lmi_cast_to_cim
-from LMIUtil import lmi_get_use_exceptions
-from LMIUtil import lmi_set_use_exceptions
-from LMIUtil import lmi_raise_or_dump_exception
-from LMIUtil import lmi_transform_to_lmi
+from lmi.shell.LMIBaseObject import LMIWrapperBaseObject
+from lmi.shell.LMIBaseClient import LMIBaseClient
+from lmi.shell.LMIFormatter import LMIClassFormatter
+from lmi.shell.LMIConstantValues import LMIConstantValuesParamProp
+from lmi.shell.LMIObjectFactory import LMIObjectFactory
+
+from lmi.shell.LMIExceptions import LMIUnknownPropertyError
+
+from lmi.shell.LMIDecorators import lmi_class_fetch_lazy
+from lmi.shell.LMIDecorators import lmi_process_cim_exceptions
+from lmi.shell.LMIDecorators import lmi_return_val_if_fail
+from lmi.shell.LMIDecorators import lmi_return_if_fail
+
+from lmi.shell.LMIUtil import lmi_cast_to_cim
+from lmi.shell.LMIUtil import lmi_get_use_exceptions
+from lmi.shell.LMIUtil import lmi_set_use_exceptions
+from lmi.shell.LMIUtil import lmi_raise_or_dump_exception
+from lmi.shell.LMIUtil import lmi_transform_to_lmi
class LMIClass(LMIWrapperBaseObject):
"""
diff --git a/cli/lmi/shell/LMICompleter.py b/cli/lmi/shell/LMICompleter.py
index b7efbf2..a2d56ea 100644
--- a/cli/lmi/shell/LMICompleter.py
+++ b/cli/lmi/shell/LMICompleter.py
@@ -17,15 +17,15 @@ import keyword
import os.path
import rlcompleter
-from LMIReturnValue import LMIReturnValue
-from LMIConstantValues import LMIConstantValues
-from LMINamespace import LMINamespace
-from LMINamespace import LMINamespaceRoot
-from LMIClass import LMIClass
-from LMIInstance import LMIInstance
-from LMIInstanceName import LMIInstanceName
-from LMIMethod import LMIMethod
-from LMIConnection import LMIConnection
+from lmi.shell.LMIReturnValue import LMIReturnValue
+from lmi.shell.LMIConstantValues import LMIConstantValues
+from lmi.shell.LMINamespace import LMINamespace
+from lmi.shell.LMINamespace import LMINamespaceRoot
+from lmi.shell.LMIClass import LMIClass
+from lmi.shell.LMIInstance import LMIInstance
+from lmi.shell.LMIInstanceName import LMIInstanceName
+from lmi.shell.LMIMethod import LMIMethod
+from lmi.shell.LMIConnection import LMIConnection
class LMICompleter(rlcompleter.Completer):
"""
diff --git a/cli/lmi/shell/LMIConsole.py b/cli/lmi/shell/LMIConsole.py
index 7582f8e..325828e 100644
--- a/cli/lmi/shell/LMIConsole.py
+++ b/cli/lmi/shell/LMIConsole.py
@@ -19,30 +19,30 @@ import code
import readline
import __builtin__
-from LMIUtil import LMIPassByRef
-from LMIIndicationListener import LMIIndicationListener
-from LMIBaseClient import LMIBaseClient
-from LMIShellClient import LMIShellClient
-from LMIShellConfig import LMIShellConfig
-from LMIShellOptions import LMIShellOptions
-from LMISubscription import LMISubscription
-from LMICompleter import LMICompleter
-from LMIConnection import LMIConnection
-from LMIShellConfig import LMIShellConfig
-from LMIReturnValue import LMIReturnValue
-from LMIObjectFactory import LMIObjectFactory
+from lmi.shell.LMIUtil import LMIPassByRef
+from lmi.shell.LMIIndicationListener import LMIIndicationListener
+from lmi.shell.LMIBaseClient import LMIBaseClient
+from lmi.shell.LMIShellClient import LMIShellClient
+from lmi.shell.LMIShellConfig import LMIShellConfig
+from lmi.shell.LMIShellOptions import LMIShellOptions
+from lmi.shell.LMISubscription import LMISubscription
+from lmi.shell.LMICompleter import LMICompleter
+from lmi.shell.LMIConnection import LMIConnection
+from lmi.shell.LMIShellConfig import LMIShellConfig
+from lmi.shell.LMIReturnValue import LMIReturnValue
+from lmi.shell.LMIObjectFactory import LMIObjectFactory
-from LMIConnection import connect as connect_internal
+from lmi.shell.LMIConnection import connect as connect_internal
-from LMIExceptions import CIMError
-from LMIExceptions import ConnectionError
+from lmi.shell.LMIExceptions import CIMError
+from lmi.shell.LMIExceptions import ConnectionError
-from LMIUtil import lmi_set_use_exceptions
-from LMIUtil import lmi_get_use_exceptions
-from LMIUtil import lmi_associators
-from LMIUtil import lmi_isinstance
+from lmi.shell.LMIUtil import lmi_set_use_exceptions
+from lmi.shell.LMIUtil import lmi_get_use_exceptions
+from lmi.shell.LMIUtil import lmi_associators
+from lmi.shell.LMIUtil import lmi_isinstance
-from LMIHelper import LMIHelper
+from lmi.shell.LMIHelper import LMIHelper
class LMIConsole(code.InteractiveConsole):
"""
diff --git a/cli/lmi/shell/LMIDecorators.py b/cli/lmi/shell/LMIDecorators.py
index eecb7a3..e5c6180 100644
--- a/cli/lmi/shell/LMIDecorators.py
+++ b/cli/lmi/shell/LMIDecorators.py
@@ -17,12 +17,12 @@ from functools import wraps
from lmi.shell.compat import *
-from LMIReturnValue import LMIReturnValue
-from LMIUtil import lmi_raise_or_dump_exception
+from lmi.shell.LMIReturnValue import LMIReturnValue
+from lmi.shell.LMIUtil import lmi_raise_or_dump_exception
-from LMIExceptions import CIMError
-from LMIExceptions import ConnectionError
-from LMIExceptions import LMIDeletedObjectError
+from lmi.shell.LMIExceptions import CIMError
+from lmi.shell.LMIExceptions import ConnectionError
+from lmi.shell.LMIExceptions import LMIDeletedObjectError
class lmi_return_expr_if_fail(object):
"""
diff --git a/cli/lmi/shell/LMIFormatter.py b/cli/lmi/shell/LMIFormatter.py
index b61b0e9..c8193a6 100644
--- a/cli/lmi/shell/LMIFormatter.py
+++ b/cli/lmi/shell/LMIFormatter.py
@@ -20,9 +20,9 @@ import tempfile
import subprocess
from textwrap import TextWrapper
-from LMIUtil import lmi_raise_or_dump_exception
+from lmi.shell.LMIUtil import lmi_raise_or_dump_exception
-from LMIExceptions import LMINoPagerError
+from lmi.shell.LMIExceptions import LMINoPagerError
def _is_executable(fpath):
"""
diff --git a/cli/lmi/shell/LMIIndicationListener.py b/cli/lmi/shell/LMIIndicationListener.py
index 9e21c9a..6d1fcba 100644
--- a/cli/lmi/shell/LMIIndicationListener.py
+++ b/cli/lmi/shell/LMIIndicationListener.py
@@ -20,7 +20,7 @@ import string
from lmi.shell.compat import *
-from LMIExceptions import LMIHandlerNamePatternError
+from lmi.shell.LMIExceptions import LMIHandlerNamePatternError
class LMIIndicationListener(wbem.CIMIndicationListener):
"""
diff --git a/cli/lmi/shell/LMIInstance.py b/cli/lmi/shell/LMIInstance.py
index a9555ac..118d45c 100644
--- a/cli/lmi/shell/LMIInstance.py
+++ b/cli/lmi/shell/LMIInstance.py
@@ -17,21 +17,21 @@ import sys
from lmi.shell.compat import *
-from LMIBaseObject import LMIWrapperBaseObject
-from LMIFormatter import LMIInstanceFormatter
-from LMIFormatter import LMIMofFormatter
-from LMIObjectFactory import LMIObjectFactory
-from LMIReturnValue import LMIReturnValue
-
-from LMIDecorators import lmi_possibly_deleted
-from LMIDecorators import lmi_return_expr_if_fail
-from LMIDecorators import lmi_return_val_if_fail
-from LMIDecorators import lmi_return_if_fail
-
-from LMIUtil import lmi_cast_to_cim
-from LMIUtil import lmi_cast_to_lmi
-from LMIUtil import lmi_transform_to_lmi
-from LMIUtil import lmi_wrap_cim_method
+from lmi.shell.LMIBaseObject import LMIWrapperBaseObject
+from lmi.shell.LMIFormatter import LMIInstanceFormatter
+from lmi.shell.LMIFormatter import LMIMofFormatter
+from lmi.shell.LMIObjectFactory import LMIObjectFactory
+from lmi.shell.LMIReturnValue import LMIReturnValue
+
+from lmi.shell.LMIDecorators import lmi_possibly_deleted
+from lmi.shell.LMIDecorators import lmi_return_expr_if_fail
+from lmi.shell.LMIDecorators import lmi_return_val_if_fail
+from lmi.shell.LMIDecorators import lmi_return_if_fail
+
+from lmi.shell.LMIUtil import lmi_cast_to_cim
+from lmi.shell.LMIUtil import lmi_cast_to_lmi
+from lmi.shell.LMIUtil import lmi_transform_to_lmi
+from lmi.shell.LMIUtil import lmi_wrap_cim_method
class LMIInstance(LMIWrapperBaseObject):
"""
diff --git a/cli/lmi/shell/LMIInstanceName.py b/cli/lmi/shell/LMIInstanceName.py
index 95f5a10..b802b9f 100644
--- a/cli/lmi/shell/LMIInstanceName.py
+++ b/cli/lmi/shell/LMIInstanceName.py
@@ -17,8 +17,8 @@ import sys
from lmi.shell.compat import *
-from LMIBaseObject import LMIWrapperBaseObject
-from LMIUtil import lmi_transform_to_lmi
+from lmi.shell.LMIBaseObject import LMIWrapperBaseObject
+from lmi.shell.LMIUtil import lmi_transform_to_lmi
class LMIInstanceName(LMIWrapperBaseObject):
"""
diff --git a/cli/lmi/shell/LMIJob.py b/cli/lmi/shell/LMIJob.py
index 7ce7333..b2c9df2 100644
--- a/cli/lmi/shell/LMIJob.py
+++ b/cli/lmi/shell/LMIJob.py
@@ -15,7 +15,7 @@
from lmi.shell.compat import *
-from LMIObjectFactory import LMIObjectFactory
+from lmi.shell.LMIObjectFactory import LMIObjectFactory
# NOTE: the enumeration comes from DMTF standard.
JOB_STATE_COMPLETED, \
diff --git a/cli/lmi/shell/LMIMethod.py b/cli/lmi/shell/LMIMethod.py
index b479d5f..c612641 100644
--- a/cli/lmi/shell/LMIMethod.py
+++ b/cli/lmi/shell/LMIMethod.py
@@ -23,32 +23,32 @@ import collections
from lmi.shell.compat import *
-from LMIBaseObject import LMIWrapperBaseObject
-from LMIBaseClient import LMIBaseClient
-from LMIShellConfig import LMIShellConfig
-from LMIObjectFactory import LMIObjectFactory
-from LMIFormatter import LMIMethodFormatter
-from LMIFormatter import LMIMofFormatter
-from LMIReturnValue import LMIReturnValue
-from LMIConstantValues import LMIConstantValuesParamProp
-from LMIConstantValues import LMIConstantValuesMethodReturnType
-from LMIIndicationListener import LMIIndicationListener
-
-from LMIJob import lmi_is_job_finished
-from LMIJob import lmi_is_job_completed
-from LMIJob import lmi_is_job_terminated
-from LMIJob import lmi_is_job_killed
-from LMIJob import lmi_is_job_exception
-from LMIJob import JOB_NOT_FINISHED
-from LMIJob import JOB_FINISH_DELAYED
-from LMIJob import JOB_FINISH_EARLY
-
-from LMIUtil import LMIPassByRef
-from LMIUtil import lmi_raise_or_dump_exception
-from LMIUtil import lmi_transform_to_cim_param
-from LMIUtil import lmi_transform_to_lmi
-
-from LMIExceptions import *
+from lmi.shell.LMIBaseObject import LMIWrapperBaseObject
+from lmi.shell.LMIBaseClient import LMIBaseClient
+from lmi.shell.LMIShellConfig import LMIShellConfig
+from lmi.shell.LMIObjectFactory import LMIObjectFactory
+from lmi.shell.LMIFormatter import LMIMethodFormatter
+from lmi.shell.LMIFormatter import LMIMofFormatter
+from lmi.shell.LMIReturnValue import LMIReturnValue
+from lmi.shell.LMIConstantValues import LMIConstantValuesParamProp
+from lmi.shell.LMIConstantValues import LMIConstantValuesMethodReturnType
+from lmi.shell.LMIIndicationListener import LMIIndicationListener
+
+from lmi.shell.LMIJob import lmi_is_job_finished
+from lmi.shell.LMIJob import lmi_is_job_completed
+from lmi.shell.LMIJob import lmi_is_job_terminated
+from lmi.shell.LMIJob import lmi_is_job_killed
+from lmi.shell.LMIJob import lmi_is_job_exception
+from lmi.shell.LMIJob import JOB_NOT_FINISHED
+from lmi.shell.LMIJob import JOB_FINISH_DELAYED
+from lmi.shell.LMIJob import JOB_FINISH_EARLY
+
+from lmi.shell.LMIUtil import LMIPassByRef
+from lmi.shell.LMIUtil import lmi_raise_or_dump_exception
+from lmi.shell.LMIUtil import lmi_transform_to_cim_param
+from lmi.shell.LMIUtil import lmi_transform_to_lmi
+
+from lmi.shell.LMIExceptions import *
logger = logging.getLogger(__name__)
diff --git a/cli/lmi/shell/LMINamespace.py b/cli/lmi/shell/LMINamespace.py
index 4fc41ff..7f66d58 100644
--- a/cli/lmi/shell/LMINamespace.py
+++ b/cli/lmi/shell/LMINamespace.py
@@ -17,12 +17,12 @@ import sys
import LMIExceptions
-from LMIBaseObject import LMIWrapperBaseObject
-from LMIBaseClient import LMIBaseClient
+from lmi.shell.LMIBaseObject import LMIWrapperBaseObject
+from lmi.shell.LMIBaseClient import LMIBaseClient
-from LMIUtil import lmi_wrap_cim_namespace
-from LMIUtil import lmi_wrap_cim_class
-from LMIUtil import lmi_transform_to_lmi
+from lmi.shell.LMIUtil import lmi_wrap_cim_namespace
+from lmi.shell.LMIUtil import lmi_wrap_cim_class
+from lmi.shell.LMIUtil import lmi_transform_to_lmi
class LMINamespace(LMIWrapperBaseObject):
"""
diff --git a/cli/lmi/shell/LMIShellClient.py b/cli/lmi/shell/LMIShellClient.py
index dd8f47f..71009db 100644
--- a/cli/lmi/shell/LMIShellClient.py
+++ b/cli/lmi/shell/LMIShellClient.py
@@ -13,9 +13,9 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
-from LMIBaseClient import LMIBaseClient
-from LMIReturnValue import LMIReturnValue
-from LMIShellCache import LMIShellCache
+from lmi.shell.LMIBaseClient import LMIBaseClient
+from lmi.shell.LMIReturnValue import LMIReturnValue
+from lmi.shell.LMIShellCache import LMIShellCache
class LMIShellClient(LMIBaseClient):
"""
diff --git a/cli/lmi/shell/LMIShellOptions.py b/cli/lmi/shell/LMIShellOptions.py
index 8ee0d6d..5d93d5e 100644
--- a/cli/lmi/shell/LMIShellOptions.py
+++ b/cli/lmi/shell/LMIShellOptions.py
@@ -17,7 +17,7 @@ import os
import sys
import argparse
-from LMIShellVersion import __version__
+from lmi.shell.LMIShellVersion import __version__
class LMIShellOptionsHelpWithVersionFormatter(argparse.HelpFormatter):
"""
diff --git a/cli/lmi/shell/LMIUtil.py b/cli/lmi/shell/LMIUtil.py
index bef71b1..cb41d83 100644
--- a/cli/lmi/shell/LMIUtil.py
+++ b/cli/lmi/shell/LMIUtil.py
@@ -20,7 +20,7 @@ import logging
from lmi.shell import wbem
-from LMIObjectFactory import LMIObjectFactory
+from lmi.shell.LMIObjectFactory import LMIObjectFactory
# By default, the LMIShell does not use exceptions; LMIReturnValue
# is used instead (with proper error string).
diff --git a/cli/lmi/shell/__init__.py b/cli/lmi/shell/__init__.py
index cfb4d5e..c34a76d 100644
--- a/cli/lmi/shell/__init__.py
+++ b/cli/lmi/shell/__init__.py
@@ -22,32 +22,32 @@ import sys
from lmi.shell.LMIShellLogger import lmi_init_logger
lmi_init_logger()
-from LMIShellVersion import __version__
+from lmi.shell.LMIShellVersion import __version__
from lmi.shell.compat import *
-from LMIExceptions import *
-from LMIUtil import LMIPassByRef
-from LMIIndicationListener import LMIIndicationListener
-from LMIReturnValue import LMIReturnValue
-from LMIBaseClient import LMIBaseClient
-from LMIShellClient import LMIShellClient
-from LMIShellConfig import LMIShellConfig
-from LMIShellOptions import LMIShellOptions
-from LMISubscription import LMISubscription
-from LMINamespace import LMINamespace
-from LMINamespace import LMINamespaceRoot
-from LMIConstantValues import LMIConstantValues
-from LMIClass import LMIClass
-from LMIInstanceName import LMIInstanceName
-from LMIMethod import LMIMethod
-from LMIInstance import LMIInstance
-from LMIConnection import LMIConnection
+from lmi.shell.LMIExceptions import *
+from lmi.shell.LMIUtil import LMIPassByRef
+from lmi.shell.LMIIndicationListener import LMIIndicationListener
+from lmi.shell.LMIReturnValue import LMIReturnValue
+from lmi.shell.LMIBaseClient import LMIBaseClient
+from lmi.shell.LMIShellClient import LMIShellClient
+from lmi.shell.LMIShellConfig import LMIShellConfig
+from lmi.shell.LMIShellOptions import LMIShellOptions
+from lmi.shell.LMISubscription import LMISubscription
+from lmi.shell.LMINamespace import LMINamespace
+from lmi.shell.LMINamespace import LMINamespaceRoot
+from lmi.shell.LMIConstantValues import LMIConstantValues
+from lmi.shell.LMIClass import LMIClass
+from lmi.shell.LMIInstanceName import LMIInstanceName
+from lmi.shell.LMIMethod import LMIMethod
+from lmi.shell.LMIInstance import LMIInstance
+from lmi.shell.LMIConnection import LMIConnection
-from LMIConnection import connect
+from lmi.shell.LMIConnection import connect
# Register LMI wrapper classes into a LMIObjectFactory to avoid circular dependency
# between those classes.
-from LMIObjectFactory import LMIObjectFactory
+from lmi.shell.LMIObjectFactory import LMIObjectFactory
LMIObjectFactory().register(LMINamespace)
LMIObjectFactory().register(LMINamespaceRoot)
LMIObjectFactory().register(LMIClass)
@@ -57,4 +57,4 @@ LMIObjectFactory().register(LMIMethod)
# LMIConsole depends on LMIObjectFactory and needs to be imported after
# LMIObjectFactory has all wrapper classes registered.
-from LMIConsole import LMIConsole
+from lmi.shell.LMIConsole import LMIConsole
9 years, 10 months
[cura-tools] openlmi-tools-lmiwbem: pep8 cleanup (f3ea06d)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit f3ea06d53f7ce9af050d5dcdd974d0597db95e5a
Author: Peter Hatina <phatina(a)redhat.com>
Date: Tue May 27 12:55:09 2014 +0200
pep8 cleanup
>---------------------------------------------------------------
Diff suppressed because of size. To see it, use:
git diff --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol ^f3ea06d53f7ce9af050d5dcdd974d0597db95e5a~1 f3ea06d53f7ce9af050d5dcdd974d0597db95e5a
9 years, 10 months
[cura-tools] openlmi-tools-lmiwbem: introduce compatibility module (7ced443)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit 7ced4435bdabcec146a45bdafa121f7e8c292ab9
Author: Peter Hatina <phatina(a)redhat.com>
Date: Fri May 23 15:00:34 2014 +0200
introduce compatibility module
LMIShell primarily uses LMIWBEM as backend. If such module isn't
available, PyWBEM is used instead.
>---------------------------------------------------------------
Diff suppressed because of size. To see it, use:
git diff --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol ^7ced4435bdabcec146a45bdafa121f7e8c292ab9~1 7ced4435bdabcec146a45bdafa121f7e8c292ab9
9 years, 10 months
[cura-tools] openlmi-tools-lmiwbem: drop autogenerated doc files (df7dc58)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit df7dc585d09bd7f3f192e5e477718831e12e3f16
Author: Peter Hatina <phatina(a)redhat.com>
Date: Tue May 27 13:07:37 2014 +0200
drop autogenerated doc files
>---------------------------------------------------------------
doc/src/shell/_code/code_LMIBaseClient.rst | 5 ---
doc/src/shell/_code/code_LMIBaseObject.rst | 5 ---
doc/src/shell/_code/code_LMIClass.rst | 5 ---
doc/src/shell/_code/code_LMICompleter.rst | 5 ---
doc/src/shell/_code/code_LMIConnection.rst | 5 ---
doc/src/shell/_code/code_LMIConsole.rst | 5 ---
doc/src/shell/_code/code_LMIConstantValues.rst | 5 ---
doc/src/shell/_code/code_LMIDecorators.rst | 5 ---
doc/src/shell/_code/code_LMIExceptions.rst | 5 ---
doc/src/shell/_code/code_LMIFormatter.rst | 5 ---
doc/src/shell/_code/code_LMIHelper.rst | 5 ---
doc/src/shell/_code/code_LMIIndicationListener.rst | 5 ---
doc/src/shell/_code/code_LMIInstance.rst | 5 ---
doc/src/shell/_code/code_LMIInstanceName.rst | 5 ---
doc/src/shell/_code/code_LMIJob.rst | 5 ---
doc/src/shell/_code/code_LMIMethod.rst | 5 ---
doc/src/shell/_code/code_LMINamespace.rst | 5 ---
doc/src/shell/_code/code_LMIObjectFactory.rst | 5 ---
doc/src/shell/_code/code_LMIReturnValue.rst | 5 ---
doc/src/shell/_code/code_LMIShellCache.rst | 5 ---
doc/src/shell/_code/code_LMIShellClient.rst | 5 ---
doc/src/shell/_code/code_LMIShellConfig.rst | 5 ---
doc/src/shell/_code/code_LMIShellOptions.rst | 5 ---
doc/src/shell/_code/code_LMIShellVersion.rst | 5 ---
doc/src/shell/_code/code_LMISubscription.rst | 5 ---
doc/src/shell/_code/code_LMIUtil.rst | 5 ---
doc/src/shell/code.rst | 31 --------------------
27 files changed, 0 insertions(+), 161 deletions(-)
diff --git a/doc/src/shell/_code/code_LMIBaseClient.rst b/doc/src/shell/_code/code_LMIBaseClient.rst
deleted file mode 100644
index d9b4979..0000000
--- a/doc/src/shell/_code/code_LMIBaseClient.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIBaseClient Package
-=====================
-
-.. automodule:: lmi.shell.LMIBaseClient
- :members:
diff --git a/doc/src/shell/_code/code_LMIBaseObject.rst b/doc/src/shell/_code/code_LMIBaseObject.rst
deleted file mode 100644
index bc225ae..0000000
--- a/doc/src/shell/_code/code_LMIBaseObject.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIBaseObject Package
-=====================
-
-.. automodule:: lmi.shell.LMIBaseObject
- :members:
diff --git a/doc/src/shell/_code/code_LMIClass.rst b/doc/src/shell/_code/code_LMIClass.rst
deleted file mode 100644
index 6f1a218..0000000
--- a/doc/src/shell/_code/code_LMIClass.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIClass Package
-================
-
-.. automodule:: lmi.shell.LMIClass
- :members:
diff --git a/doc/src/shell/_code/code_LMICompleter.rst b/doc/src/shell/_code/code_LMICompleter.rst
deleted file mode 100644
index 2d71b63..0000000
--- a/doc/src/shell/_code/code_LMICompleter.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMICompleter Package
-====================
-
-.. automodule:: lmi.shell.LMICompleter
- :members:
diff --git a/doc/src/shell/_code/code_LMIConnection.rst b/doc/src/shell/_code/code_LMIConnection.rst
deleted file mode 100644
index b128329..0000000
--- a/doc/src/shell/_code/code_LMIConnection.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIConnection Package
-=====================
-
-.. automodule:: lmi.shell.LMIConnection
- :members:
diff --git a/doc/src/shell/_code/code_LMIConsole.rst b/doc/src/shell/_code/code_LMIConsole.rst
deleted file mode 100644
index 73221c8..0000000
--- a/doc/src/shell/_code/code_LMIConsole.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIConsole Package
-==================
-
-.. automodule:: lmi.shell.LMIConsole
- :members:
diff --git a/doc/src/shell/_code/code_LMIConstantValues.rst b/doc/src/shell/_code/code_LMIConstantValues.rst
deleted file mode 100644
index a313272..0000000
--- a/doc/src/shell/_code/code_LMIConstantValues.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIConstantValues Package
-=========================
-
-.. automodule:: lmi.shell.LMIConstantValues
- :members:
diff --git a/doc/src/shell/_code/code_LMIDecorators.rst b/doc/src/shell/_code/code_LMIDecorators.rst
deleted file mode 100644
index a601079..0000000
--- a/doc/src/shell/_code/code_LMIDecorators.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIDecorators Package
-=====================
-
-.. automodule:: lmi.shell.LMIDecorators
- :members:
diff --git a/doc/src/shell/_code/code_LMIExceptions.rst b/doc/src/shell/_code/code_LMIExceptions.rst
deleted file mode 100644
index 2e0035f..0000000
--- a/doc/src/shell/_code/code_LMIExceptions.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIExceptions Package
-=====================
-
-.. automodule:: lmi.shell.LMIExceptions
- :members:
diff --git a/doc/src/shell/_code/code_LMIFormatter.rst b/doc/src/shell/_code/code_LMIFormatter.rst
deleted file mode 100644
index abbda6e..0000000
--- a/doc/src/shell/_code/code_LMIFormatter.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIFormatter Package
-====================
-
-.. automodule:: lmi.shell.LMIFormatter
- :members:
diff --git a/doc/src/shell/_code/code_LMIHelper.rst b/doc/src/shell/_code/code_LMIHelper.rst
deleted file mode 100644
index abd57fa..0000000
--- a/doc/src/shell/_code/code_LMIHelper.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIHelper Package
-=================
-
-.. automodule:: lmi.shell.LMIHelper
- :members:
diff --git a/doc/src/shell/_code/code_LMIIndicationListener.rst b/doc/src/shell/_code/code_LMIIndicationListener.rst
deleted file mode 100644
index 65ae25c..0000000
--- a/doc/src/shell/_code/code_LMIIndicationListener.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIIndicationListener Package
-=============================
-
-.. automodule:: lmi.shell.LMIIndicationListener
- :members:
diff --git a/doc/src/shell/_code/code_LMIInstance.rst b/doc/src/shell/_code/code_LMIInstance.rst
deleted file mode 100644
index 584bb47..0000000
--- a/doc/src/shell/_code/code_LMIInstance.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIInstance Package
-===================
-
-.. automodule:: lmi.shell.LMIInstance
- :members:
diff --git a/doc/src/shell/_code/code_LMIInstanceName.rst b/doc/src/shell/_code/code_LMIInstanceName.rst
deleted file mode 100644
index a5d8e23..0000000
--- a/doc/src/shell/_code/code_LMIInstanceName.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIInstanceName Package
-=======================
-
-.. automodule:: lmi.shell.LMIInstanceName
- :members:
diff --git a/doc/src/shell/_code/code_LMIJob.rst b/doc/src/shell/_code/code_LMIJob.rst
deleted file mode 100644
index 0804471..0000000
--- a/doc/src/shell/_code/code_LMIJob.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIJob Package
-==============
-
-.. automodule:: lmi.shell.LMIJob
- :members:
diff --git a/doc/src/shell/_code/code_LMIMethod.rst b/doc/src/shell/_code/code_LMIMethod.rst
deleted file mode 100644
index 682505a..0000000
--- a/doc/src/shell/_code/code_LMIMethod.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIMethod Package
-=================
-
-.. automodule:: lmi.shell.LMIMethod
- :members:
diff --git a/doc/src/shell/_code/code_LMINamespace.rst b/doc/src/shell/_code/code_LMINamespace.rst
deleted file mode 100644
index 8a49f51..0000000
--- a/doc/src/shell/_code/code_LMINamespace.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMINamespace Package
-====================
-
-.. automodule:: lmi.shell.LMINamespace
- :members:
diff --git a/doc/src/shell/_code/code_LMIObjectFactory.rst b/doc/src/shell/_code/code_LMIObjectFactory.rst
deleted file mode 100644
index 8bcc750..0000000
--- a/doc/src/shell/_code/code_LMIObjectFactory.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIObjectFactory Package
-========================
-
-.. automodule:: lmi.shell.LMIObjectFactory
- :members:
diff --git a/doc/src/shell/_code/code_LMIReturnValue.rst b/doc/src/shell/_code/code_LMIReturnValue.rst
deleted file mode 100644
index e423ea3..0000000
--- a/doc/src/shell/_code/code_LMIReturnValue.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIReturnValue Package
-======================
-
-.. automodule:: lmi.shell.LMIReturnValue
- :members:
diff --git a/doc/src/shell/_code/code_LMIShellCache.rst b/doc/src/shell/_code/code_LMIShellCache.rst
deleted file mode 100644
index 17fd5dd..0000000
--- a/doc/src/shell/_code/code_LMIShellCache.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIShellCache Package
-=====================
-
-.. automodule:: lmi.shell.LMIShellCache
- :members:
diff --git a/doc/src/shell/_code/code_LMIShellClient.rst b/doc/src/shell/_code/code_LMIShellClient.rst
deleted file mode 100644
index 8163132..0000000
--- a/doc/src/shell/_code/code_LMIShellClient.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIShellClient Package
-======================
-
-.. automodule:: lmi.shell.LMIShellClient
- :members:
diff --git a/doc/src/shell/_code/code_LMIShellConfig.rst b/doc/src/shell/_code/code_LMIShellConfig.rst
deleted file mode 100644
index ba1702c..0000000
--- a/doc/src/shell/_code/code_LMIShellConfig.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIShellConfig Package
-======================
-
-.. automodule:: lmi.shell.LMIShellConfig
- :members:
diff --git a/doc/src/shell/_code/code_LMIShellOptions.rst b/doc/src/shell/_code/code_LMIShellOptions.rst
deleted file mode 100644
index d852f84..0000000
--- a/doc/src/shell/_code/code_LMIShellOptions.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIShellOptions Package
-=======================
-
-.. automodule:: lmi.shell.LMIShellOptions
- :members:
diff --git a/doc/src/shell/_code/code_LMIShellVersion.rst b/doc/src/shell/_code/code_LMIShellVersion.rst
deleted file mode 100644
index 5708c8a..0000000
--- a/doc/src/shell/_code/code_LMIShellVersion.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIShellVersion Package
-=======================
-
-.. automodule:: lmi.shell.LMIShellVersion
- :members:
diff --git a/doc/src/shell/_code/code_LMISubscription.rst b/doc/src/shell/_code/code_LMISubscription.rst
deleted file mode 100644
index 234997b..0000000
--- a/doc/src/shell/_code/code_LMISubscription.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMISubscription Package
-=======================
-
-.. automodule:: lmi.shell.LMISubscription
- :members:
diff --git a/doc/src/shell/_code/code_LMIUtil.rst b/doc/src/shell/_code/code_LMIUtil.rst
deleted file mode 100644
index 901f1c0..0000000
--- a/doc/src/shell/_code/code_LMIUtil.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-LMIUtil Package
-===============
-
-.. automodule:: lmi.shell.LMIUtil
- :members:
diff --git a/doc/src/shell/code.rst b/doc/src/shell/code.rst
deleted file mode 100644
index 075d7ce..0000000
--- a/doc/src/shell/code.rst
+++ /dev/null
@@ -1,31 +0,0 @@
-API Documentation
-=================
-
-.. toctree::
- :maxdepth: 2
-
- _code/code_LMIConnection
- _code/code_LMIShellCache
- _code/code_LMIDecorators
- _code/code_LMIExceptions
- _code/code_LMIInstance
- _code/code_LMIShellConfig
- _code/code_LMIBaseObject
- _code/code_LMIConstantValues
- _code/code_LMIReturnValue
- _code/code_LMIUtil
- _code/code_LMIObjectFactory
- _code/code_LMIFormatter
- _code/code_LMIShellOptions
- _code/code_LMIClass
- _code/code_LMIInstanceName
- _code/code_LMIJob
- _code/code_LMICompleter
- _code/code_LMIConsole
- _code/code_LMIMethod
- _code/code_LMISubscription
- _code/code_LMIShellClient
- _code/code_LMINamespace
- _code/code_LMIBaseClient
- _code/code_LMIHelper
- _code/code_LMIIndicationListener
9 years, 10 months
[cura-tools] openlmi-tools-lmiwbem: reorder API documentation links (118b6d8)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit 118b6d8efedfc9704da778911c60505cd4dae639
Author: Peter Hatina <phatina(a)redhat.com>
Date: Tue May 27 13:08:04 2014 +0200
reorder API documentation links
>---------------------------------------------------------------
doc/src/shell/generate_code.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/doc/src/shell/generate_code.py b/doc/src/shell/generate_code.py
index bb7aa24..1790b46 100755
--- a/doc/src/shell/generate_code.py
+++ b/doc/src/shell/generate_code.py
@@ -5,7 +5,12 @@ import sys
mod_path = os.path.abspath("../../../cli/lmi/shell/")
-filenames = os.listdir(mod_path)
+filt = lambda p: \
+ p.endswith(".py") and \
+ not p.startswith("_") and \
+ p != "LMIShellVersion.py"
+filenames = filter(filt, os.listdir(mod_path))
+filenames.sort()
if not os.path.exists("_code"):
os.mkdir("_code")
@@ -17,8 +22,6 @@ code_fout.write(
" :maxdepth: 2\n\n")
for filename in filenames:
- if not filename.endswith(".py") or filename.startswith("_"):
- continue
module = str(filename[:-3])
code_fout.write(" _code/code_%s\n" % module)
@@ -26,7 +29,8 @@ for filename in filenames:
code_module_fout = open("_code/code_"+module+".rst", "w")
code_module_fout.write("%s Package\n" % module)
code_module_fout.write("=" * (len(module)+8) + "\n\n")
- code_module_fout.write(".. automodule:: lmi.shell.%s\n :members:\n" % module)
+ code_module_fout.write(
+ ".. automodule:: lmi.shell.%s\n :members:\n" % module)
code_module_fout.close()
code_fout.close()
9 years, 10 months
[cura-tools] master: lmi: extended manpage, improved help (eb41e45)
by miminar@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
>---------------------------------------------------------------
commit eb41e45a42e6c8dcd2b5111340122b1a1e778b12
Author: Michal Minar <miminar(a)redhat.com>
Date: Tue Jun 17 13:15:13 2014 +0200
lmi: extended manpage, improved help
>---------------------------------------------------------------
cli/lmi/scripts/_metacommand/toplevel.py | 10 +++++-----
cli/man/generate.sh | 27 ++++++++++++++++++++++++++-
cli/man/lmi.1 | 16 +++++++++++++++-
3 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/cli/lmi/scripts/_metacommand/toplevel.py b/cli/lmi/scripts/_metacommand/toplevel.py
index a0372a7..419a856 100644
--- a/cli/lmi/scripts/_metacommand/toplevel.py
+++ b/cli/lmi/scripts/_metacommand/toplevel.py
@@ -57,14 +57,14 @@ Options:
--version Print version of '%(cmd)s' in use and quit.
Handling hosts:
- If no --host or --hosts-file given the "localhost" is tried. When running
- under root with Pegasus CIMOM, this results in a connection over unix
- socket (without the need for credentials).
+ If no --host or --hosts-file are given, the "localhost" will be tried. When
+ running under root with Pegasus CIMOM, this results in a connection over
+ unix socket (no need to supply credentials).
Hosts may contain embedded credentials e.g.:
http://user:passwd@hostname:5988
- Avoid supplying them on command line though since arguments are visible in
- process table. Use --hosts-file option instead.
+ Avoid supplying them on command line though. Always prefer the --hosts-file
+ option.
"""
import docopt
diff --git a/cli/man/generate.sh b/cli/man/generate.sh
index a8a8e8d..e2b4dd9 100755
--- a/cli/man/generate.sh
+++ b/cli/man/generate.sh
@@ -16,6 +16,8 @@ configuration_file=`mktemp`
# pusg - parse usage
# wopt - wait for options
# popt - parse options
+# whts - wait for hosts handling section
+# phts - parse hosts handling section
state="desc"
re_option="^([[:blank:]]+)((-[-[:alpha:]_]+)"
re_option+="(\ [][:alpha:]<>_()[|-]+)*)(\ \ +(.*))?"
@@ -76,7 +78,7 @@ while IFS= read line; do
popt*)
if [[ "$line" =~ ^[[:blank:]]*$ ]]; then
printf "\n"
- break
+ state="whts"
elif [[ "$line" =~ $re_option ]]; then
opt_count=`echo $state | sed 's/^popt\([[:digit:]]\+\)/\1/'`
[ "$opt_count" -gt 0 ] && printf '\n'
@@ -89,6 +91,29 @@ while IFS= read line; do
fi
;;
+ "whts")
+ if [[ "$line" =~ ^[Hh]andling\ [Hh]osts ]]; then
+ printf ".SH HOSTS HANDLING\n"
+ state="phts"
+ fi
+ ;;
+
+ "phts")
+ if [[ "$line" =~ ^$ ]]; then
+ new_paragraph=1
+ elif ! [[ "$line" =~ ^[^[:space:]] ]]; then
+ if [[ ${new_paragraph:-0} = 1 ]]; then
+ printf ".P\n"
+ new_paragraph=0
+ fi
+ printf "$line\n" | sed -e 's/^ \{4\}//' -e 's/\s\+$//' \
+ -e 's/\s*\(--[[:alnum:]-]\+\|<[[:alnum:]_-]\+>\)\s\+/\n.B \1\n/g' \
+ -e 's/\s*\(--[[:alnum:]-]\+\|<[[:alnum:]_-]\+>\)$/\n.B \1/g'
+ else
+ break
+ fi
+ ;;
+
*) break
;;
diff --git a/cli/man/lmi.1 b/cli/man/lmi.1
index d402bf5..d3b771b 100644
--- a/cli/man/lmi.1
+++ b/cli/man/lmi.1
@@ -1,4 +1,4 @@
-.TH lmi 1 "October 2013" "openlmi-scripts 0.2.2" "User Commands"
+.TH lmi 1 "June 2014" "openlmi-scripts 0.9.1.1" "User Commands"
.SH NAME
lmi \- meta-command for managing systems with OpenLMI providers
@@ -65,6 +65,20 @@ Show this text and quit.
.TP
.I --version
Print version of 'lmi' in use and quit.
+.SH HOSTS HANDLING
+If no
+.B --host
+or
+.B --hosts-file
+are given, the "localhost" will be tried. When
+running under root with Pegasus CIMOM, this results in a connection over
+unix socket (no need to supply credentials).
+.P
+Hosts may contain embedded credentials e.g.:
+ http://user:passwd@hostname:5988
+Avoid supplying them on command line though. Always prefer the
+.B --hosts-file
+option.
.SH CONFIGURATION
There is a system-wide configuration file located at
`/etc/openlmi/lmi.conf` and user configuration file searched at `~/.lmirc`.
9 years, 10 months
[cura-tools] master: doc: fixed typo (6458d34)
by miminar@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
>---------------------------------------------------------------
commit 6458d347a1ed55c8b5e927f04f38e73a84ca5c01
Author: Michal Minar <miminar(a)redhat.com>
Date: Thu Jun 12 12:54:29 2014 +0200
doc: fixed typo
>---------------------------------------------------------------
doc/src/scripts/script-tutorial.rst | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/doc/src/scripts/script-tutorial.rst b/doc/src/scripts/script-tutorial.rst
index 0b59247..3e0490c 100644
--- a/doc/src/scripts/script-tutorial.rst
+++ b/doc/src/scripts/script-tutorial.rst
@@ -266,7 +266,7 @@ Now we can install it and test it:
.. code-block:: sh
# make sure the $WSP is in $PYTHONPATH
- python mylf/stup.py develop --install-dir=$WSP
+ python mylf/setup.py develop --install-dir=$WSP
lmi help
lmi help mylf
9 years, 10 months