Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit fbebbaf4227df40a6d6b502dfe4c8cff3e88b46c
Author: Michal Minar <miminar(a)redhat.com>
Date: Mon Apr 14 13:39:50 2014 +0200
merged changes from openlmi-scripts upstream [1/3] (sources)
Updated lmi meta-command sources.
This includes all the commits from upstream in range:
94d6fc5a0ce34b5a7beb7a1bb6594336a195497c ..
abb4d798871d6df701bf13745bc6a2ba3fd442e9
>---------------------------------------------------------------
Diff suppressed because of size. To see it, use:
git diff --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol ^fbebbaf4227df40a6d6b502dfe4c8cff3e88b46c~1 fbebbaf4227df40a6d6b502dfe4c8cff3e88b46c
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
>---------------------------------------------------------------
commit ac248028affada79ac31e8a0893e00ca830b2006
Author: Peter Hatina <phatina(a)redhat.com>
Date: Wed Apr 16 12:35:56 2014 +0200
backport metacommand to python 2.6
>---------------------------------------------------------------
cli/lmi/scripts/_metacommand/__init__.py | 6 +++---
cli/lmi/scripts/_metacommand/manager.py | 4 ++--
cli/lmi/scripts/common/command/endpoint.py | 2 +-
cli/lmi/scripts/common/session.py | 2 +-
cli/lmi/scripts/common/util.py | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/cli/lmi/scripts/_metacommand/__init__.py b/cli/lmi/scripts/_metacommand/__init__.py
index 46fbe7b..a551a80 100644
--- a/cli/lmi/scripts/_metacommand/__init__.py
+++ b/cli/lmi/scripts/_metacommand/__init__.py
@@ -139,11 +139,11 @@ class MetaCommand(object):
sys.exit(1)
add_hosts(*util.get_hosts_credentials(self._options['--host']))
if self._options['--user']:
- credentials.update({
+ credentials.update(
# credentials in file has precedence over --user option
- h : credentials.get(h, (self._options['--user'], ''))
+ dict((h, credentials.get(h, (self._options['--user'], '')))
for h in hostnames if h not in credentials
- })
+ ))
self._session = Session(self, hostnames, credentials,
same_credentials=self._options['--same-credentials'])
return self._session
diff --git a/cli/lmi/scripts/_metacommand/manager.py b/cli/lmi/scripts/_metacommand/manager.py
index e51293c..f38f141 100644
--- a/cli/lmi/scripts/_metacommand/manager.py
+++ b/cli/lmi/scripts/_metacommand/manager.py
@@ -157,8 +157,8 @@ class CommandManager(object):
entry points -- are preserved.
"""
if keep_custom:
- keep = { n: c for n, c in self._commands.items()
- if isinstance(c, _CustomCommandWrapper)}
+ keep = dict((n, c) for n, c in self._commands.items()
+ if isinstance(c, _CustomCommandWrapper))
else:
keep = {}
self._commands = {}
diff --git a/cli/lmi/scripts/common/command/endpoint.py b/cli/lmi/scripts/common/command/endpoint.py
index 1357eac..b38af50 100644
--- a/cli/lmi/scripts/common/command/endpoint.py
+++ b/cli/lmi/scripts/common/command/endpoint.py
@@ -176,7 +176,7 @@ class LmiEndPointCommand(base.LmiBaseCommand):
argspec = inspect.getargspec(
factory.__init__ if type(factory) is type else factory)
if not argspec.keywords:
- kwargs = {k: v for k, v in opts.items() if k in argspec.args}
+ kwargs = dict((k, v) for k, v in opts.items() if k in argspec.args)
self._formatter = factory(self.app.stdout, **kwargs)
return self._formatter
diff --git a/cli/lmi/scripts/common/session.py b/cli/lmi/scripts/common/session.py
index 46a1034..e977e5a 100644
--- a/cli/lmi/scripts/common/session.py
+++ b/cli/lmi/scripts/common/session.py
@@ -43,7 +43,7 @@ class Session(object):
def __init__(self, app, hosts, credentials=None, same_credentials=False):
self._app = app
- self._connections = {h: None for h in hosts}
+ self._connections = dict((h, None) for h in hosts)
# { hostname : (username, password, verified), ... }
# where verified is a flag saying, whether these credentials
# were successfuly used for logging in
diff --git a/cli/lmi/scripts/common/util.py b/cli/lmi/scripts/common/util.py
index 4ee2161..0101dbe 100644
--- a/cli/lmi/scripts/common/util.py
+++ b/cli/lmi/scripts/common/util.py
@@ -94,8 +94,8 @@ class FilteredDict(dict):
def __lt__(self, other):
if isinstance(other, dict):
- return { k: v for k, v in self._original.items()
- if k in self._keys} < other
+ return dict((k, v) for k, v in self._original.items()
+ if k in self._keys) < other
if not isinstance(other, FilteredDict):
raise TypeError("Can not compare FilteredDict to objects"
" of other types!")
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
>---------------------------------------------------------------
commit c1d97cb4fabad63ddf1bb624bc55022f46f46d9b
Author: Peter Hatina <phatina(a)redhat.com>
Date: Wed Apr 16 09:44:37 2014 +0200
fix broken documentation for lmishell
>---------------------------------------------------------------
cli/lmi/shell/LMIClass.py | 4 ++--
doc/src/shell/classes.rst | 2 ++
doc/src/shell/structure.rst | 10 ----------
3 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/cli/lmi/shell/LMIClass.py b/cli/lmi/shell/LMIClass.py
index 730fddc..ca39740 100644
--- a/cli/lmi/shell/LMIClass.py
+++ b/cli/lmi/shell/LMIClass.py
@@ -268,7 +268,7 @@ class LMIClass(LMIWrapperBaseObject):
"""
:returns: list of strings of the constant names
- **Usage:** :ref:`class_valuemap_properties`.
+ **Usage:** :ref:`class_get_valuemap_properties`.
"""
return self._valuemap_properties_list
@@ -278,7 +278,7 @@ class LMIClass(LMIWrapperBaseObject):
"""
Prints out the list of string of constant names.
- **Usage:** :ref:`class_valuemap_properties`.
+ **Usage:** :ref:`class_get_valuemap_properties`.
"""
for i in self._valuemap_properties_list:
sys.stdout.write("%s\n" % i)
diff --git a/doc/src/shell/classes.rst b/doc/src/shell/classes.rst
index 2098a60..a295a7d 100644
--- a/doc/src/shell/classes.rst
+++ b/doc/src/shell/classes.rst
@@ -172,6 +172,8 @@ code:
...
>
+.. _class_valuemap_properties:
+
**NOTE:** The suffix "**Values**" provides a way, how to access ValueMap
properties.
diff --git a/doc/src/shell/structure.rst b/doc/src/shell/structure.rst
deleted file mode 100644
index 4c9daec..0000000
--- a/doc/src/shell/structure.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-Structure
-=========
-LMIShell is based on a python interpreter and added logic, therefore what you
-can do in pure python, it is possible in LMIShell. There are classes added to
-manipulate with CIM classes, instance names, instances, etc. Additional
-classes are added to fulfill wrapper pattern and expose only those methods,
-which are necessary for the purpose of a shell. Following scheme depicts a
-structure of the LMIShell.
-
-.. image:: ../static/lmi-scheme.png
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit 24ced30aa1c0c8749743069d20f7b94ff3af1307
Author: Peter Hatina <phatina(a)redhat.com>
Date: Mon Apr 14 16:07:55 2014 +0200
drop forgotten parameters in LMINamespace::classes()
>---------------------------------------------------------------
cli/lmi/shell/LMINamespace.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cli/lmi/shell/LMINamespace.py b/cli/lmi/shell/LMINamespace.py
index 7feb514..5b8b83d 100644
--- a/cli/lmi/shell/LMINamespace.py
+++ b/cli/lmi/shell/LMINamespace.py
@@ -70,7 +70,7 @@ class LMINamespace(LMIWrapperBaseObject):
self._name, DeepInheritance=True)
return class_name_list
- def print_classes(self, filter_key="", exact_match=False):
+ def print_classes(self):
"""
Prints out a list of classes.
@@ -80,7 +80,7 @@ class LMINamespace(LMIWrapperBaseObject):
**Usage:** :ref:`namespaces_available_classes`.
"""
- for c in self.classes(filter_key, exact_match):
+ for c in self.classes():
sys.stdout.write("%s\n" % c)
def cql(self, query):