diff options
author | Michal Minar <miminar@redhat.com> | 2013-09-20 14:45:11 +0200 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2013-09-21 14:11:10 +0200 |
commit | cb3d30258d54e1c0f038009cfad51db007dfc5f9 (patch) | |
tree | 0786aaa6d612aa7914063f321ff3160ce79dabf4 /doc | |
parent | ac5e57f2918e523c2c72303e01d130d56217f495 (diff) | |
download | openlmi-scripts-cb3d30258d54e1c0f038009cfad51db007dfc5f9.tar.gz openlmi-scripts-cb3d30258d54e1c0f038009cfad51db007dfc5f9.tar.xz openlmi-scripts-cb3d30258d54e1c0f038009cfad51db007dfc5f9.zip |
refactored commands
lmi.scripts.common.command subpackage refactored to make it nicely
browseable.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/command-classes.rst | 14 | ||||
-rw-r--r-- | doc/command-properties.rst | 14 | ||||
-rw-r--r-- | doc/script-development.rst | 3 |
3 files changed, 16 insertions, 15 deletions
diff --git a/doc/command-classes.rst b/doc/command-classes.rst index 82dbe03..c08e936 100644 --- a/doc/command-classes.rst +++ b/doc/command-classes.rst @@ -46,7 +46,7 @@ methods: .. seealso:: API doccumentation on - :py:meth:`lmi.scripts.common.command.command.LmiEndPointCommand.verify_options` + :py:meth:`~lmi.scripts.common.command.endpoint.LmiEndPointCommand.verify_options` ``transform_options(self, options)`` Takes verified options dictionary. It modifies this dictionary in @@ -66,12 +66,12 @@ methods: .. seealso:: API documentation on - :py:meth:`lmi.scripts.common.command.command.LmiEndPointCommand.transform_options` + :py:meth:`~lmi.scripts.common.command.endpoint.LmiEndPointCommand.transform_options` Above methods can be used to process options in a way that any script library function can be called. In case we need more control over what is called or when we want to decide at runtime which function shall be called, we may override -:py:meth:`lmi.scripts.common.command.command.LmiEndPointCommand.execute` method +:py:meth:`~lmi.scripts.common.command.endpoint.LmiEndPointCommand.execute` method instead. Example of this may be found at :ref:`associating_a_function`. .. _lmi_check_result: @@ -90,7 +90,7 @@ Its specific properties are listed in :ref:`lmi_check_result_properties`. .. seealso:: API documentation on - :py:class:`lmi.scripts.common.command.command.LmiCheckResult` + :py:class:`~lmi.scripts.common.command.checkresult.LmiCheckResult` .. _lmi_lister: @@ -114,7 +114,7 @@ Where ``columns`` has the same meaning as ``COLUMNS`` as a class property and .. seealso:: API documentation on - :py:class:`lmi.scripts.common.command.command.LmiLister` + :py:class:`~lmi.scripts.common.command.lister.LmiLister` .. _lmi_instance_lister: @@ -135,7 +135,7 @@ Again, usage of generators is preferred. .. seealso:: API documentation on - :py:class:`lmi.scripts.common.command.command.LmiInstanceLister` + :py:class:`~lmi.scripts.common.command.lister.LmiInstanceLister` .. _lmi_show_instance: @@ -148,7 +148,7 @@ way as for ``LmiInstanceLister`` (see :ref:`lmi_show_instance_properties`). .. seealso:: API documentation on - :py:class:`lmi.scripts.common.command.command.LmiShowInstance` + :py:class:`lmi.scripts.common.command.show.LmiShowInstance` .. **************************************************************************** diff --git a/doc/command-properties.rst b/doc/command-properties.rst index bc13e5a..daf95b1 100644 --- a/doc/command-properties.rst +++ b/doc/command-properties.rst @@ -139,7 +139,7 @@ Influencing properties: * ``CALLABLE`` (callable_) When command is invoked, its method -:py:meth:`lmi.scripts.common.command.command.LmiEndPointCommand.execute` will +:py:meth:`lmi.scripts.common.command.endpoint.LmiEndPointCommand.execute` will get verified and transformed options as positional and keyword arguments. This method shall pass them to an associated function residing in script library and return its result on completition. @@ -172,7 +172,7 @@ Property descriptions ``CALLABLE`` : ``str`` (defaults to ``None``) This is a mandatory option if - :py:meth:`lmi.scripts.common.command.command.LmiEndPointCommand.execute` + :py:meth:`lmi.scripts.common.command.endpoint.LmiEndPointCommand.execute` method is not overriden. It may be a string composed of a full path of module and its callable delimited with ``':'``: :: @@ -254,7 +254,7 @@ them. subclasses. Documentation string must be parseable with docopt_. ``COMMANDS`` property will be translated to - :py:meth:`lmi.scripts.common.command.command.LmiCommandMultiplexer.child_commands` + :py:meth:`lmi.scripts.common.command.multiplexer.LmiCommandMultiplexer.child_commands` class method by :py:class:`lmi.scripts.common.command.meta.MultiplexerMetaClass`. @@ -269,7 +269,7 @@ them. shall then contain the same number of items as this tuple. If omitted, associated function is expected to provide them in the first row of returned list. It's translated to - :py:meth:`lmi.scripts.common.command.command.LmiBaseListerCommand.get_columns` + :py:meth:`~lmi.scripts.common.command.lister.LmiBaseListerCommand.get_columns` class method. .. _lmi_instance_commands_properties: @@ -333,8 +333,8 @@ are rendered. Otherwise, only the ``data`` is expected. .. note:: - Both :py:class:`lmi.scripts.common.command.command.LmiShowInstance` - and :py:class:`lmi.scripts.common.command.command.LmiInstanceLister` + Both :py:class:`lmi.scripts.common.command.show.LmiShowInstance` + and :py:class:`lmi.scripts.common.command.lister.LmiInstanceLister` expect different ``data`` to be returned. See :ref:`lmi_show_instance` and :ref:`lmi_instance_lister` for more information. @@ -368,7 +368,7 @@ definition of ``check_result()`` method. 1. options - Dictionary with parsed command line options returned by docopt_ after being processed by - :py:meth:`lmi.scripts.common.command.command.LmiEndPointCommand.transform_options`. + :py:meth:`lmi.scripts.common.command.endpoint.LmiEndPointCommand.transform_options`. 2. result - Return value of associated function. .. seealso:: diff --git a/doc/script-development.rst b/doc/script-development.rst index 02fc540..1540923 100644 --- a/doc/script-development.rst +++ b/doc/script-development.rst @@ -286,7 +286,8 @@ under particular *wish* like this: * ``sw show package`` To reflect it in our commands definition hierarchy, we need to use -:py:class:`lmi.scripts.common.command.command.LmiCommandMultiplexer` command. +:py:class:`~lmi.scripts.common.command.multiplexer.LmiCommandMultiplexer` +command. :: |