Hello community, here is the log from the commit of package openlmi-tools for openSUSE:Factory checked in at 2014-12-22 12:54:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openlmi-tools (Old) and /work/SRC/openSUSE:Factory/.openlmi-tools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openlmi-tools" Changes: -------- --- /work/SRC/openSUSE:Factory/openlmi-tools/openlmi-tools.changes 2014-11-06 16:51:30.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.openlmi-tools.new/openlmi-tools.changes 2014-12-22 12:52:57.000000000 +0100 @@ -1,0 +2,13 @@ +Fri Dec 12 20:19:26 UTC 2014 - [email protected] + +- Upate to 0.10.4 + - Bugfixes + +------------------------------------------------------------------- +Thu Dec 11 13:53:03 UTC 2014 - [email protected] + +- Update to 0.10.3 + - WS-Man support is now optional + - documentation cleanup + +------------------------------------------------------------------- @@ -4 +17 @@ -- Upgrade to 0.10.2 +- Update to 0.10.2 Old: ---- openlmi-tools-0.10.2.tar.gz New: ---- openlmi-tools-0.10.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openlmi-tools.spec ++++++ --- /var/tmp/diff_new_pack.VoNqM7/_old 2014-12-22 12:52:58.000000000 +0100 +++ /var/tmp/diff_new_pack.VoNqM7/_new 2014-12-22 12:52:58.000000000 +0100 @@ -18,7 +18,7 @@ Name: openlmi-tools -Version: 0.10.2 +Version: 0.10.4 Release: 2%{?dist} Summary: Tooling around openLMI License: GPL-2.0 @@ -30,9 +30,11 @@ Url: http://fedorahosted.org/openlmi/ Source0: https://fedorahosted.org/released/openlmi-tools/%{name}-%{version}.tar.gz +%if 0%{?suse_version} == 1110 # Python 2.6 vs 2.7 dict creation syntax change, [email protected] # See http://stackoverflow.com/questions/1747817/python-create-a-dictionary-with-list-comprehension Patch: python-2.6.patch +%endif BuildRequires: ImageMagick BuildRequires: autoconf ++++++ openlmi-tools-0.10.2.tar.gz -> openlmi-tools-0.10.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/README.md new/openlmi-tools-0.10.4/README.md --- old/openlmi-tools-0.10.2/README.md 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/README.md 2014-12-12 11:10:32.000000000 +0100 @@ -10,9 +10,9 @@ OpenLMI-tools ============= -OpenLMI-tools currently contains LMIShell, a (non)interactive command -interpreter for CIM objects access and LMI-Meta Command, which serves as a -command line interface to OpenLMI Providers, which utilizes LMIShell. +OpenLMI-tools currently contains *LMIShell*, a (non)interactive command +interpreter for CIM objects access and *LMI metacommand*, which serves as a +command line interface to OpenLMI Providers, which utilizes *LMIShell*. Dependencies ------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/Makefile new/openlmi-tools-0.10.4/cli/Makefile --- old/openlmi-tools-0.10.2/cli/Makefile 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/Makefile 2014-12-12 11:10:32.000000000 +0100 @@ -3,7 +3,7 @@ PYTHONPATH ?= $(HOME)/workspace/python_sandbox DEVELOPDIR ?= $(PYTHONPATH) DOCDIR := $(ROOTDIR)/doc -SOURCE ?= README.md +SOURCE ?= ../README.md TARGET ?= README.txt .PHONY: all readme sdist clean setup develop diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/README.md new/openlmi-tools-0.10.4/cli/README.md --- old/openlmi-tools-0.10.2/cli/README.md 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,133 +0,0 @@ -openlmi-scripts -=============== -Client-side python modules and command line utilities. - -It comprises of one binary called `lmi` and a common library. `lmi` -meta-command allows to run commands on a set of OpenLMI providers. These -commands can be installed separately in a modular way. - -`lmi` is a command line application allowing to run single command on a set -of hosts with just one statement from `shell` or it can run in an -interactive way. - -For more information please refer to online documentation on [pythonhosted][] -or build your own in `doc/` directory. - -Dependencies ------------- -Code base is written for `python 2.7`. -There are following python dependencies: - - * python-docopt - -### Uploading to PyPI -Since *PyPI* expects README file to be in a *reStructuredText* markup -language and the one present is written in *markdown*, it needs to be -converted to it. So please make sure you have `pandoc` installed before -running: - - $ python setup.py sdist upload - -Installation ------------- -Use standard `setuptools` script for installation: - - $ cd openlmi-scripts - $ python setup.py install --user - -This installs just the *lmi meta-command* and client-side library. To install -subcommands, you need to do the same procedure for each particular command -under `commands/` directory. - -Script eggs are also available on *PyPI*, install them with: - - $ pip install --user openlmi-scripts - $ # add any provider you want to interact with - $ pip install --user openlmi-scripts-service openlmi-scripts-software - -Usage ------ -To get a help and see available commands, run: - - $ lmi help - -To get a help for particular command, run: - - $ lmi help service - -To issue single command on a host, run: - - $ lmi --host ${hostname} service list - -To start the app in interactive mode: - - $ lmi --host ${hostname} - > service list --disabled - ... - > service start svnserve.service - ... - > quit - -Developing lmi scripts. ------------------------ - -This documents how to quickly develop lmi scripts without the need to -reinstall python eggs, when anything is changed. This presumes, that the -development process takes place in a git repotory checked out from [git][]. -It can be located anywhere on system. - -Before we start with setting up an environment, please double check, that you -don't have installed anything from openlmi-scripts in system path -(`/usr/lib/python2.7/site-packages/lmi/scripts` should not exist). And make -sure, that user path is also cleared: - - $ rm -rf $HOME/.local/lib/python2.7/site-packages/lmi* - $ rm -rf $HOME/.local/lib/python2.7/site-packages/openlmi* - -Install all dependencies: - - * python-docopt - * openlmi-python-base - * openlmi-tools - -Either via rpms or from respective git repositories. For openlmi-python-base -package contained in [providers-git][] repository the setup script is -located at `src/python/setup.py`. In future these will be available from PyPi. - -Let's setup an environment: - - 1. Create a workspace directory for current `$USER` (let's call it a `WSP`). - This is a place, where our eggs and binaries will be "installed". - It can be located anywhere, for example: - - $ WSP=~/.python_workspace - $ mkdir $WSP - - 2. Add workspace to your python path to make all modules installed there - importable (you can add this to your `~/.bashrc`): - - $ export PYTHONPATH=$WSP:$PYTHONPATH - - 3. Add workspace to your PATH, so the installed binaries can be run: - - $ export PATH=$WSP:$PATH - - 4. Now let's "install" to our workspace. First `cd` to checked out - openlmi-scripts repository. - 5. Install them and any commands you want -- possibly your own - - $ python setup.py develop --install-dir=$WSP - $ for cmd in service storage; do - > pushd commands/$cmd - > python setup.py develop --install-dir=$WSP - > popd - > done - -Now any change made to openlmi-scripts is immediately reflected in `lmi` -meta-command. - ------------------------------------------------------------------------------- -[git]: https://github.com/openlmi/openlmi-scripts "openlmi-scripts" -[providers-git]: https://fedorahosted.org/openlmi/browser/openlmi-providers "openlmi-providers" -[pythonhosted]: http://pythonhosted.org/openlmi-scripts/index.html "python hosted" -[PyPI]: https://pypi.python.org/pypi/openlmi-tools "PyPI" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/lmi/scripts/common/command/session.py new/openlmi-tools-0.10.4/cli/lmi/scripts/common/command/session.py --- old/openlmi-tools-0.10.2/cli/lmi/scripts/common/command/session.py 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/lmi/scripts/common/command/session.py 2014-12-12 11:10:32.000000000 +0100 @@ -193,9 +193,10 @@ namespace = self.cim_namespace() timeout = self.connection_timeout() if timeout is not None: - if hasattr(connection.connection, "timeout"): + conn = getattr(connection, "connection", connection) + if hasattr(conn, "timeout"): LOG().debug("Set connection timeout to %d seconds.", timeout) - connection.timeout = timeout * 1000 + conn.timeout = timeout * 1000 else: LOG().debug("Could not set connection timeout.") if namespace is not None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/lmi/scripts/common/versioncheck/parser.py new/openlmi-tools-0.10.4/cli/lmi/scripts/common/versioncheck/parser.py --- old/openlmi-tools-0.10.2/cli/lmi/scripts/common/versioncheck/parser.py 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/lmi/scripts/common/versioncheck/parser.py 2014-12-12 11:10:32.000000000 +0100 @@ -67,12 +67,12 @@ #: the condition. The latter causes the comparison to end on first satisfied #: part. OP_MAP = { - '==' : (operator.eq, all), - '<=' : (operator.le, all), - '>=' : (operator.ge, all), - '!=' : (operator.ne, any), - '>' : (operator.gt, any), - '<' : (operator.lt, any) + '==' : operator.eq, + '<=' : operator.le, + '>=' : operator.ge, + '!=' : operator.ne, + '>' : operator.gt, + '<' : operator.lt } def cmp_version(fst, snd, opsign='<'): @@ -94,17 +94,13 @@ return tuple(int(p) if p else -1 for p in ver.split('.')) aparts = splitver(fst) bparts = splitver(snd) - op, which = OP_MAP[opsign] - if which is all: - for ap, bp in zip(aparts, bparts): - if not op(ap, bp): - return False - else: - for ap, bp in zip(aparts, bparts): - if op(ap, bp): - return True + op = OP_MAP[opsign] + for ap, bp in zip(aparts, bparts): + if not op(ap, bp): if ap != bp: return False + if ap != bp: + return op(ap, bp) return op(len(aparts), len(bparts)) class SemanticGroup(object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/lmi/shell/LMIConnection.py new/openlmi-tools-0.10.4/cli/lmi/shell/LMIConnection.py --- old/openlmi-tools-0.10.2/cli/lmi/shell/LMIConnection.py 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/lmi/shell/LMIConnection.py 2014-12-12 11:10:32.000000000 +0100 @@ -167,10 +167,16 @@ sys.stdout.write("\n") return None - connection = LMIConnection( - uri, username, password, interactive=interactive, - use_cache=use_cache, key_file=key_file, cert_file=cert_file, - verify_server_cert=verify_server_cert) + try: + # Try to create a LMIConnection. We may fail to construct such object, + # if WSMAN isn't supported (package pywsman not available). + connection = LMIConnection( + uri, username, password, interactive=interactive, + use_cache=use_cache, key_file=key_file, cert_file=cert_file, + verify_server_cert=verify_server_cert) + except Exception as e: + lmi_raise_or_dump_exception(e) + return # Verify the connection rval, _, errorstr = connection.connect() @@ -241,8 +247,11 @@ """ Disconnects and frees :py:class:`.LMICIMXMLClient` object. """ - self._client.disconnect() - del self._client + try: + self._client.disconnect() + del self._client + except AttributeError: + pass def __repr__(self): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/lmi/shell/LMIInstance.py new/openlmi-tools-0.10.4/cli/lmi/shell/LMIInstance.py --- old/openlmi-tools-0.10.2/cli/lmi/shell/LMIInstance.py 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/lmi/shell/LMIInstance.py 2014-12-12 11:10:32.000000000 +0100 @@ -131,7 +131,7 @@ value = value.wrapped_object if name in self._cim_instance: t = self._cim_instance.properties[name].type - self._cim_instance[name] = lmi_cast_to_cim(t, value) + self._cim_instance.properties[name].value = lmi_cast_to_cim(t, value) else: self.__dict__[name] = value diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/lmi/shell/LMIShellVersion.py new/openlmi-tools-0.10.4/cli/lmi/shell/LMIShellVersion.py --- old/openlmi-tools-0.10.2/cli/lmi/shell/LMIShellVersion.py 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/lmi/shell/LMIShellVersion.py 2014-12-12 11:10:32.000000000 +0100 @@ -13,4 +13,4 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. -__version__ = "0.10.2" +__version__ = "0.10.4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/lmi/shell/LMIWSMANClient.py new/openlmi-tools-0.10.4/cli/lmi/shell/LMIWSMANClient.py --- old/openlmi-tools-0.10.2/cli/lmi/shell/LMIWSMANClient.py 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/lmi/shell/LMIWSMANClient.py 2014-12-12 11:10:32.000000000 +0100 @@ -13,7 +13,11 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. -import pywsman +try: + import pywsman + HAVE_PYWSMAN = True +except ImportError: + HAVE_PYWSMAN = False import types from lmi.shell.compat import * @@ -22,8 +26,11 @@ from lmi.shell.LMIDecorators import lmi_wrap_cim_exceptions_rval from lmi.shell.LMIExceptions import CIMError +from lmi.shell.LMIExceptions import ConnectionError from lmi.shell.LMIExceptions import LMINotSupported +from lmi.shell.LMIShellLogger import lmi_get_logger + from lmi.shell.LMIReturnValue import LMIReturnValue from lmi.shell.LMIUtil import lmi_instance_to_path @@ -47,6 +54,8 @@ "DCIM": "http://schemas.dell.com/wbem/wscim/1/cim-schema/2" } +logger = lmi_get_logger() + class LMIWSMANClient(object): """ @@ -76,6 +85,12 @@ def __init__(self, uri, username="", password="", interactive=False, verify_server_cert=True, key_file=None, cert_file=None): + if not HAVE_PYWSMAN: + logger.error("WSMAN not supported") + raise ConnectionError( + wbem.CIM_ERR_NOT_SUPPORTED, + "WSMAN not supported") + if not uri.startswith("http://") and \ not uri.startswith("https://"): uri = "https://" + uri diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/man/lmi.1 new/openlmi-tools-0.10.4/cli/man/lmi.1 --- old/openlmi-tools-0.10.2/cli/man/lmi.1 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/man/lmi.1 2014-12-12 11:10:32.000000000 +0100 @@ -1,4 +1,4 @@ -.TH lmi 1 "October 2014" "openlmi-scripts 1.0.0" "User Commands" +.TH lmi 1 "December 2014" "openlmi-scripts 0.10.4" "User Commands" .SH NAME lmi \- meta-command for managing systems with OpenLMI providers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/setup-scripts.py new/openlmi-tools-0.10.4/cli/setup-scripts.py --- old/openlmi-tools-0.10.2/cli/setup-scripts.py 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/setup-scripts.py 2014-12-12 11:10:32.000000000 +0100 @@ -30,7 +30,7 @@ setup( name='openlmi-scripts', - version='0.3.0', + version='0.4.0', description='Client-side library and command-line client', long_description=long_description, author='Michal Minar', @@ -53,11 +53,18 @@ packages=[ 'lmi', 'lmi.scripts', + 'lmi.scripts._metacommand', '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'], + 'lmi.scripts.common.versioncheck' + ], + install_requires=[ + # version of tools >= 0.10.0 contains metacommand - this package + # becomes redundant + 'openlmi-tools >= 0.9, < 0.10.0', + 'docopt >= 0.6', + "pyparsing"], include_package_data=True, zip_safe=False, entry_points={ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/setup.py.skel new/openlmi-tools-0.10.4/cli/setup.py.skel --- old/openlmi-tools-0.10.2/cli/setup.py.skel 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/setup.py.skel 2014-12-12 11:10:32.000000000 +0100 @@ -54,8 +54,6 @@ "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.2", "Intended Audience :: Developers", "Environment :: Console", ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/test/base.sh new/openlmi-tools-0.10.4/cli/test/base.sh --- old/openlmi-tools-0.10.2/cli/test/base.sh 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/test/base.sh 2014-12-12 11:10:32.000000000 +0100 @@ -49,3 +49,31 @@ # for some tests no other options are welcomed export LMI_=`echo $LMI | cut -d \ -f 1` +function using_lmiwbem() { + python2 << EOF +try: + import lmiwbem +except ImportError: + import sys + sys.exit(1) +EOF +} + +function rlLogFile() { + file="$1" + rlLogInfo "Indented contents of $file:" + cat "$file" | while read -r line; do + rlLogInfo " $line" + done +} + +function rlAssertNotDifferAndLog() { + fst="$1" + snd="$2" + rlAssertNotDiffer "$fst" "$snd" + if [[ $? != 0 ]]; then + rlLogFile "$fst" + rlLogFile "$snd" + fi +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/test/cmdver/lmi/scripts/cmdver/__init__.py new/openlmi-tools-0.10.4/cli/test/cmdver/lmi/scripts/cmdver/__init__.py --- old/openlmi-tools-0.10.2/cli/test/cmdver/lmi/scripts/cmdver/__init__.py 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/test/cmdver/lmi/scripts/cmdver/__init__.py 2014-12-12 11:10:32.000000000 +0100 @@ -98,6 +98,20 @@ 'hostname' : PreHostnameInfo } +class HigherHwCmd(HwCmd): + """ + Hardware testing command for newer chassis (> 0.3.0). + + Usage: + %(cmd)s system + %(cmd)s hostname + """ + OWN_USAGE = True + COMMANDS = { + 'system' : SystemInfo, + 'hostname' : HostnameInfo + } + class NoHwRegistered(command.LmiLister): """ Hardware testing command. @@ -116,7 +130,8 @@ """ SELECT = ( ('OpenLMI-Hardware < 0.4.2', PreHwCmd), - ('OpenLMI-Hardware >= 0.4.2 & class LMI_Chassis == 0.3.0', HwCmd) + ('OpenLMI-Hardware >= 0.4.2 & class LMI_Chassis == 0.3.0', HwCmd), + ('OpenLMI-Hardware >= 0.4.2', HigherHwCmd), ) DEFAULT = NoHwRegistered diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/test/cmdver/setup.py new/openlmi-tools-0.10.4/cli/test/cmdver/setup.py --- old/openlmi-tools-0.10.2/cli/test/cmdver/setup.py 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/test/cmdver/setup.py 2014-12-12 11:10:32.000000000 +0100 @@ -30,7 +30,7 @@ 'Environment :: Console', ], - install_requires=['openlmi-scripts'], + install_requires=['openlmi-tools >= 0.9.1'], namespace_packages=['lmi', 'lmi.scripts'], packages=['lmi', 'lmi.scripts', 'lmi.scripts.cmdver'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/test/test_logging.sh new/openlmi-tools-0.10.4/cli/test/test_logging.sh --- old/openlmi-tools-0.10.2/cli/test/test_logging.sh 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/test/test_logging.sh 2014-12-12 11:10:32.000000000 +0100 @@ -52,6 +52,25 @@ OutputFile = %s " +temporary_files="" + +function mktempfile() { + result=`mktemp "$1"` + temporary_files="${temporary_files} $result" + echo $result +} + +function make_expected_stderr_output_from() { + original="$1" + expected=`mktempfile expected_stderrXXXX` + if using_lmiwbem; then + egrep -v "^(INFO:\s*)?Connected to " "$original" >$expected + else + cat "$original" >$expected + fi + echo $expected +} + rlJournalStart rlPhaseStartSetup @@ -73,23 +92,23 @@ LMICMD="$LMI -c logging/defaults.conf" - stdout=`mktemp stdoutXXXX` - stderr=`mktemp stderrXXXX` + stdout=`mktempfile stdoutXXXX` + stderr=`mktempfile stderrXXXX` rlRun "$LMICMD test log all >$stdout 2>$stderr" 0 - rlAssertNotDiffer logging/log_all_default.stdout $stdout - rlAssertNotDiffer logging/log_all_warn.stderr $stderr + rlAssertNotDifferAndLog logging/log_all_default.stdout $stdout + rlAssertNotDifferAndLog logging/log_all_warn.stderr $stderr rlRun "$LMICMD test log all --with-traceback >$stdout 2>$stderr" 0 - rlAssertNotDiffer logging/log_all_default.stdout $stdout - tmpout=`mktemp tmpoutXXXX` + rlAssertNotDifferAndLog logging/log_all_default.stdout $stdout + tmpout=`mktempfile tmpoutXXXX` grep '^\(warning\|error\|critical\)' $stderr > $tmpout - rlAssertNotDiffer logging/log_all_warn.stderr $tmpout + rlAssertNotDifferAndLog logging/log_all_warn.stderr $tmpout rlAssertEquals "Correct number of exceptions were raised" 3 \ `grep '^RuntimeError: S\*\*t happens!' $stderr | wc -l` rm $tmpout - expected_out=`mktemp expected_stdoutXXXX` - expected_err=`mktemp expected_stderrXXXX` + expected_out=`mktempfile expected_stdoutXXXX` + expected_err=`mktempfile expected_stderrXXXX` for verbosity in 0 1 2; do if [[ $verbosity -gt 0 ]]; then option=`printf -- "-v %.0s" $(seq $verbosity)` @@ -115,7 +134,7 @@ echo -n "Option \"$opt_name\" not handled in function"; \ echo ' "level", ignoring.'; \ done; \ - echo "Connected to $HOSTNAME"; \ + using_lmiwbem || echo "Connected to $HOSTNAME"; \ fi; \ if [ $(($verbosity + 2)) -ge $level ]; then \ if [ $level -lt 3 ]; then \ @@ -124,126 +143,144 @@ echo "This is $level_name message."; \ fi \ ) >$expected_err - rlAssertNotDiffer $expected_err $stderr + rlAssertNotDifferAndLog $expected_err $stderr + if [[ $? != 0 ]]; then + rlLogFile "$expected_err" + rlLogFile "$stderr" + fi rlAssertEquals "Nothing is written to stdout" 0 `cat $stdout | wc -c` done done - - rm $stdout $stderr $expected_out $expected_err - rlPhaseEnd rlPhaseStartTest rlLogInfo "Test logging with debug settings" - config_file=`mktemp configXXXX` - log_file=`mktemp log_fileXXXX` + config_file=`mktempfile configXXXX` + log_file=`mktempfile log_fileXXXX` printf "$DEBUG_CONFIG_TEMPLATE" $log_file >$config_file LMICMD="$LMI -c $config_file" - stdout=`mktemp stdoutXXXX` - stderr=`mktemp stderrXXXX` + stdout=`mktempfile stdoutXXXX` + stderr=`mktempfile stderrXXXX` filter_debug=" | grep -v '^Option' > $stderr" rlRun "$LMICMD test log all 2>&1 >$stdout $filter_debug" 0 - rlAssertNotDiffer logging/log_all_debug.stdout $stdout - rlAssertNotDiffer logging/log_all_debug.stderr $stderr + rlAssertNotDifferAndLog logging/log_all_debug.stdout $stdout + rlAssertNotDifferAndLog \ + `make_expected_stderr_output_from logging/log_all_debug.stderr` \ + $stderr cat $log_file | grep -v '^DEBUG: Option' >${log_file}.tmp mv ${log_file}{.tmp,} - rlAssertNotDiffer logging/log_all_debug.file $log_file + rlAssertNotDifferAndLog \ + `make_expected_stderr_output_from logging/log_all_debug.file` \ + $log_file rm $log_file rlRun "$LMICMD test log all --with-traceback 2>&1 >$stdout $filter_debug" 0 - rlAssertNotDiffer logging/log_all_debug.stdout $stdout - tmpout=`mktemp tmpoutXXXX` + rlAssertNotDifferAndLog logging/log_all_debug.stdout $stdout + tmpout=`mktempfile tmpoutXXXX` grep '^\(warning\|error\|critical\)' $stderr > $tmpout - rlAssertNotDiffer logging/log_all_warn.stderr $tmpout + rlAssertNotDifferAndLog \ + `make_expected_stderr_output_from logging/log_all_warn.stderr` \ + $tmpout rlAssertEquals "Correct number of exceptions were raised" 5 \ `grep '^RuntimeError: S\*\*t happens!' $stderr | wc -l` rlAssertEquals "Correct number of exceptions were raised" 5 \ `grep '^RuntimeError: S\*\*t happens!' $log_file | wc -l` - rm $tmpout $log_file + rm $log_file rlLogInfo "Try override log-file" - new_log_file=`mktemp new_log_fileXXXX` + new_log_file=`mktempfile new_log_fileXXXX` rlRun "$LMICMD --log-file $new_log_file test log all 2>&1 >$stdout $filter_debug" 0 - rlAssertNotDiffer logging/log_all_debug.stdout $stdout - rlAssertNotDiffer logging/log_all_debug.stderr $stderr + rlAssertNotDifferAndLog logging/log_all_debug.stdout $stdout + rlAssertNotDifferAndLog \ + `make_expected_stderr_output_from logging/log_all_debug.stderr` \ + $stderr cat $new_log_file | grep -v '^DEBUG: Option' >${new_log_file}.tmp mv ${new_log_file}{.tmp,} - rlAssertNotDiffer logging/log_all_debug.file $new_log_file + rlAssertNotDifferAndLog \ + `make_expected_stderr_output_from logging/log_all_debug.file` \ + $new_log_file rlRun "[ -e $log_file ]" 1 "Log file from config file shall not be written" - - [ -e $new_log_file ] && rm $new_log_file + + [ -e $new_log_file ] && rm ${new_log_file}.tmp [ -e $log_file ] && rm $log_file rlLogInfo "Try to disable logging to a file" rlRun "$LMICMD --log-file '' test log all 2>&1 >$stdout $filter_debug" 0 - rlAssertNotDiffer logging/log_all_debug.stdout $stdout - rlAssertNotDiffer logging/log_all_debug.stderr $stderr + rlAssertNotDifferAndLog logging/log_all_debug.stdout $stdout + rlAssertNotDifferAndLog \ + `make_expected_stderr_output_from logging/log_all_debug.stderr` \ + $stderr rlRun "[ -e $log_file ]" 1 "Log file from config file shall not be written" [ -e $log_file ] && rm $log_file rlLogInfo "Try override verbosity" rlRun "$LMICMD -q test log all 2>&1 >$stdout $filter_debug" 0 - rlAssertNotDiffer logging/log_all_silent.stdout $stdout - rlAssertNotDiffer logging/log_all_error.stderr $stderr + rlAssertNotDifferAndLog logging/log_all_silent.stdout $stdout + rlAssertNotDifferAndLog \ + `make_expected_stderr_output_from logging/log_all_error.stderr` \ + $stderr cat $log_file | grep -v '^DEBUG: Option' >${log_file}.tmp mv ${log_file}{.tmp,} - rlAssertNotDiffer logging/log_all_debug.file $log_file + rlAssertNotDifferAndLog \ + `make_expected_stderr_output_from logging/log_all_debug.file` \ + $log_file rm $log_file rlRun "$LMICMD -v test log all >$stdout 2>$stderr" 0 - rlAssertNotDiffer logging/log_all_info.stdout $stdout - rlAssertNotDiffer logging/log_all_info.stderr $stderr + rlAssertNotDifferAndLog logging/log_all_info.stdout $stdout + expected_err=`make_expected_stderr_output_from logging/log_all_info.stderr` + rlAssertNotDifferAndLog $expected_err $stderr cat $log_file | grep -v '^DEBUG: Option' >${log_file}.tmp mv ${log_file}{.tmp,} - rlAssertNotDiffer logging/log_all_debug.file $log_file + rlAssertNotDifferAndLog \ + `make_expected_stderr_output_from logging/log_all_debug.file` \ + $log_file rm $log_file rlLogInfo "Change file log level" sed -i 's/DEBUG/WARNING/' $config_file rlAssertGrep 'Level = WARNING' $config_file rlRun "$LMICMD test log all 2>&1 >$stdout $filter_debug" 0 - rlAssertNotDiffer logging/log_all_debug.stdout $stdout - rlAssertNotDiffer logging/log_all_debug.stderr $stderr - rlAssertNotDiffer logging/log_all_warn.file $log_file + rlAssertNotDifferAndLog logging/log_all_debug.stdout $stdout + rlAssertNotDifferAndLog \ + `make_expected_stderr_output_from logging/log_all_debug.stderr` \ + $stderr + rlAssertNotDifferAndLog logging/log_all_warn.file $log_file [ -e $log_file ] && rm $log_file rlLogInfo "Disable logging to console" sed -i 's/\(LogToConsole.*\)True/\1False/' $config_file rlAssertGrep 'LogToConsole = False' $config_file rlRun "$LMICMD test log all >$stdout 2>$stderr" 0 - rlAssertNotDiffer logging/log_all_debug.stdout $stdout + rlAssertNotDifferAndLog logging/log_all_debug.stdout $stdout rlAssertEquals "Nothing is written to stderr" `cat $stderr | wc -c` 0 - rlAssertNotDiffer logging/log_all_warn.file $log_file + rlAssertNotDifferAndLog logging/log_all_warn.file $log_file [ -e $log_file ] && rm $log_file rlLogInfo "Override tracing" rlRun "$LMICMD --notrace test log all >$stdout 2>$stderr" 0 - rlAssertNotDiffer logging/log_all_debug_notrace.stdout $stdout + rlAssertNotDifferAndLog logging/log_all_debug_notrace.stdout $stdout rlAssertEquals "Nothing is written to stderr" `cat $stderr | wc -c` 0 - rlAssertNotDiffer logging/log_all_warn.file $log_file - - for f in $log_file $new_log_file $config_file $stdout $stderr; do - [ -e $f ] && rm $f - done - + rlAssertNotDifferAndLog logging/log_all_warn.file $log_file rlPhaseEnd rlPhaseStartTest rlLogInfo "Test logging with settings" - stdout=`mktemp stdoutXXXX` - stderr=`mktemp stderrXXXX` + stdout=`mktempfile stdoutXXXX` + stderr=`mktempfile stderrXXXX` rlRun "$LMI -c logging/defaults.conf test log all >$stdout 2>$stderr" 0 - rlAssertNotDiffer $stdout logging/log_all_default.stdout - rlAssertNotDiffer $stderr logging/log_all_warn.stderr + rlAssertNotDifferAndLog $stdout logging/log_all_default.stdout + rlAssertNotDifferAndLog $stderr logging/log_all_warn.stderr rm $stdout $stderr rlPhaseEnd - rlPhaseStartCleanup rlLogInfo "Removing temporary python sandbox" rm -rf "$sandbox" + rlLogInfo "Removing temporary files" + rm $temporary_files 2>/dev/null rlPhaseEnd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/cli/test/test_versioning.sh new/openlmi-tools-0.10.4/cli/test/test_versioning.sh --- old/openlmi-tools-0.10.2/cli/test/test_versioning.sh 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/cli/test/test_versioning.sh 2014-12-12 11:10:32.000000000 +0100 @@ -139,28 +139,25 @@ rm $rlRun_LOG else - rlRun -s "$LMI help ver-hw" - rlAssertGrep "^Hardware testing command\.$" $rlRun_LOG - rlAssertGrep "^Usage:$" $rlRun_LOG - rlAssertGrep "^\s\+lmi ver-hw system$" $rlRun_LOG - rlAssertGrep "^\s\+lmi ver-hw hostname$" $rlRun_LOG - rm $rlRun_LOG - - rlRun -s "$LMI help ver hw" 0 - rlAssertGrep "^Hardware testing command.$" $rlRun_LOG - rlAssertGrep "^Usage:$" $rlRun_LOG - rlAssertGrep "^\s\+lmi ver hw system$" $rlRun_LOG - rlAssertGrep "^\s\+lmi ver hw hostname$" $rlRun_LOG - rm $rlRun_LOG + for args in "help ver-hw" "help ver hw" "help ver hw system"; do + rlRun -s "$LMI $args" 0 + if [[ `cmp2int $LMI_HARDWARE_PROVIDER_VERSION` -ge `cmp2int 0.6.0` ]]; then + rlAssertGrep "^Hardware testing command for newer chassis" $rlRun_LOG + else + rlAssertGrep "^Hardware testing command\.$" $rlRun_LOG + fi - rlRun -s "$LMI help ver hw system" 0 - rlAssertGrep "^Hardware testing command.$" $rlRun_LOG - rlAssertGrep "^Usage:$" $rlRun_LOG - rlAssertGrep "^\s\+lmi ver hw system$" $rlRun_LOG - rlAssertGrep "^\s\+lmi ver hw hostname$" $rlRun_LOG - rm $rlRun_LOG + rlAssertGrep "^Usage:$" $rlRun_LOG + if echo "$args" | grep -q "ver-hw"; then + rlAssertGrep "^\s\+lmi ver-hw system$" $rlRun_LOG + rlAssertGrep "^\s\+lmi ver-hw hostname$" $rlRun_LOG + else + rlAssertGrep "^\s\+lmi ver hw system$" $rlRun_LOG + rlAssertGrep "^\s\+lmi ver hw hostname$" $rlRun_LOG + fi + rm $rlRun_LOG + done fi - rlPhaseEnd rlPhaseStartTest @@ -185,7 +182,7 @@ else rlRun -s "$LMI ver-sw" - rlAssertGrep "Prov version.*${LMI_SOFTWARE_PROVIDER_VERSION} (DEVEL)" $rlRun_LOG + rlAssertGrep "Prov version.*[0-9.]\+ (DEVEL)" $rlRun_LOG rm $rlRun_LOG fi @@ -214,13 +211,8 @@ rlRun -s "$LMI ver-hw $cmd" rlAssertEquals "Printed table has just 2 rows" \ `cat $rlRun_LOG | wc -l` 2 - rlAssertGrep "^Prov version\s\+$LMI_SOFTWARE_PROVIDER_VERSION$ver_suffix\$" \ + rlAssertGrep "^Prov version\s\+$LMI_HARDWARE_PROVIDER_VERSION$ver_suffix\$" \ $rlRun_LOG - if [[ $cmd == system ]]; then - reg="^Chassis Type\s\+.*" - else - reg="^Hostname\s\+$HOSTNAME" $rlRun_LOG - fi rm $rlRun_LOG done fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/doc/Makefile new/openlmi-tools-0.10.4/doc/Makefile --- old/openlmi-tools-0.10.2/doc/Makefile 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/doc/Makefile 2014-12-12 11:10:32.000000000 +0100 @@ -5,13 +5,14 @@ SPHINXBUILD := sphinx-build PAPER = BUILDDIR ?= build +JUST_SCRIPTS ?= 0 WITH_COMMANDS ?= 0 ifneq ($(WITH_COMMANDS), 0) OPENLMI_SCRIPTS_DIR := $(abspath $(shell readlink openlmi-scripts)) endif export BUILDDIR := $(abspath $(BUILDDIR)) -export WITH_COMMANDS OPENLMI_SCRIPTS_DIR +export JUST_SCRIPTS WITH_COMMANDS OPENLMI_SCRIPTS_DIR # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/doc/src/Makefile new/openlmi-tools-0.10.4/doc/src/Makefile --- old/openlmi-tools-0.10.2/doc/src/Makefile 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/doc/src/Makefile 2014-12-12 11:10:32.000000000 +0100 @@ -5,16 +5,20 @@ SPHINXBUILD ?= sphinx-build SRCDIR ?= ../../cli PROJECTNAME := OpenLMITools +JUST_SCRIPTS ?= 0 WITH_COMMANDS ?= 0 ifeq ($(WITH_COMMANDS), 1) TAGS := $(TAGS) -t with-commands COMMANDS ?= $(notdir $(shell find $(OPENLMI_SCRIPTS_DIR)/commands -mindepth 1 \ -maxdepth 1 -type d | sort)) endif +ifeq ($(JUST_SCRIPTS), 1) + TAGS := $(TAGS) -t just-scripts +endif ALLSPHINXOPTS ?= -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . ALLSPHINXOPTS := $(TAGS) $(ALLSPHINXOPTS) -export WITH_COMMANDS OPENLMI_SCRIPTS_DIR COMMANDS +export JUST_SCRIPTS WITH_COMMANDS OPENLMI_SCRIPTS_DIR COMMANDS .PHONY: clean deps @@ -47,12 +51,16 @@ echo " :maxdepth: $$DEPTH"; \ echo ""; \ echo " metacommand-index"; \ + if [ "$JUST_SCRIPTS" != 0 ]; then \ echo " shell-index"; \ + fi; \ if [ "$*" == html -o "$*" == rtd ]; then \ echo " api"; \ fi; \ ) > toc.txt - if [[ "$*" =~ ^(html|rtd)$$ ]]; then \ + if [[ "$$JUST_SCRIPTS" == 1 ]]; then \ + ln -sf index-scripts.txt index.rst; \ + elif [[ "$*" =~ ^(html|rtd)$$ ]]; then \ ln -sf index-$*.txt index.rst; \ else \ ln -sf index-other.txt index.rst; \ @@ -65,6 +73,8 @@ @echo "Built subindexes for $* build." shell-index-%: + @echo "Making shell index for $* build." +ifeq ($(JUST_SCRIPTS), 0) ( \ case "$*" in \ html) DEPTH=1; ;; \ @@ -98,6 +108,7 @@ echo " shell/interactive_interface"; \ echo " shell/builtins"; \ ) > shell-index.rst +endif metacommand-index-man: @echo "Skipping metacommand documentation" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/doc/src/build-with-sphinx.sh new/openlmi-tools-0.10.4/doc/src/build-with-sphinx.sh --- old/openlmi-tools-0.10.2/doc/src/build-with-sphinx.sh 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/doc/src/build-with-sphinx.sh 2014-12-12 11:10:32.000000000 +0100 @@ -25,7 +25,10 @@ if [ "$WITH_COMMANDS" == 1 ]; then echo "Installing commands" pushd "$OPENLMI_SCRIPTS_DIR/commands" - find . -maxdepth 1 -mindepth 1 -type d | while read cmd; do + if [[ -z "$COMMANDS" ]]; then + COMMANDS=`find . -maxdepth 1 -mindepth 1 -type d | sort` + fi + for cmd in $COMMANDS; do pushd $cmd python setup.py develop --install-dir=$tmp popd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/doc/src/conf.py.skel new/openlmi-tools-0.10.4/doc/src/conf.py.skel --- old/openlmi-tools-0.10.2/doc/src/conf.py.skel 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/doc/src/conf.py.skel 2014-12-12 11:10:32.000000000 +0100 @@ -103,8 +103,16 @@ 'sphinx.ext.todo', 'sphinx.ext.viewcode'] -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +# Use local objects.inv for intersphinx, if available +local_inventory = None +path, filename = os.path.split(os.path.realpath(__file__)) +if os.path.isfile(path + "/objects.inv"): + local_inventory = path + "/objects.inv" +intersphinx_mapping = {'http://docs.openlmi.org/en/latest': local_inventory} + +if not tags.has('just-scripts'): + # Add any paths that contain templates here, relative to this directory. + templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -117,6 +125,8 @@ # General information about the project. project = 'OpenLMI Tools' +if tags.has('just-scripts'): + project = 'OpenLMI Scripts' copyright = '2012-2014, Red Hat Inc.' # The version info for the project you're documenting, acts as replacement for @@ -143,8 +153,10 @@ exclude_patterns = ['scripts/commands/**/index.rst'] if tags.has('man-build'): exclude_patterns.append('scripts') -elif tags.has('html-build'): +elif tags.has('html-build') and not tags.has('just-scripts'): exclude_patterns.append('shell/man_page.rst') +if tags.has('just-scripts'): + exclude_patterns.append('shell/*') # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None @@ -172,9 +184,17 @@ on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + try: + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + except ImportError: + if tags.has('just-scripts'): + # Fallback to openlmi theme if we build scripts doc for epel + html_theme = 'openlmitheme' + else: + # OpenLMI Tools shall have rtd theme + raise # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/doc/src/genapi.sh new/openlmi-tools-0.10.4/doc/src/genapi.sh --- old/openlmi-tools-0.10.2/doc/src/genapi.sh 2014-10-29 08:45:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/doc/src/genapi.sh 2014-12-12 11:10:32.000000000 +0100 @@ -6,6 +6,7 @@ DOCDIR=$TOPDIR/doc/src SRCDIR=$TOPDIR/cli/lmi WITH_COMMANDS=${WITH_COMMANDS:-0} +JUST_SCRIPTS=${JUST_SCRIPTS:-0} function get_modules() { pushd "$SRCDIR/$1" >/dev/null @@ -24,7 +25,9 @@ function get_version_string() { pushd $TOPDIR/cli >/dev/null - out=`python setup.py --version` + setup=setup.py + [ $JUST_SCRIPTS = 1 ] && setup=setup-scripts.py + out=`python $setup --version` git_version=`git describe HEAD 2>/dev/null` echo -n "\`\`$out\`\`" if [ -n "$git_version" ]; then @@ -37,13 +40,17 @@ cat $OPENLMI_SCRIPTS_DIR/VERSION 2>/dev/null } -for dir in shell scripts/common; do +declare -a gendirs +[ $JUST_SCRIPTS = 0 ] && gendirs+=("shell") +gendirs+=("scripts/common") +for dir in ${gendirs[@]}; do [ -e $DOCDIR/api/$dir ] || mkdir -p $DOCDIR/api/$dir [ -e $DOCDIR/api/$dir ] || mkdir -p $DOCDIR/api/$dir done # api.rst header -cat >$DOCDIR/api.rst <<_EOF_ +if [[ $JUST_SCRIPTS = 0 ]]; then + cat >$DOCDIR/api.rst <<_EOF_ OpenLMI Tools API reference =========================== @@ -61,6 +68,25 @@ api/shell api/scripts _EOF_ +else + cat >$DOCDIR/api.rst <<_EOF_ +OpenLMI Scripts API reference +============================= + +This is a generated documentation from *OpenLMI Scripts* sources. + +Generated from version: $(get_version_string) + +.. only:: html + + **Contents:** + +.. toctree:: + :maxdepth: 2 + + api/scripts +_EOF_ +fi cat >$DOCDIR/api/shell.rst <<_EOF_ LMIShell API reference @@ -134,24 +160,26 @@ _EOF_ -# Generate api/shell/*.rst -for module_path in `get_modules shell`; do - if [[ "$module_path" =~ ^compat ]]; then - continue - fi - module=`echo "$module_path" | get_module_name` - len=`echo $module | wc -c` - len=$(($len-1)) - underline="" - for i in `seq $len`; do underline="=$underline"; done - echo >>$DOCDIR/api/shell.rst " shell/$module" - cat >$DOCDIR/api/shell/${module}.rst <<-_EOF_ +if [[ $JUST_SCRIPTS = 0 ]]; then + # Generate api/shell/*.rst + for module_path in `get_modules shell`; do + if [[ "$module_path" =~ ^compat ]]; then + continue + fi + module=`echo "$module_path" | get_module_name` + len=`echo $module | wc -c` + len=$(($len-1)) + underline="" + for i in `seq $len`; do underline="=$underline"; done + echo >>$DOCDIR/api/shell.rst " shell/$module" + cat >$DOCDIR/api/shell/${module}.rst <<-_EOF_ $module $underline .. automodule:: lmi.shell.$module :members: _EOF_ -done + done +fi # Generate api/scripts/common/*.rst for module_path in `get_modules scripts/common`; do @@ -170,7 +198,7 @@ done # Add commands api reference to api/scripts.rst -if [ $WITH_COMMANDS = 1 ]; then +if [[ $WITH_COMMANDS = 1 ]]; then if [ -z "$COMMANDS" ]; then COMMANDS=`find $OPENLMI_SCRIPTS_DIR/commands \ -mindepth 1 -maxdepth 1 -type d | sort | xargs basename -a` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openlmi-tools-0.10.2/doc/src/index-scripts.txt new/openlmi-tools-0.10.4/doc/src/index-scripts.txt --- old/openlmi-tools-0.10.2/doc/src/index-scripts.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/openlmi-tools-0.10.4/doc/src/index-scripts.txt 2014-12-12 11:10:32.000000000 +0100 @@ -0,0 +1,15 @@ +OpenLMI Scripts documentation +============================= + +OpenLMI Scripts comproses 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. + +**Contents:** + +.. include:: toc.txt -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
