[node-patches] Change in ovirt-node[master]: Add README to TUI sources

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Feb 6 09:44:27 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: Add README to TUI sources
......................................................................

Add README to TUI sources

Change-Id: Ibe30aa2ece178a76f5aa0a033ee1d28b875882ac
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
D scripts/tui/src/ovirt/node/CONCEPT
A scripts/tui/src/ovirt/node/README
2 files changed, 68 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/92/11792/1

diff --git a/scripts/tui/src/ovirt/node/CONCEPT b/scripts/tui/src/ovirt/node/CONCEPT
deleted file mode 100644
index 89da80e..0000000
--- a/scripts/tui/src/ovirt/node/CONCEPT
+++ /dev/null
@@ -1,23 +0,0 @@
-
-"Node Central" - How configuration changes are applied
-------------------------------------------------------
-The overall concept of the setup is to take UI data to update the
-/etc/default/ovirt file (through the classes in config/defaults.py) and to
-apply these changes using transactions (which can be retrieved using the
-transaction() methods).
-
-
-Paths
------
-
-config: This folder contains modules related to config files
-        E.g. the configured IPv4 Address, NTP server ...
-config/defaults.py: This module can be used to modify /etc/default/ovirt
-config/network.py: This module can be used to modify resolv.conf/ntp.conf ...
-
-utils: This folder contains classes which don't modify config files but provide
-       runtime-informations (e.g. current ip, storage devices)
-
-setup: Page-Plugins for the setup
-
-installer: Page-Plugins for the installer
\ No newline at end of file
diff --git a/scripts/tui/src/ovirt/node/README b/scripts/tui/src/ovirt/node/README
new file mode 100644
index 0000000..5aa3220
--- /dev/null
+++ b/scripts/tui/src/ovirt/node/README
@@ -0,0 +1,68 @@
+
+"Node Central" - How configuration changes are applied
+------------------------------------------------------
+The overall concept of the setup is to take UI data to update the
+/etc/default/ovirt file (through the classes in config/defaults.py) and to
+apply these changes using transactions (which can be retrieved using the
+transaction() methods).
+
+
+Paths
+-----
+
+config: This folder contains modules related to config files
+        E.g. the configured IPv4 Address, NTP server ...
+config/defaults.py: This module can be used to modify /etc/default/ovirt
+config/network.py: This module can be used to modify resolv.conf/ntp.conf ...
+
+utils: This folder contains classes which don't modify config files but provide
+       runtime-informations (e.g. current ip, storage devices)
+
+setup: Page-Plugins for the setup
+
+installer: Page-Plugins for the installer
+
+
+Why wrapping ovirtfunctions?
+----------------------------
+
+There are two main reasons why to wrap the functions from ovirtfunctions:
+Testing and (preparation for) Refactoring.
+
+ovirtfunctions is currently not checkable by pylint, pyflakes, or pep8,
+therefor utils/*.py should be written so cleanly that it is checkable. 
+Inline comments can be used in these clean files to suppress occssional
+problems (like an unresolved import, due to an invalid path or so), e.g. in the
+case of rhn.py file, which is in the wrong path (that means in a different
+(relative) path compared to their later runtime position).
+
+Another side effect of putting wrapping the code in utils/*.py is, that
+code-completion works quite well in eclipse - which shall help to write less
+erroneous code (so to prevent simple typos).
+
+Besides that, the wrapping can - and shall - be used to make parts of the code
+object-oriented, which is just a reorganisation of existing code into logical
+units. Tjis makes sense because our codebase covers a wide range of topics,
+and organizing helps newbies and to write unit tests.
+And last but not least the reorganization should be used to rmove some
+redundant bits.
+
+The advantages of clean code can be seen when you run
+
+  $ make check-local
+
+in the src/ directory.
+Which runs, pylint, pyflakes, pep8 and doctests.
+
+
+Where can I put $XYZ?
+---------------------
+
+utils/ should mainly contain functions or classes about runtime
+    informations.
+
+config/ should contain code which handles config files
+    (resolv.conf /etc/default/ovirt)
+
+(See also the beginning of this document)
+


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe30aa2ece178a76f5aa0a033ee1d28b875882ac
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