[node-patches] Change in ovirt-node[master]: ui: Add ovirt-node-doc

fabiand at fedoraproject.org fabiand at fedoraproject.org
Mon Jan 28 17:34:52 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: ui: Add ovirt-node-doc
......................................................................

ui: Add ovirt-node-doc

ovirt-node-doc allows easy acces to the python modules/packages related
to ovirt-node.

It can be called like:

$ ovirt-node-doc

to get a high level overview of the modules and packages.
To get more informations about e.g. the installer (whcih resides in the
installer package), the following cmdline can be used:

$ ovirt-node-doc installer

Change-Id: I7db3a965f9c2907c1b8b755b4dec830c4a019d6f
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/README
M scripts/tui/bin/ovirt-config-installer
M scripts/tui/bin/ovirt-config-setup
A scripts/tui/bin/ovirt-node-doc
M scripts/tui/src/ovirt/node/config/__init__.py
M scripts/tui/src/ovirt/node/config/defaults.py
6 files changed, 32 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/74/11474/1

diff --git a/scripts/tui/README b/scripts/tui/README
index 76b055d..5d62dfb 100644
--- a/scripts/tui/README
+++ b/scripts/tui/README
@@ -9,6 +9,20 @@
 $ PYTHONPATH=./src bash bin/ovirt-config-setup
 
 
+Documentation
+-------------
+The doctexts can be easily retrieved using pydoc, or ovirt-node-doc, a friendly
+wrapper to save a couple of characters.
+
+$ ovirt-node-doc
+$ ovirt-node-doc plugins
+
+is equal to
+
+$ pydoc ovirt.node.
+$ pydoc ovirt.node.plugins
+
+
 Features
 --------
 - Clean separation between UI and data
diff --git a/scripts/tui/bin/ovirt-config-installer b/scripts/tui/bin/ovirt-config-installer
index 7eb7e7f..19f5ece 100755
--- a/scripts/tui/bin/ovirt-config-installer
+++ b/scripts/tui/bin/ovirt-config-installer
@@ -1,4 +1,7 @@
 #!/bin/bash
+#
+# A wrapper to launch the TUI installer
+#
 
 reset
 
diff --git a/scripts/tui/bin/ovirt-config-setup b/scripts/tui/bin/ovirt-config-setup
index e235a5e..16e44f6 100755
--- a/scripts/tui/bin/ovirt-config-setup
+++ b/scripts/tui/bin/ovirt-config-setup
@@ -1,4 +1,7 @@
 #!/bin/bash
+#
+# A wrapper to launch the ovirt-node-setup (configuration) UI
+#
 
 reset
 
diff --git a/scripts/tui/bin/ovirt-node-doc b/scripts/tui/bin/ovirt-node-doc
new file mode 100644
index 0000000..de70809
--- /dev/null
+++ b/scripts/tui/bin/ovirt-node-doc
@@ -0,0 +1,6 @@
+#!/bin/bash
+#
+# A simple wrapper around pydoc to simply the retrieval of documentation
+#
+
+pydoc ovirt.node.$1
diff --git a/scripts/tui/src/ovirt/node/config/__init__.py b/scripts/tui/src/ovirt/node/config/__init__.py
index 2b9e7f9..e6590df 100644
--- a/scripts/tui/src/ovirt/node/config/__init__.py
+++ b/scripts/tui/src/ovirt/node/config/__init__.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """
-This package is expected to contain modules which handle locale config files.
+This package contains modules which provide interfaces to config files.
 
-All the informations provided by any module in this package must be derived
-from some file.
+Each interface - like a module or class - should be associated with some
+configuration file on the system.
 """
diff --git a/scripts/tui/src/ovirt/node/config/defaults.py b/scripts/tui/src/ovirt/node/config/defaults.py
index 7fa71ed..ebb20bc 100644
--- a/scripts/tui/src/ovirt/node/config/defaults.py
+++ b/scripts/tui/src/ovirt/node/config/defaults.py
@@ -154,6 +154,9 @@
 
 
 class ConfigFile(base.Base):
+    """ConfigFile is a specififc interface to some configuration file with a
+    specififc syntax
+    """
     def __init__(self, filename=None, provider_class=None):
         super(ConfigFile, self).__init__()
         filename = filename or OVIRT_NODE_DEFAULTS_FILENAME


--
To view, visit http://gerrit.ovirt.org/11474
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7db3a965f9c2907c1b8b755b4dec830c4a019d6f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list