[cura-tools] master: scripts: allow for upload to PyPI (ee58f47)
by miminar@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
>---------------------------------------------------------------
commit ee58f47db15d2a4f757293e8bacf5929f9ecc56d
Author: Michal Minar <miminar(a)redhat.com>
Date: Tue Apr 29 12:53:27 2014 +0200
scripts: allow for upload to PyPI
Added additional README and setup script that allows uploading
of openlmi-scripts (which is deprecated package) to PyPI. This package
needs to be preserved for RHEL 7 releases where openlmi-tools do not
yet ship LMI Meta-command.
Added makefile generating README.txt file.
Added documentation which just points to openlmi-tools.
>---------------------------------------------------------------
cli/Makefile | 12 +++
cli/README-scripts.md | 57 +++++++++++++
cli/doc-scripts/Makefile | 22 +++++
cli/doc-scripts/README | 5 +
.../scripts/mylf/doc => cli/doc-scripts}/conf.py | 88 ++++++--------------
cli/doc-scripts/index.rst | 14 +++
cli/setup-scripts.py | 69 +++++++++++++++
7 files changed, 206 insertions(+), 61 deletions(-)
diff --git a/cli/Makefile b/cli/Makefile
new file mode 100644
index 0000000..f9b6e54
--- /dev/null
+++ b/cli/Makefile
@@ -0,0 +1,12 @@
+SOURCE ?= README.md
+TARGET ?= README.txt
+
+.PHONY: readme
+
+readme:
+ pandoc --from=markdown --to=rst -o $(TARGET) $(SOURCE)
+
+clean:
+ -rm $(TARGET)
+
+# ex: ft=make noet sw=8 ts=8
diff --git a/cli/README-scripts.md b/cli/README-scripts.md
new file mode 100644
index 0000000..6083fd7
--- /dev/null
+++ b/cli/README-scripts.md
@@ -0,0 +1,57 @@
+openlmi-scripts
+===============
+Client-side python libraries and *LMI Meta-command* for system management
+through OpenLMI providers.
+
+It serves as a base for small python eggs targeted on one or more OpenLMI
+providers. We call these eggs scripts. They are installed separately although
+they can depend on each other.
+
+They contain python library itself as well as command line interface. This
+interface is registered with *LMI Meta-command* which is a part of OpenLMI
+Tools. *LMI Meta-command* loads it and offers to interface with broker through
+command line.
+
+For more information please refer to online documentation on [pythonhosted][].
+
+Take a look at [scripts upstream repository][git] for inspiration on how to
+write your own scripts.
+
+### Deprecation warning
+
+`openlmi-scripts` is deprecated egg. It contains just *LMI Meta-command* which
+has been moved to `openlmi-tools` (version `0.9.1`). Newer scripts (`openlmi-scripts-*`)
+now depend just on `openlmi-tools`. Use this package only with older *tools*.
+
+Dependencies
+------------
+Code base is written for `python 2.7`.
+There are following python dependencies:
+
+ * openlmi-tools >= 0.9 and < 0.9.1 ([PyPI][tools-PyPI])
+ * python-docopt
+ * pandoc
+
+Installation
+------------
+Use standard `setuptools` script for installation:
+
+ $ cd openlmi-scripts/commands/$CMD
+ $ make setup
+ $ python setup.py install --user
+
+This installs particular client library and command line interface for
+*LMI Meta-command*.
+
+Script eggs are also available on *PyPI*, install them with:
+
+ $ # add any provider you want to interact with
+ $ pip install --user openlmi-scripts-service openlmi-scripts-software
+
+Check out [this][PyPI] site listing all available script eggs.
+
+------------------------------------------------------------------------------
+[git]: https://github.com/openlmi/openlmi-scripts "openlmi-scripts"
+[pythonhosted]: http://pythonhosted.org/openlmi-tools/index.html "Python Hosted"
+[tools-PyPI]: https://pypi.python.org/pypi/openlmi-tools "Tools on PyPI"
+[PyPI]: https://pypi.python.org/pypi?%3Aaction=search&term=openlmi-scripts&submit... "Scripts on PyPI"
diff --git a/cli/doc-scripts/Makefile b/cli/doc-scripts/Makefile
new file mode 100644
index 0000000..d59d0f9
--- /dev/null
+++ b/cli/doc-scripts/Makefile
@@ -0,0 +1,22 @@
+SPHINXOPTS =
+SPHINXBUILD ?= sphinx-build
+PAPER =
+BUILDDIR = _build
+SRCDIR = ..
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+PROJECTNAME := OpenLMIScripts
+
+.PHONY: clean deps
+
+html:
+ ${SPHINXBUILD} -b $@ $(ALLSPHINXOPTS) $(BUILDDIR)/$@
+ @echo "$@ build finished. Output is in $(BUILDDIR)/$@."
+
+clean:
+ rm -r _build
diff --git a/cli/doc-scripts/README b/cli/doc-scripts/README
new file mode 100644
index 0000000..be4da77
--- /dev/null
+++ b/cli/doc-scripts/README
@@ -0,0 +1,5 @@
+This documentation is for deprecated openlmi-scripts package which is hosted on
+PyPI. It just points to user to follow documentation on openlmi-tools.
+
+Upload it from parent directory with (after a build):
+ python setup-scripts.py upload_docs --upload-dir=doc-scripts/_build/html
diff --git a/doc/src/scripts/mylf/doc/conf.py b/cli/doc-scripts/conf.py
similarity index 77%
copy from doc/src/scripts/mylf/doc/conf.py
copy to cli/doc-scripts/conf.py
index 91e943c..67e679a 100644
--- a/doc/src/scripts/mylf/doc/conf.py
+++ b/cli/doc-scripts/conf.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
-# OpenLMI MyLF scripts documentation build configuration file, created by
-# sphinx-quickstart on Wed Oct 2 08:58:25 2013.
+# OpenLMI Scripts documentation build configuration file, created by
+# sphinx-quickstart on Thu Aug 8 15:36:58 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
@@ -16,7 +16,7 @@ import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(0, os.path.abspath('../lmi'))
# -- General configuration -----------------------------------------------------
@@ -25,7 +25,7 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode']
+extensions = []
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -40,17 +40,17 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-project = u'OpenLMI MyLF scripts'
-copyright = u'2013-2014, Red Hat, Inc.'
+project = u'OpenLMI Scripts'
+copyright = u'2014, Red Hat, Inc.'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '0.0.1'
+version = "0.2.8"
# The full version, including alpha/beta/rc tags.
-release = '0.0.1'
+release = "0.2.8"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -91,7 +91,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+html_theme = "openlmitheme"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -128,7 +128,7 @@ html_static_path = ['_static']
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
-#html_use_smartypants = True
+html_use_smartypants = False
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
@@ -164,7 +164,7 @@ html_static_path = ['_static']
#html_file_suffix = None
# Output file base name for HTML help builder.
-htmlhelp_basename = 'OpenLMIMyLFscriptsdoc'
+htmlhelp_basename = 'OpenLMIScriptsdoc'
# -- Options for LaTeX output --------------------------------------------------
@@ -183,8 +183,11 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'OpenLMIMyLFscripts.tex', u'OpenLMI MyLF scripts Documentation',
- u'Michal', 'manual'),
+ ( 'index'
+ , 'OpenLMIScripts.tex'
+ , u'OpenLMI Scripts Documentation'
+ , u'Red Hat, Inc.'
+ , 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -213,8 +216,11 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('index', 'openlmimylfscripts', u'OpenLMI MyLF scripts Documentation',
- [u'Michal'], 1)
+ ( 'index'
+ , 'openlmiscripts'
+ , u'OpenLMI Scripts Documentation'
+ , [u'Red Hat, Inc.']
+ , 1)
]
# If true, show URL addresses after external links.
@@ -227,9 +233,12 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'OpenLMIMyLFscripts', u'OpenLMI MyLF scripts Documentation',
- u'Michal', 'OpenLMIMyLFscripts', 'One line description of project.',
- 'Miscellaneous'),
+ ( 'index', 'OpenLMIScripts'
+ , u'OpenLMI Scripts Documentation'
+ , u'Red Hat, Inc.'
+ , 'OpenLMIScripts'
+ , 'One line description of project.'
+ , 'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
@@ -240,46 +249,3 @@ texinfo_documents = [
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
-
-
-# -- Options for Epub output ---------------------------------------------------
-
-# Bibliographic Dublin Core info.
-epub_title = u'OpenLMI MyLF scripts'
-epub_author = u'Michal'
-epub_publisher = u'Michal'
-epub_copyright = u'2013-2014, Red Hat, Inc.'
-
-# The language of the text. It defaults to the language option
-# or en if the language is not set.
-#epub_language = ''
-
-# The scheme of the identifier. Typical schemes are ISBN or URL.
-#epub_scheme = ''
-
-# The unique identifier of the text. This can be a ISBN number
-# or the project homepage.
-#epub_identifier = ''
-
-# A unique identification for the text.
-#epub_uid = ''
-
-# A tuple containing the cover image and cover page html template filenames.
-#epub_cover = ()
-
-# HTML files that should be inserted before the pages created by sphinx.
-# The format is a list of tuples containing the path and title.
-#epub_pre_files = []
-
-# HTML files shat should be inserted after the pages created by sphinx.
-# The format is a list of tuples containing the path and title.
-#epub_post_files = []
-
-# A list of files that should not be packed into the epub file.
-#epub_exclude_files = []
-
-# The depth of the table of contents in toc.ncx.
-#epub_tocdepth = 3
-
-# Allow duplicate toc entries.
-#epub_tocdup = True
diff --git a/cli/doc-scripts/index.rst b/cli/doc-scripts/index.rst
new file mode 100644
index 0000000..3ded209
--- /dev/null
+++ b/cli/doc-scripts/index.rst
@@ -0,0 +1,14 @@
+OpenLMI Scripts documentation
+=============================
+
+OpenLMI Scripts comprises of *LMI Meta-command* and a collection of small
+python libraries with command-line wrappers.
+
+.. warning::
+ *LMI Meta-command* has been moved into *OpenLMI Tools*, where it logically
+ belongs, in version 0.2.8. Feature releases of `openlmi-scripts` package on
+ RHEL will lack this application as well. This package will be just a
+ collection of scripts.
+
+Continue to a documentation of mine successor at http://pythonhosted.org/openlmi-tools/
+
diff --git a/cli/setup-scripts.py b/cli/setup-scripts.py
new file mode 100644
index 0000000..9de046b
--- /dev/null
+++ b/cli/setup-scripts.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+
+# openlmi-scripts is deprecated egg. It shall be used just on distros with
+# older openlmi-tools (older than 0.9.1) without LMI Meta-command.
+
+import os
+import subprocess
+import sys
+from setuptools import setup, find_packages
+
+long_description = ''
+try:
+ try:
+ script_dir = os.path.dirname(sys.argv[0])
+ cmd = ['/usr/bin/make', 'readme', 'SOURCE=README-scripts.md']
+ readme_file = 'README.txt'
+ if script_dir not in (',', ''):
+ cmd[1:1] = ['-C', script_dir]
+ readme_file = os.path.join(script_dir, readme_file)
+ with open('/dev/null', 'w') as null:
+ ret = subprocess.call(cmd, stdout=null, stderr=null)
+ if not ret:
+ long_description = open(readme_file, 'rt').read()
+ except Exception as err:
+ sys.stderr.write('ERROR while reading README.txt: %s\n' % str(err))
+ if not long_description:
+ long_description = open('README-scripts.md', 'rt').read()
+except IOError:
+ pass
+
+setup(
+ name='openlmi-scripts',
+ version='0.2.8',
+ description='Client-side library and command-line client',
+ long_description=long_description,
+ author='Michal Minar',
+ author_email='miminar(a)redhat.com',
+ url="http://fedorahosted.org/openlmi/",
+ platforms=['Any'],
+ license="GPLv2+",
+ classifiers=[
+ 'License :: OSI Approved :: GPLv2+ License',
+ 'Operating System :: POSIX :: Linux',
+ 'Topic :: System :: Systems Administration',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
+ 'Intended Audience :: Developers',
+ 'Environment :: Console',
+ ],
+
+ namespace_packages=['lmi', 'lmi.scripts'],
+ packages=[
+ 'lmi',
+ 'lmi.scripts',
+ 'lmi.scripts.common',
+ 'lmi.scripts.common.command',
+ 'lmi.scripts.common.formatter',
+ 'lmi.scripts._metacommand'],
+ install_requires=['openlmi-tools >= 0.9, < 0.9.1', 'docopt >= 0.6'],
+ include_package_data=True,
+ zip_safe=False,
+ entry_points={
+ 'console_scripts': [
+ 'lmi = lmi.scripts._metacommand:main'
+ ],
+ 'lmi.scripts.cmd': [],
+ },
+ )
9 years, 11 months
[cura-tools] master: setup: fix license classifier (1d36e72)
by miminar@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
>---------------------------------------------------------------
commit 1d36e72d07d337d51ad5e0a69ff0f3fc4c31386a
Author: Michal Minar <miminar(a)redhat.com>
Date: Tue Apr 29 15:45:30 2014 +0200
setup: fix license classifier
>---------------------------------------------------------------
cli/setup.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cli/setup.py b/cli/setup.py
index c198764..306581e 100644
--- a/cli/setup.py
+++ b/cli/setup.py
@@ -49,7 +49,7 @@ setup(
author="Peter Hatina, Michal Minar",
author_email="phatina(a)redhat.com, miminar(a)redhat.com",
classifiers=[
- "License :: OSI Approved :: BSD License",
+ "License :: OSI Approved :: GPLv2+ License",
"Operating System :: POSIX :: Linux",
"Topic :: System :: Systems Administration",
"Programming Language :: Python",
9 years, 11 months
[cura-tools] master: fix missing fetch(True) when using ValueMap parameters (d262f38)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
>---------------------------------------------------------------
commit d262f383b96f5465cc6c7058b6e939bbc328163b
Author: Peter Hatina <phatina(a)redhat.com>
Date: Fri Apr 25 14:39:36 2014 +0200
fix missing fetch(True) when using ValueMap parameters
>---------------------------------------------------------------
cli/lmi/shell/LMIMethod.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/cli/lmi/shell/LMIMethod.py b/cli/lmi/shell/LMIMethod.py
index 4bb6b3e..dc1e8d1 100644
--- a/cli/lmi/shell/LMIMethod.py
+++ b/cli/lmi/shell/LMIMethod.py
@@ -175,7 +175,10 @@ class LMIMethod(LMIWrapperBaseObject):
# Store the synchronous flag and trim the method name
self._sync_method = True
method = method[4:]
- self._method = lmi_instance._lmi_class._cim_class.methods[method]
+
+ # We need to have CIMClass with qualifiers. Fetch full class.
+ 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() \
if "ValueMap" in v.qualifiers]
9 years, 11 months
[cura-tools] master: reorder attribute retrieval in LMIInstance (b09efa0)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
>---------------------------------------------------------------
commit b09efa0bd3655f4a0fd7bfbd48da6e6774e6e708
Author: Peter Hatina <phatina(a)redhat.com>
Date: Thu Apr 24 11:15:17 2014 +0200
reorder attribute retrieval in LMIInstance
>---------------------------------------------------------------
cli/lmi/shell/LMIInstance.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/cli/lmi/shell/LMIInstance.py b/cli/lmi/shell/LMIInstance.py
index 96f1940..acc5dab 100644
--- a/cli/lmi/shell/LMIInstance.py
+++ b/cli/lmi/shell/LMIInstance.py
@@ -98,14 +98,13 @@ class LMIInstance(LMIWrapperBaseObject):
"""
if name in self.__dict__:
return self.__dict__[name]
- methods = self.methods()
- if methods and name in methods:
- return lmi_wrap_cim_method(self._conn, name, self)
- elif name in self._cim_instance:
+ if name in self._cim_instance:
member = self._cim_instance[name]
if isinstance(member, pywbem.CIMInstanceName):
member = lmi_wrap_cim_instance_name(self._conn, member)
return member
+ elif name in self.methods():
+ return lmi_wrap_cim_method(self._conn, name, self)
raise AttributeError(name)
@lmi_possibly_deleted(None)
9 years, 11 months
[cura-tools] master: fix EnumerateClassNames in LMIClass::methods() (de0bf3d)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
>---------------------------------------------------------------
commit de0bf3d49a6153a0b1d2fd03519928523f302201
Author: Peter Hatina <phatina(a)redhat.com>
Date: Thu Apr 24 11:05:16 2014 +0200
fix EnumerateClassNames in LMIClass::methods()
EnumerateClassNames() with DeepInheritance=True.
Conflicts:
cli/lmi/shell/LMIClass.py
>---------------------------------------------------------------
cli/lmi/shell/LMIClass.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cli/lmi/shell/LMIClass.py b/cli/lmi/shell/LMIClass.py
index ab998df..c596624 100644
--- a/cli/lmi/shell/LMIClass.py
+++ b/cli/lmi/shell/LMIClass.py
@@ -343,7 +343,8 @@ class LMIClass(LMIWrapperBaseObject):
**Usage:** See :ref:`class_methods`.
**Note:** When caching is turned off, this method may consume some time.
"""
- (class_names, _, _) = self._conn._client._get_class_names(self.namespace)
+ (class_names, _, _) = self._conn._client._get_class_names(
+ self.namespace, DeepInheritance=True)
methods_lst = self._cim_class.methods.keys()
# Iterate through a list of all CIM methods and append any method which
# can be called in the synchronous way. One type of such method is the
9 years, 11 months
[cura-tools] openlmi-tools-lmiwbem: reorder attribute retrieval in LMIInstance (7201f4b)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit 7201f4b2fd24fe7e248653d5c683d9c748dd001b
Author: Peter Hatina <phatina(a)redhat.com>
Date: Thu Apr 24 11:09:00 2014 +0200
reorder attribute retrieval in LMIInstance
>---------------------------------------------------------------
cli/lmi/shell/LMIInstance.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/cli/lmi/shell/LMIInstance.py b/cli/lmi/shell/LMIInstance.py
index 92e5953..f3f4c9d 100644
--- a/cli/lmi/shell/LMIInstance.py
+++ b/cli/lmi/shell/LMIInstance.py
@@ -95,14 +95,13 @@ class LMIInstance(LMIWrapperBaseObject):
object property
:raises: :py:exc:`.LMIDeletedObjectError`
"""
- methods = self.methods()
- if methods and name in methods:
- return lmi_wrap_cim_method(self._conn, name, self)
- elif name in self._cim_instance:
+ if name in self._cim_instance:
member = self._cim_instance[name]
if isinstance(member, lmiwbem.CIMInstanceName):
member = lmi_transform_to_lmi(self._conn, member)
return member
+ elif name in self.methods():
+ return lmi_wrap_cim_method(self._conn, name, self)
raise AttributeError(name)
@lmi_possibly_deleted(None)
9 years, 11 months
[cura-tools] openlmi-tools-lmiwbem: fix EnumerateClassNames in LMIClass::methods() (a534826)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit a53482642259f8636d51dd2b404e984136013bc8
Author: Peter Hatina <phatina(a)redhat.com>
Date: Thu Apr 24 11:05:16 2014 +0200
fix EnumerateClassNames in LMIClass::methods()
EnumerateClassNames() with DeepInheritance=True.
>---------------------------------------------------------------
cli/lmi/shell/LMIClass.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cli/lmi/shell/LMIClass.py b/cli/lmi/shell/LMIClass.py
index 698320f..7408957 100644
--- a/cli/lmi/shell/LMIClass.py
+++ b/cli/lmi/shell/LMIClass.py
@@ -337,7 +337,8 @@ class LMIClass(LMIWrapperBaseObject):
**Usage:** See :ref:`class_methods`.
**Note:** When caching is turned off, this method may consume some time.
"""
- class_names, _, _ = self._conn._client._get_class_names(self.namespace)
+ class_names, _, _ = self._conn._client._get_class_names(
+ self.namespace, DeepInheritance=True)
methods_lst = self._cim_class.methods.keys()
# Iterate through a list of all CIM methods and append any method which
# can be called in the synchronous way. One type of such method is the
9 years, 11 months
[cura-tools] openlmi-tools-lmiwbem: prefer opened connection (5a3b37c)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit 5a3b37c80519f6d3c875f9dd51acde93dcb7e692
Author: Peter Hatina <phatina(a)redhat.com>
Date: Thu Apr 24 11:00:38 2014 +0200
prefer opened connection
>---------------------------------------------------------------
cli/lmi/shell/LMIConnection.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/cli/lmi/shell/LMIConnection.py b/cli/lmi/shell/LMIConnection.py
index 2c75623..b126a70 100644
--- a/cli/lmi/shell/LMIConnection.py
+++ b/cli/lmi/shell/LMIConnection.py
@@ -325,6 +325,7 @@ class LMIConnection(object):
"""
errorstr = ""
try:
+ self._client.connect()
use_exceptions = lmi_get_use_exceptions()
lmi_set_use_exceptions(True)
try:
9 years, 11 months
[cura-tools] openlmi-tools-lmiwbem: fix html links in documentation (13d0890)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit 13d0890825feb54f5fb5791f39b737cc4b7d4b68
Author: Peter Hatina <phatina(a)redhat.com>
Date: Wed Apr 23 15:42:06 2014 +0200
fix html links in documentation
>---------------------------------------------------------------
cli/lmi/shell/LMIBaseClient.py | 56 +++++++++++++++++++-------------------
cli/lmi/shell/LMIBaseObject.py | 10 +++---
cli/lmi/shell/LMIClass.py | 26 +++++++++---------
cli/lmi/shell/LMIConnection.py | 10 +++---
cli/lmi/shell/LMIInstanceName.py | 38 +++++++++++++-------------
cli/lmi/shell/LMIJob.py | 12 ++++----
cli/lmi/shell/LMIMethod.py | 14 +++++-----
cli/lmi/shell/LMINamespace.py | 26 +++++++++---------
cli/lmi/shell/LMIShellClient.py | 18 ++++++------
cli/lmi/shell/LMISubscription.py | 2 +-
cli/lmi/shell/LMIUtil.py | 42 ++++++++++++++--------------
11 files changed, 127 insertions(+), 127 deletions(-)
diff --git a/cli/lmi/shell/LMIBaseClient.py b/cli/lmi/shell/LMIBaseClient.py
index da9884f..fa967c0 100644
--- a/cli/lmi/shell/LMIBaseClient.py
+++ b/cli/lmi/shell/LMIBaseClient.py
@@ -28,17 +28,17 @@ from LMIExceptions import LMIFilterError
class LMIBaseClient(object):
"""
Base client class for CIMOM communication. It abstracts the :py:mod:`lmiwbem` dependent
- calls to :py:class:`LMIBaseClient` API.
+ calls to :py:class:`.LMIBaseClient` API.
:param string uri: URI of the CIMOM
:param string username: account, under which, the CIM calls will be performed
:param string password: user's password
:param conn_type: type of connection; can be of 2 values:
- * :py:attr:`LMIBaseClient.CONN_TYPE_WBEM` -- WBEM connection
- * :py:attr:`LMIBaseClient.CONN_TYPE_PEGASUS_UDS` -- applicable only for
+ * :py:attr:`.LMIBaseClient.CONN_TYPE_WBEM` -- WBEM connection
+ * :py:attr:`.LMIBaseClient.CONN_TYPE_PEGASUS_UDS` -- applicable only for
Tog-Pegasus CIMOM, it uses Unix socket for the connection; default value is
- :py:attr:`LMIbaseClient.CONN_TYPE_WBEM`
+ :py:attr:`.LMIbaseClient.CONN_TYPE_WBEM`
:param string key_file: path to x509 key file; default value is None
:param string cert_file: path to x509 cert file; default value is None
@@ -102,7 +102,7 @@ class LMIBaseClient(object):
* **Key** or **key** (*string*) -- filtering key, see above
* **Value** or **value** (*string*) -- filtering value, see above
- :returns: :py:class:`LMIReturnValue` object with ``rval`` contains a list of
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` contains a list of
:py:class:`CIMInstanceName` objects, if no error occurs; otherwise ``rval`` is
set to None and ``errorstr`` contains appropriate error string
:raises: :py:exc:`.LMIFilterError`, :py:exc:`CIMError`, :py:exc:`ConnectionError`
@@ -154,8 +154,8 @@ class LMIBaseClient(object):
* :py:class:`CIMInstanceName`
* :py:class:`CIMInstance`
- * :py:class:`LMIInstanceName`
- * :py:class:`LMIInstance`
+ * :py:class:`.LMIInstanceName`
+ * :py:class:`.LMIInstance`
:param bool LocalOnly: indicates if to include the only elements (properties,
@@ -174,7 +174,7 @@ class LMIBaseClient(object):
are included in the response. If the PropertyList input parameter is None, no
additional filtering is defined.
- :returns: :py:class:`LMIReturnValue` object, where ``rval`` is set to
+ :returns: :py:class:`.LMIReturnValue` object, where ``rval`` is set to
:pyclass:`CIMInstance` object, if no error occurs; otherwise ``errorstr`` is set
to corresponding error string
:raises: :py:exc:`CIMError`, :py:exc:`ConnectionError`, :py:exc:`TypeError`
@@ -205,7 +205,7 @@ class LMIBaseClient(object):
* **Key** or **key** (*string*) -- filtering key, see above
* **Value** or **value** (*string*) -- filtering value, see above
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to a list of
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to a list of
:py:class:`CIMIntance` objects, if no error occurs; otherwise
``rval`` is set to None and ``errorstr`` is set to corresponding
error string.
@@ -286,7 +286,7 @@ class LMIBaseClient(object):
: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.
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to a list of strings
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to a list of strings
containing class names, if no error occurs; otherwise ``rval`` is set to None
and ``errorstr`` contains an appropriate error string
:raises: :py:exc:`CIMError`, :py:exc:`ConnectionError`
@@ -320,7 +320,7 @@ class LMIBaseClient(object):
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
+ :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`
@@ -358,7 +358,7 @@ class LMIBaseClient(object):
response. If the PropertyList input parameter is an empty list, no properties
are included in the response. If the PropertyList input parameter is None, no
additional filtering is defined. Default value is None.
- :returns: :py:class:`LMIReturnValue` object with rval set to
+ :returns: :py:class:`.LMIReturnValue` object with rval set to
:py:class:`CIMClass`, if no error occurs; otherwise rval is set to
none and errorstr to appropriate error string
:raises: :py:exc:`CIMError`, :py:exc:`ConnectionError`
@@ -394,12 +394,12 @@ class LMIBaseClient(object):
* :py:class:`CIMInstance`
* :py:class:`CIMInstanceName`
- * :py:class:`LMIInstance`
- * :py:class:`LMIInstanceName`
+ * :py:class:`.LMIInstance`
+ * :py:class:`.LMIInstanceName`
:param string method: string containing a method name
:param dictionary params: parameters passed to the method call
- :returns: :py:class:`LMIReturnValue` object with rval set to return value of the
+ :returns: :py:class:`.LMIReturnValue` object with rval set to return value of the
method call, rparams set to returned parameters from the method call, if no
error occurs; otherwise rval is set to -1 and errorstr to appropriate error
string
@@ -424,8 +424,8 @@ class LMIBaseClient(object):
* :py:class:`CIMInstance`
* :py:class:`CIMInstanceName`
- * :py:class:`LMIInstance`
- * :py:class:`LMIInstanceName`
+ * :py:class:`.LMIInstance`
+ * :py:class:`.LMIInstanceName`
:param string AssocClass: valid CIM association class name. It acts as a filter on
the returned set of names by mandating that each returned name identify an
@@ -469,8 +469,8 @@ class LMIBaseClient(object):
* :py:class:`CIMInstance`
* :py:class:`CIMInstanceName`
- * :py:class:`LMIInstance`
- * :py:class:`LMIInstanceName`
+ * :py:class:`.LMIInstance`
+ * :py:class:`.LMIInstanceName`
:param string AssocClass: valid CIM association class name. It acts as a filter on
the returned set of objects by mandating that each returned object shall be
@@ -524,8 +524,8 @@ class LMIBaseClient(object):
* :py:class:`CIMInstance`
* :py:class:`CIMInstanceName`
- * :py:class:`LMIInstance`
- * :py:class:`LMIInstanceName`
+ * :py:class:`.LMIInstance`
+ * :py:class:`.LMIInstanceName`
:param string ResultClass: valid CIM class name. It acts as a filter on the
returned set of object names by mandating that each returned Object Name identify
@@ -556,8 +556,8 @@ class LMIBaseClient(object):
* :py:class:`CIMInstance`
* :py:class:`CIMInstanceName`
- * :py:class:`LMIInstance`
- * :py:class:`LMIInstanceName`
+ * :py:class:`.LMIInstance`
+ * :py:class:`.LMIInstanceName`
:param string ResultClass: valid CIM class name. It acts as a filter on the
returned set of objects by mandating that each returned object shall be an
@@ -634,7 +634,7 @@ class LMIBaseClient(object):
If the PropertyList is None, the set of properties to be modified consists of
those of *ModifiedInstance* with values different from the current values in
the instance to be modified. Default value is None.
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to 0, if no error
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to 0, if no error
occurs; otherwise ``rval`` is set to -1 and ``errorstr`` is set to corresponding
error string.
:raises: :py:exc:`CIMError`, :py:exc:`ConnectionError`
@@ -654,10 +654,10 @@ class LMIBaseClient(object):
* :py:class:`CIMInstance`
* :py:class:`CIMInstanceName`
- * :py:class:`LMIInstance`
- * :py:class:`LMIInstanceName`
+ * :py:class:`.LMIInstance`
+ * :py:class:`.LMIInstanceName`
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to 0, if no error
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to 0, if no error
occurs; otherwise ``rval`` is set to -1 and ``errorstr`` is set to
corresponding error string
:raises: :py:exc:`CIMError`, :py:exc:`ConnectionError`, :py:exc:`TypeError`
@@ -675,7 +675,7 @@ class LMIBaseClient(object):
:param string query_lang: query language
:param string query: query to execute
:param string namespace: target namespace for the query
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to list of
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to list of
:py:class:`CIMInstance` objects, if no error occurs; otherwise ``rval`` is set
to empty list and ``errorstr`` is set to corresponding error string
:raises: :py:exc:`CIMError`, :py:exc:`ConnectionError`
diff --git a/cli/lmi/shell/LMIBaseObject.py b/cli/lmi/shell/LMIBaseObject.py
index 565c89c..aec22ee 100644
--- a/cli/lmi/shell/LMIBaseObject.py
+++ b/cli/lmi/shell/LMIBaseObject.py
@@ -18,9 +18,9 @@
class LMIWrapperBaseObject(object):
"""
- Base class for all LMI wrapper classes, such as :py:class:`LMINamespace`,
- :py:class:`LMIClass`, :py:class:`LMIInstanceName`, :py:class:`LMIInstance`,
- :py:class:`LMIMethod`.
+ Base class for all LMI wrapper classes, such as :py:class:`.LMINamespace`,
+ :py:class:`.LMIClass`, :py:class:`.LMIInstanceName`, :py:class:`.LMIInstance`,
+ :py:class:`.LMIMethod`.
:param LMIConnection conn: connection object
"""
@@ -31,9 +31,9 @@ class LMIWrapperBaseObject(object):
@property
def connection(self):
"""
- Property returning :class:`LMIConnection` object.
+ Property returning :class:`.LMIConnection` object.
:returns: connection object
- :rtype: :py:class:`LMIConnection`
+ :rtype: :py:class:`.LMIConnection`
"""
return self._conn
diff --git a/cli/lmi/shell/LMIClass.py b/cli/lmi/shell/LMIClass.py
index 0c440c1..698320f 100644
--- a/cli/lmi/shell/LMIClass.py
+++ b/cli/lmi/shell/LMIClass.py
@@ -65,7 +65,7 @@ class LMIClass(LMIWrapperBaseObject):
:samp:`object.constant_value`.
:param string name: object member or constant values member
- :returns: class member of :py:class:`LMIConstantValuesParamProp` object
+ :returns: class member of :py:class:`.LMIConstantValuesParamProp` object
"""
if name.endswith("Values"):
if not self.is_fetched(True):
@@ -79,12 +79,12 @@ class LMIClass(LMIWrapperBaseObject):
def create_instance(self, properties=None, qualifiers=None, property_list=None):
"""
Creates a new :py:class:`CIMInstance` at the server side and returns
- :py:class:`LMIReturnValue` object containing :py:class:`LMIInstance` as a result.
+ :py:class:`.LMIReturnValue` object containing :py:class:`.LMIInstance` as a result.
:param dictionary properties: initial properties with corresponding values
:param dictionary qualifiers: initial qualifiers
:param list property_list: list of properties, which should be present in
- :py:class:`LMIInstance` object
+ :py:class:`.LMIInstance` object
**Usage:** See :ref:`class_create_instance`.
"""
@@ -176,8 +176,8 @@ class LMIClass(LMIWrapperBaseObject):
* **Key** or **key** (*string*) -- filtering key, see above
* **Value** or **value** -- filtering value, see above
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to a list of
- :py:class:`LMIInstanceName` objects
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to a list of
+ :py:class:`.LMIInstanceName` objects
**Usage:** See :ref:`class_get_instance_names` and :ref:`class_instance_filtering`.
"""
@@ -189,12 +189,12 @@ class LMIClass(LMIWrapperBaseObject):
def new_instance_name(self, keybindings):
"""
- Create new :py:class:`LMIInstanceName` object by passing all the
+ Create new :py:class:`.LMIInstanceName` object by passing all the
keys/values of the object.
:param dictionary keybindings: primary keys of instance name with corresponding
values
- :returns: new :py:class:`LMIInstanceName` object
+ :returns: new :py:class:`.LMIInstanceName` object
**Usage:** See :ref:`class_new_instance_name`.
"""
@@ -214,7 +214,7 @@ class LMIClass(LMIWrapperBaseObject):
# NOTE: inst_filter is either None or dict
def first_instance_name(self, inst_filter=None, **kwargs):
"""
- Returns the first :py:class:`LMIInstanceName` of the corresponding
+ Returns the first :py:class:`.LMIInstanceName` of the corresponding
class.
:param dictionary inst_filter: filter values, where the key corresponds to the
@@ -225,7 +225,7 @@ class LMIClass(LMIWrapperBaseObject):
* **Key** or **key** (*string*) -- filtering key, see above
* **Value** or **value** -- filtering value, see above
- :returns: first :py:class:`LMIInstanceName` object
+ :returns: first :py:class:`.LMIInstanceName` object
**Usage:** See :ref:`class_get_instance_names` and :ref:`class_instance_filtering`.
"""
@@ -239,7 +239,7 @@ class LMIClass(LMIWrapperBaseObject):
@lmi_return_val_if_fail(lambda obj: obj._namespace, [])
def instances(self, inst_filter=None, **kwargs):
"""
- Returns a list of objects of :py:class:`LMIInstance`.
+ Returns a list of objects of :py:class:`.LMIInstance`.
:param dictionary inst_filter: filter values, where the key corresponds to the key
of :py:class:`CIMInstance`; value contains the filtering value
@@ -248,7 +248,7 @@ class LMIClass(LMIWrapperBaseObject):
* **Key** or **key** (*string*) -- filtering key, see above
* **Value** or **value** -- filtering value, see above
- :returns: list of :py:class:`LMIInstance` objects
+ :returns: list of :py:class:`.LMIInstance` objects
**Usage:** See :ref:`class_get_instances` and :ref:`class_instance_filtering`.
"""
@@ -262,7 +262,7 @@ class LMIClass(LMIWrapperBaseObject):
# NOTE: inst_filter is either None or dict
def first_instance(self, inst_filter=None, **kwargs):
"""
- Returns the first :py:class:`LMIInstance` of the corresponding class.
+ Returns the first :py:class:`.LMIInstance` of the corresponding class.
:param dictionary inst_filter: filter values, where the key corresponds to the key
of :py:class:`CIMInstance`; value contains the filtering value.
@@ -271,7 +271,7 @@ class LMIClass(LMIWrapperBaseObject):
* **Key** or **key** -- filtering key, see above
* **Value** or **value** -- filtering value, see above
- :returns: first :py:class:`LMIInstance` object
+ :returns: first :py:class:`.LMIInstance` object
**Usage:** See :ref:`class_get_instances` and :ref:`class_instance_filtering`.
"""
diff --git a/cli/lmi/shell/LMIConnection.py b/cli/lmi/shell/LMIConnection.py
index 275f63e..2c75623 100644
--- a/cli/lmi/shell/LMIConnection.py
+++ b/cli/lmi/shell/LMIConnection.py
@@ -122,7 +122,7 @@ def connect(uri, username="", password="", interactive=False, use_cache=True,
asked for credentials. Default value is empty string.
:returns: :py:class:`LMIConnection` object or None, if LMIShell does not use
exceptions
- :raises: :py:exc:`ConnectionError`
+ :raises: :py:exc:`.ConnectionError`
**NOTE:** If interactive is set to True, LMIShell will:
@@ -313,9 +313,9 @@ class LMIConnection(object):
"""
Connects to CIMOM and verifies credentials by performing a "dummy"
:func:`GetClass` call on "SomeNonExistingClass". Provided credentials
- are OK, if the LMIShell obtains :py:exc:`CIMError` exception with the
+ are OK, if the LMIShell obtains :py:exc:`.CIMError` exception with the
flag ``CIM_ERR_NOT_FOUND`` set. Otherwise, we should receive
- :py:exc:`ConnectionError`.
+ :py:exc:`.ConnectionError`.
:returns: :py:class:`LMIReturnValue` object with rval set to True, if
the user was properly authenticated; False otherwise. In case of any
@@ -360,9 +360,9 @@ class LMIConnection(object):
:param dictionary kwargs: parameters for the indication subscription
* **Filter** (*LMIInstance*) -- if provided, the
- :py:class:`LMIInstance` object will be used instead of creating a new one;
+ :py:class:`.LMIInstance` object will be used instead of creating a new one;
**optional**
- * **Handler** (*LMIInstance*) -- if provided, the :py:class:`LMIInstance`
+ * **Handler** (*LMIInstance*) -- if provided, the :py:class:`.LMIInstance`
object will be used instead of creating a new one; **optional**
* **Query** (*string*) -- string containing a query for the indications filtering
* **QueryLanguage** (*string*) -- query language; eg. *WQL*, or *DMTF:CQL*.
diff --git a/cli/lmi/shell/LMIInstanceName.py b/cli/lmi/shell/LMIInstanceName.py
index ec6d240..f7e8d07 100644
--- a/cli/lmi/shell/LMIInstanceName.py
+++ b/cli/lmi/shell/LMIInstanceName.py
@@ -36,7 +36,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
def __cmp__(self, other):
"""
- :param LMIInstanceName other: :py:class:`LMIInstanceName` object to compare
+ :param LMIInstanceName other: :py:class:`.LMIInstanceName` object to compare
:returns: negative number, if self < other; 0 if self == other or positive
number, if self > other
:rtype: int
@@ -105,7 +105,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
def associator_names(self, **kwargs):
"""
- Returns a list of associated :py:class:`LMIInstanceName` with this object.
+ Returns a list of associated :py:class:`.LMIInstanceName` with this object.
:param string AssocClass: valid CIM association class name. It acts as a filter on
the returned set of names by mandating that each returned name identify an
@@ -127,7 +127,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
named returned object plays the specified role. That is, the name of the
property in the association class that refers to the returned object shall
match the value of this parameter. Default value is None.
- :returns: list of associated :py:class:`LMIInstanceName` objects
+ :returns: list of associated :py:class:`.LMIInstanceName` objects
**Usage:** :ref:`associators_instance_names`.
"""
@@ -137,7 +137,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
def first_associator_name(self, **kwargs):
"""
- Returns the first associated :py:class:`LMIInstanceName` with this object.
+ Returns the first associated :py:class:`.LMIInstanceName` with this object.
:param string AssocClass: valid CIM association class name. It acts as a filter on
the returned set of names by mandating that each returned name identify an
@@ -159,7 +159,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
named returned object plays the specified role. That is, the name of the
property in the association class that refers to the returned object shall
match the value of this parameter. Default value is None.
- :returns: first associated :py:class:`LMIInstanceName` object
+ :returns: first associated :py:class:`.LMIInstanceName` object
**Usage:** :ref:`associators_instance_names`.
"""
@@ -168,7 +168,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
def associators(self, **kwargs):
"""
- Returns a list of associated :py:class:`LMIInstance` objects with this instance.
+ Returns a list of associated :py:class:`.LMIInstance` objects with this instance.
:param string AssocClass: valid CIM association class name. It acts as a filter on
the returned set of objects by mandating that each returned object shall be
@@ -202,7 +202,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
properties missing from this list. If *PropertyList* is an empty list, no
properties are included in each returned object. If it is None, no additional
filtering is defined. Default value is None.
- :returns: list of associated :py:class:`LMIInstance` objects
+ :returns: list of associated :py:class:`.LMIInstance` objects
**Usage:** :ref:`associators_instances`.
"""
@@ -211,7 +211,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
def first_associator(self, **kwargs):
"""
- Returns the first associated :py:class:`LMIInstance` with this object.
+ Returns the first associated :py:class:`.LMIInstance` with this object.
:param string AssocClass: valid CIM association class name. It acts as a filter on
the returned set of objects by mandating that each returned object shall be
@@ -245,7 +245,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
properties missing from this list. If PropertyList is an empty list, no
properties are included in each returned object. If it is None, no additional
filtering is defined. Default value is None.
- :returns: first associated :py:class:`LMIInstance`
+ :returns: first associated :py:class:`.LMIInstance`
**Usage:** :ref:`associators_instances`.
"""
@@ -254,7 +254,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
def reference_names(self, **kwargs):
"""
- Returns a list of association :py:class:`LMIInstanceName` objects with this
+ Returns a list of association :py:class:`.LMIInstanceName` objects with this
object.
:param string ResultClass: valid CIM class name. It acts as a filter on the
@@ -265,7 +265,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
of object names by mandating that each returned object name shall identify an
object that refers to the target instance through a property with a name that
matches the value of this parameter. Default value is None.
- :returns: list of association :py:class:`LMIInstanceName` objects
+ :returns: list of association :py:class:`.LMIInstanceName` objects
**Usage:** :ref:`references_instance_names`.
"""
@@ -275,7 +275,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
def first_reference_name(self, **kwargs):
"""
- Returns the first association :py:class:`LMIInstanceName` with this object.
+ Returns the first association :py:class:`.LMIInstanceName` with this object.
:param string ResultClass: valid CIM class name. It acts as a filter on the
returned set of object names by mandating that each returned Object Name
@@ -285,7 +285,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
of object names by mandating that each returned object name shall identify an
object that refers to the target instance through a property with a name that
matches the value of this parameter. Default value is None.
- :returns: first association :py:class:`LMIInstanceName` object
+ :returns: first association :py:class:`.LMIInstanceName` object
**Usage:** :ref:`references_instance_names`.
"""
@@ -294,7 +294,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
def references(self, **kwargs):
"""
- Returns a list of association :py:class:`LMIInstance` objects with this object.
+ Returns a list of association :py:class:`.LMIInstance` objects with this object.
:param string ResultClass: valid CIM class name. It acts as a filter on the
returned set of objects by mandating that each returned object shall be an
@@ -315,7 +315,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
properties missing from this list. If PropertyList is an empty list, no
properties are included in each returned object. If PropertyList is None, no
additional filtering is defined. Default value is None.
- :returns: list of association :py:class:`LMIInstance` objects
+ :returns: list of association :py:class:`.LMIInstance` objects
**Usage:** :ref:`references_instances`.
"""
@@ -325,7 +325,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
def first_reference(self, **kwargs):
"""
- Returns the first association :py:class:`LMIInstance` with this object.
+ Returns the first association :py:class:`.LMIInstance` with this object.
:param string ResultClass: valid CIM class name. It acts as a filter on the
returned set of objects by mandating that each returned object shall be an
@@ -346,7 +346,7 @@ class LMIInstanceName(LMIWrapperBaseObject):
properties missing from this list. If PropertyList is an empty list, no
properties are included in each returned object. If PropertyList is None, no
additional filtering is defined. Default value is None.
- :returns: first association :py:class:`LMIInstance` object
+ :returns: first association :py:class:`.LMIInstance` object
**Usage:** :ref:`references_instances`.
"""
@@ -361,9 +361,9 @@ class LMIInstanceName(LMIWrapperBaseObject):
def to_instance(self):
"""
- Creates a new :py:class:`LMIInstance` object from :py:class:`LMIInstanceName`.
+ Creates a new :py:class:`.LMIInstance` object from :py:class:`.LMIInstanceName`.
- :returns: :py:class:`LMIInstance` object if the object was retrieved successfully;
+ :returns: :py:class:`.LMIInstance` object if the object was retrieved successfully;
None otherwise.
**Usage:** :ref:`instance_names_conversion`.
diff --git a/cli/lmi/shell/LMIJob.py b/cli/lmi/shell/LMIJob.py
index e42888e..6e4fc37 100644
--- a/cli/lmi/shell/LMIJob.py
+++ b/cli/lmi/shell/LMIJob.py
@@ -34,7 +34,7 @@ def _lmi_get_job_state(job):
"""
Helper function, which returns a numeric Job state value.
- :param job: :py:class:`LMIInstance` or :py:class:`CIMInstance` representing a job
+ :param job: :py:class:`.LMIInstance` or :py:class:`CIMInstance` representing a job
"""
if isinstance(job, LMIObjectFactory().LMIInstance):
return job.JobState
@@ -46,7 +46,7 @@ def lmi_is_job_finished(job):
"""
Helper function, which returns bool flag, if the job is in finished state.
- :param job: :py:class:`LMIInstance` or :py:class:`CIMInstance` representing a job
+ :param job: :py:class:`.LMIInstance` or :py:class:`CIMInstance` representing a job
"""
return _lmi_get_job_state(job) in ( \
JOB_STATE_COMPLETED, \
@@ -59,7 +59,7 @@ def lmi_is_job_completed(job):
"""
Helper function, which returns bool flag, if the job is in completed state.
- :param job: :py:class:`LMIInstance` or :py:class:`CIMInstance` representing a job
+ :param job: :py:class:`.LMIInstance` or :py:class:`CIMInstance` representing a job
"""
return _lmi_get_job_state(job) == JOB_STATE_COMPLETED
@@ -67,7 +67,7 @@ def lmi_is_job_terminated(job):
"""
Helper function, which returns bool flag, if the job is in terminated state.
- :param job: :py:class:`LMIInstance` or :py:class:`CIMInstance` representing a job
+ :param job: :py:class:`.LMIInstance` or :py:class:`CIMInstance` representing a job
"""
return _lmi_get_job_state(job) == JOB_STATE_TERMINATED
@@ -75,7 +75,7 @@ def lmi_is_job_killed(job):
"""
Helper function, which returns bool flag, if the job is killed.
- :param job: :py:class:`LMIInstance` or :py:class:`CIMInstance` representing a job
+ :param job: :py:class:`.LMIInstance` or :py:class:`CIMInstance` representing a job
"""
return _lmi_get_job_state(job) == JOB_STATE_KILLED
@@ -83,6 +83,6 @@ def lmi_is_job_exception(job):
"""
Helper function, which returns bool flag, if the job is in the exception state.
- :param job: :py:class:`LMIInstance` or :py:class:`CIMInstance` representing a job
+ :param job: :py:class:`.LMIInstance` or :py:class:`CIMInstance` representing a job
"""
return _lmi_get_job_state(job) == JOB_STATE_EXCEPTION
diff --git a/cli/lmi/shell/LMIMethod.py b/cli/lmi/shell/LMIMethod.py
index 8169ff2..0038551 100644
--- a/cli/lmi/shell/LMIMethod.py
+++ b/cli/lmi/shell/LMIMethod.py
@@ -138,7 +138,7 @@ class LMIMethod(LMIWrapperBaseObject):
LMI wrapper class representing :py:class:`CIMMethod`.
:param LMIConnection conn: connection object
- :param LMIInstance lmi_instance: :py:class:`LMIInstance` object, on which the method
+ :param LMIInstance lmi_instance: :py:class:`.LMIInstance` object, on which the method
call will be issued
:param string method: method name
"""
@@ -191,12 +191,12 @@ class LMIMethod(LMIWrapperBaseObject):
def __return_synchro_method_call(self, job_inst, job_refresh=True):
"""
- Returns a :py:class:`LMIReturnValue` object with Job output parameters set.
+ Returns a :py:class:`.LMIReturnValue` object with Job output parameters set.
:param LMIInstance job_inst: job returned from a synchronous method call
:param bool job_refresh: flag, which indicates, if the ``job_inst``
needs to be refreshed
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to Job output parameters
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to Job output parameters
"""
# Adjust return value from the job object.
if job_refresh:
@@ -239,7 +239,7 @@ class LMIMethod(LMIWrapperBaseObject):
:param LMIInstance job_inst: job object returned from a synchronous
method call
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to 0 and ``rparams``
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to 0 and ``rparams``
set to job's output parameters
:raises: :py:exc:`.LMIIndicationListenerError`,
:py:exc:`.LMISynchroMethodCallError`,
@@ -251,7 +251,7 @@ class LMIMethod(LMIWrapperBaseObject):
"""
def handle_job(ind, cond, job_finished, job_exception):
"""
- :py:class:`LMIListener` handler for synchronous method call, which uses
+ :py:class:`.LMIListener` handler for synchronous method call, which uses
indication means of waiting for the job. This function is called, when a job
changes its state.
@@ -437,7 +437,7 @@ class LMIMethod(LMIWrapperBaseObject):
This call uses polling method to wait for the job to finish.
:param LMIInstance job_inst: job object
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to 0 and ``rparams``
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to 0 and ``rparams``
set to job's output parameters.
:raises: :py:exc:`.LMISynchroMethodCallError`
"""
@@ -511,7 +511,7 @@ class LMIMethod(LMIWrapperBaseObject):
the instance should be refreshed after a method call. Default
value is False.
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to method's return
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to method's return
value; ``rparams`` set to method's return parameters; ``errorstr`` set
method's error string in case of failure
:raises: :py:exc:`.LMIUnknownParameterError`,
diff --git a/cli/lmi/shell/LMINamespace.py b/cli/lmi/shell/LMINamespace.py
index 2e9b131..4fc41ff 100644
--- a/cli/lmi/shell/LMINamespace.py
+++ b/cli/lmi/shell/LMINamespace.py
@@ -37,10 +37,10 @@ class LMINamespace(LMIWrapperBaseObject):
def __getattr__(self, name):
"""
- Returns a :py:class:`LMIClass` object.
+ Returns a :py:class:`.LMIClass` object.
:param string name: class name
- :returns: :py:class:`LMIClass` object
+ :returns: :py:class:`.LMIClass` object
"""
return lmi_wrap_cim_class(self._conn, name, self.name)
@@ -92,11 +92,11 @@ class LMINamespace(LMIWrapperBaseObject):
def cql(self, query):
"""
- Executes a CQL query and returns a list of :py:class:`LMIInstance` objects.
+ Executes a CQL query and returns a list of :py:class:`.LMIInstance` objects.
:param string query: CQL query to execute
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to a list
- of :py:class:`LMIInstance` objects
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to a list
+ of :py:class:`.LMIInstance` objects
**Usage:** :ref:`namespaces_queries`.
"""
@@ -107,11 +107,11 @@ class LMINamespace(LMIWrapperBaseObject):
def wql(self, query):
"""
- Executes a WQL query and returns a list of :py:class:`LMIInstance` objects.
+ Executes a WQL query and returns a list of :py:class:`.LMIInstance` objects.
:param string query: WQL query to execute
- :returns: :py:class:`LMIReturnValue` object with ``rval`` set to a list
- of :py:class:`LMIInstance` objects
+ :returns: :py:class:`.LMIReturnValue` object with ``rval`` set to a list
+ of :py:class:`.LMIInstance` objects
**Usage:** :ref:`namespaces_queries`.
"""
@@ -131,7 +131,7 @@ class LMINamespace(LMIWrapperBaseObject):
class LMINamespaceRoot(LMINamespace):
"""
Derived class for *root* namespace. Object of this class is accessible
- from :py:class:`LMIConnection` object as a hierarchy entry.
+ from :py:class:`.LMIConnection` object as a hierarchy entry.
:param LMIConnection conn: connection object
"""
@@ -142,7 +142,7 @@ class LMINamespaceRoot(LMINamespace):
def cimv2(self):
"""
:returns: *root/cimv2* namespace
- :rtype: :py:class:`LMINamespace`
+ :rtype: :py:class:`.LMINamespace`
"""
return lmi_wrap_cim_namespace(self._conn, "root/cimv2")
@@ -150,7 +150,7 @@ class LMINamespaceRoot(LMINamespace):
def interop(self):
"""
:returns: *root/interop* namespace
- :rtype: :py:class:`LMINamespace`
+ :rtype: :py:class:`.LMINamespace`
"""
return lmi_wrap_cim_namespace(self._conn, "root/interop")
@@ -158,7 +158,7 @@ class LMINamespaceRoot(LMINamespace):
def PG_InterOp(self):
"""
:returns: *root/PG_InterIp* namespace
- :rtype: :py:class:`LMINamespace`
+ :rtype: :py:class:`.LMINamespace`
"""
return lmi_wrap_cim_namespace(self._conn, "root/PG_InterOp")
@@ -166,7 +166,7 @@ class LMINamespaceRoot(LMINamespace):
def PG_Internal(self):
"""
:returns: *root/PG_Internal* namespace
- :rtype: :py:class:`LMINamespace`
+ :rtype: :py:class:`.LMINamespace`
"""
return lmi_wrap_cim_namespace(self._conn, "root/PG_Internal")
diff --git a/cli/lmi/shell/LMIShellClient.py b/cli/lmi/shell/LMIShellClient.py
index 809a6b5..e704745 100644
--- a/cli/lmi/shell/LMIShellClient.py
+++ b/cli/lmi/shell/LMIShellClient.py
@@ -19,7 +19,7 @@ from LMIShellCache import LMIShellCache
class LMIShellClient(LMIBaseClient):
"""
- :class:`LMIShellClient` overrides few methods due to caching purposes.
+ :class:`.LMIShellClient` overrides few methods due to caching purposes.
:param string uri: URI of the CIMOM
:param string username: account, under which, the CIM calls will be performed
@@ -28,14 +28,14 @@ class LMIShellClient(LMIBaseClient):
interactive mode; default value is False.
:param bool use_cache: flag indicating, if the LMIShell client should use cache for
:class:`CIMClass` objects. This saves a lot's of communication, if there is often
- the :meth:`LMIShellClient._get_class_names()` or
- :meth:`LMIShellClient.attr._get_class()` call issued.
+ the :meth:`.LMIShellClient._get_class_names()` or
+ :meth:`.LMIShellClient.attr._get_class()` call issued.
:param conn_type: type of connection; can be of 2 values:
- * :attr:`LMIBaseClient.CONN_TYPE_WBEM` -- WBEM connection,
- * :attr:`LMIBaseClient.CONN_TYPE_PEGASUS_UDS` -- applicable only for
+ * :attr:`.LMIBaseClient.CONN_TYPE_WBEM` -- WBEM connection,
+ * :attr:`.LMIBaseClient.CONN_TYPE_PEGASUS_UDS` -- applicable only for
Tog-Pegasus CIMOM, it uses Unix socket for the connection; default value is
- :attr:`LMIBaseClient.CONN_TYPE_WBEM`
+ :attr:`.LMIBaseClient.CONN_TYPE_WBEM`
:param string key_file: path to x509 key file; default value is None
:param string cert_file: path to x509 cert file; default value is None
@@ -71,7 +71,7 @@ class LMIShellClient(LMIBaseClient):
: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.
- :returns: :class:`LMIReturnValue` object with ``rval`` set to list of
+ :returns: :class:`.LMIReturnValue` object with ``rval`` set to list of
string with class names, if no error occurs; otherwise ``rval`` is
set to None and ``errorstr`` contains an appropriate error string.
:raises: :exc:`CIMError`, :exc:`ConnectionError`
@@ -115,7 +115,7 @@ class LMIShellClient(LMIBaseClient):
additional filtering is defined.
:param bool full_fetch: True, if :py:class:`CIMClass` is cached with qualifiers;
False otherwise. Default value is False.
- :returns: :class:`LMIReturnValue` object with ``rval`` set to :class:`CIMClass`,
+ :returns: :class:`.LMIReturnValue` object with ``rval`` set to :class:`CIMClass`,
if no error occurs; otherwise ``rval`` is set to None and ``errorstr`` to
appropriate error string
:raises: :exc:`CIMError`, :exc:`ConnectionError`
@@ -174,7 +174,7 @@ class LMIShellClient(LMIBaseClient):
"""
Property setter for interactive flag.
- :param bool i: new :attr:`LMIShellClient.interactive` state
+ :param bool i: new :attr:`.LMIShellClient.interactive` state
"""
self._interactive = bool(i)
diff --git a/cli/lmi/shell/LMISubscription.py b/cli/lmi/shell/LMISubscription.py
index a61dcc2..dcafe7d 100644
--- a/cli/lmi/shell/LMISubscription.py
+++ b/cli/lmi/shell/LMISubscription.py
@@ -43,7 +43,7 @@ class LMISubscription(object):
:py:attr:`.LMISubscription._cim_handler_tlp` contains an flag, that the handler
object was created temporarily, it will be deleted as well.
- This is called from :py:class:`LMIConnection` object, which holds an internal list
+ This is called from :py:class:`.LMIConnection` object, which holds an internal list
of all subscribed indications by the LMIShell (if not created by hand).
"""
self._client._delete_instance(self._cim_subscription.path)
diff --git a/cli/lmi/shell/LMIUtil.py b/cli/lmi/shell/LMIUtil.py
index 8f02692..c32660a 100644
--- a/cli/lmi/shell/LMIUtil.py
+++ b/cli/lmi/shell/LMIUtil.py
@@ -31,7 +31,7 @@ class LMIUseExceptionsHelper(object):
def __new__(cls):
"""
- Return a new :py:class:`LMIUseExceptionsHelper` instance, if no shared object is
+ Return a new :py:class:`.LMIUseExceptionsHelper` instance, if no shared object is
present; otherwise an existing instance is returned. By default the
``use_exceptions`` flag is set to False.
"""
@@ -185,23 +185,23 @@ def lmi_cast_to_lmi(t, value):
def lmi_wrap_cim_namespace(conn, cim_namespace_name):
"""
- Helper function, which returns wrapped CIM namespace in :py:class:`LMINamespace`.
+ Helper function, which returns wrapped CIM namespace in :py:class:`.LMINamespace`.
:param LMIConnection conn: connection object
:param string cim_namespace_name: CIM namespace name
- :returns: wrapped CIM namespace into :py:class:`LMINamespace`
+ :returns: wrapped CIM namespace into :py:class:`.LMINamespace`
"""
return LMIObjectFactory().LMINamespace(conn, cim_namespace_name)
def lmi_wrap_cim_class(conn, cim_class_name, cim_namespace_name):
"""
- Helper function, which returns wrapped :py:class:`CIMClass` into LMIClass.
+ Helper function, which returns wrapped :py:class:`CIMClass` into :py:class:`.LMIClass`.
:param LMIConnection conn: connection object
:param string cim_class_name: string containing :py:class:`CIMClass` name
:param string cim_namespace_name: string containing :py:class:`CIMNamespace` name, or
None, if the namespace is not known
- :returns: wrapped :py:class:`CIMClass` into :py:class:`LMIClass`
+ :returns: wrapped :py:class:`CIMClass` into :py:class:`.LMIClass`
"""
lmi_namespace = None
if cim_namespace_name:
@@ -211,14 +211,14 @@ def lmi_wrap_cim_class(conn, cim_class_name, cim_namespace_name):
def lmi_wrap_cim_instance(conn, cim_instance, cim_class_name, cim_namespace_name):
"""
Helper function, which returns wrapped :py:class:`CIMInstance` into
- :py:class:`LMIInstance`.
+ :py:class:`.LMIInstance`.
:param LMIConnection conn: connection object
:param CIMInstance cim_instance: :py:class:`CIMInstance` object to be wrapped
:param string cim_class_name: :py:class:`CIMClass` name
:param string cim_namespace_name: :py:class:`CIMNamespace` name, or None, if the
namespace is not known
- :returns: wrapped :py:class:`CIMInstance` into :py:class:`LMIInstance`
+ :returns: wrapped :py:class:`CIMInstance` into :py:class:`.LMIInstance`
"""
lmi_class = lmi_wrap_cim_class(conn, cim_class_name, cim_namespace_name)
return LMIObjectFactory().LMIInstance(conn, lmi_class, cim_instance)
@@ -226,24 +226,24 @@ def lmi_wrap_cim_instance(conn, cim_instance, cim_class_name, cim_namespace_name
def lmi_wrap_cim_instance_name(conn, cim_instance_name):
"""
Helper function, which returns wrapped :py:class:`CIMInstanceName` into
- :py:class:`LMIInstanceName`.
+ :py:class:`.LMIInstanceName`.
:param LMIConnection conn: connection object
:param CIMInstanceName cim_instance_name: :py:class:`CIMInstanceName` object to be
wrapped
- :returns: wrapped :py:class:`CIMInstanceName` into :py:class:`LMIInstanceName`
+ :returns: wrapped :py:class:`CIMInstanceName` into :py:class:`.LMIInstanceName`
"""
return LMIObjectFactory().LMIInstanceName(conn, cim_instance_name)
def lmi_wrap_cim_method(conn, cim_method_name, lmi_instance):
"""
Helper function, which returns wrapped :py:class:`CIMMethod` into
- :py:class:`LMIMethod`.
+ :py:class:`.LMIMethod`.
:param LMIConnection conn: connection object
:param string cim_method_name: method name
:param LMIInstance lmi_instance: object, on which the method call will be issued
- :returns: wrapped :py:class:`CIMMethod` into :py:class:`LMIMethod`
+ :returns: wrapped :py:class:`CIMMethod` into :py:class:`.LMIMethod`
"""
return LMIObjectFactory().LMIMethod(conn, lmi_instance, cim_method_name)
@@ -303,17 +303,17 @@ def lmi_transform_to_cim_param(t, value):
def lmi_isinstance(lmi_obj, lmi_class):
"""
Function returns True if :samp:`lmi_obj` is an instance of a :samp:`lmi_class`, False
- otherwise. When passed :py:class:`LMIInstance`, :py:class:`LMIInstanceName` as
- :samp:`lmi_obj` and :samp:`lmi_class` is of :py:class:`LMIClass` type, function can
- tell, if such :samp:`lmi_obj` is direct instance of :py:class:`LMIClass`, or it's
+ otherwise. When passed :py:class:`.LMIInstance`, :py:class:`.LMIInstanceName` as
+ :samp:`lmi_obj` and :samp:`lmi_class` is of :py:class:`.LMIClass` type, function can
+ tell, if such :samp:`lmi_obj` is direct instance of :py:class:`.LMIClass`, or it's
super class.
If :samp:`lmi_obj` and :samp:`lmi_class` is not instance of mentioned classes, an
exception will be raised.
- :param lmi_obj: instance of :py:class:`LMIInstance` or :py:class:`LMIInstanceName`
+ :param lmi_obj: instance of :py:class:`.LMIInstance` or :py:class:`.LMIInstanceName`
which is checked, if such instance is instance of the ``lmi_class``
- :param LMIClass lmi_class: instance of :py:class:`LMIClass` object
+ :param LMIClass lmi_class: instance of :py:class:`.LMIClass` object
:returns: whether **lmi_obj** is instance of **lmi_class**
:rtype: bool
:raises: :py:exc:`TypeError`
@@ -336,11 +336,11 @@ def lmi_isinstance(lmi_obj, lmi_class):
def lmi_associators(assoc_classes):
"""
Helper function to speed up associator traversal. Returns a list of tuples, where each
- tuple contains :py:class:`LMIInstance` objects, which are in association.
+ tuple contains :py:class:`.LMIInstance` objects, which are in association.
- :param list assoc_classes: list of :py:class:`LMIClass` objects, for which the
+ :param list assoc_classes: list of :py:class:`.LMIClass` objects, for which the
associations will be returned
- :returns: list of tuples of :py:class:`LMIInstance` objects in association
+ :returns: list of tuples of :py:class:`.LMIInstance` objects in association
"""
def make_key(path):
path.host = None
@@ -400,8 +400,8 @@ def lmi_instance_to_path(instance):
* :py:class:`CIMInstance`
* :py:class:`CIMInstanceName`
- * :py:class:`LMIInstance`
- * :py:class:`LMIInstanceName`
+ * :py:class:`.LMIInstance`
+ * :py:class:`.LMIInstanceName`
:returns: extracteed :py:class:`CIMInstanceName` object
:raises: :py:exc:`TypeError`
9 years, 11 months
[cura-tools] openlmi-tools-lmiwbem: fix sphinx broken documentation in LMIClass (e36f273)
by phatina@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
>---------------------------------------------------------------
commit e36f27355249503be110aede072ef0a7a2ef7e2c
Author: Peter Hatina <phatina(a)redhat.com>
Date: Wed Apr 23 15:27:28 2014 +0200
fix sphinx broken documentation in LMIClass
>---------------------------------------------------------------
cli/lmi/shell/LMIDecorators.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/cli/lmi/shell/LMIDecorators.py b/cli/lmi/shell/LMIDecorators.py
index c3d2cca..cd65de7 100644
--- a/cli/lmi/shell/LMIDecorators.py
+++ b/cli/lmi/shell/LMIDecorators.py
@@ -227,6 +227,7 @@ class lmi_class_fetch_lazy(object):
:param instancemethod fn: decorated method
"""
+ @wraps(fn)
def wrapped(self_wr, *args, **kwargs):
if not self_wr.is_fetched(self._full_fetch):
self_wr.fetch(self._full_fetch)
9 years, 11 months