[node-patches] Change in ovirt-node[master]: Minor fix- and cleanups

fabiand at fedoraproject.org fabiand at fedoraproject.org
Tue Dec 11 20:09:42 UTC 2012


Fabian Deutsch has uploaded a new change for review.

Change subject: Minor fix- and cleanups
......................................................................

Minor fix- and cleanups

Change-Id: Idbb470612c3e6bb02711e808f5ed0446aedb6d56
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/base.py
M scripts/tui/src/ovirt/node/config/defaults.py
M scripts/tui/src/ovirt/node/plugins.py
M scripts/tui/src/ovirt/node/ui/tui.py
4 files changed, 16 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/60/9960/1

diff --git a/scripts/tui/src/ovirt/node/base.py b/scripts/tui/src/ovirt/node/base.py
index 4db8bac..355237b 100644
--- a/scripts/tui/src/ovirt/node/base.py
+++ b/scripts/tui/src/ovirt/node/base.py
@@ -94,6 +94,8 @@
             cb(self, userdata)
 
     class Signal(object):
+        """A convenience class for easier access to signals
+        """
         def __init__(self, base, name):
             self.name = name
             self.base = base
@@ -102,4 +104,4 @@
             return self.base.emit_signal(self.name, userdata)
 
         def connect(self, cb):
-            return self.base.connect_signal(self.name,cb)
\ No newline at end of file
+            return self.base.connect_signal(self.name, cb)
diff --git a/scripts/tui/src/ovirt/node/config/defaults.py b/scripts/tui/src/ovirt/node/config/defaults.py
index a382ed7..6031634 100644
--- a/scripts/tui/src/ovirt/node/config/defaults.py
+++ b/scripts/tui/src/ovirt/node/config/defaults.py
@@ -189,11 +189,11 @@
 
     def retrieve(self):
         """Returns the config keys of the current component
-        
+
         Returns:
             A dict with a mapping (arg, value).
-            arg corresponds to the named arguments of the subclass's configure()
-            method.
+            arg corresponds to the named arguments of the subclass's
+            configure() method.
         """
         func = self.update.wrapped_func
         varnames = func.func_code.co_varnames[1:]
@@ -275,9 +275,9 @@
     >>> n.clear()
     >>> data = sorted(n.retrieve().items())
     >>> data[:3]
-    [('bootproto', ''), ('gateway', ''), ('iface', '')]
+    [('bootproto', None), ('gateway', None), ('iface', None)]
     >>> data[3:]
-    [('ipaddr', ''), ('netmask', ''), ('vlanid', '')]
+    [('ipaddr', None), ('netmask', None), ('vlanid', None)]
     """
     keys = ("OVIRT_BOOTIF",
             "OVIRT_BOOTPROTO",
@@ -544,6 +544,13 @@
                 "OVIRT_KDUMP_LOCAL": "true" if local else None
                 }
 
+    def retrieve(self):
+        cfg = dict(NodeConfigFileSection.retrieve(self))
+        cfg.update({
+                "local": True if cfg["local"] == "true" else None
+                })
+        return cfg
+
     def transaction(self):
         cfg = dict(self.retrieve())
         nfs, ssh, restore = (cfg["nfs"], cfg["ssh"], cfg["local"])
diff --git a/scripts/tui/src/ovirt/node/plugins.py b/scripts/tui/src/ovirt/node/plugins.py
index ddca2a1..dbb113c 100644
--- a/scripts/tui/src/ovirt/node/plugins.py
+++ b/scripts/tui/src/ovirt/node/plugins.py
@@ -27,7 +27,6 @@
 import pkgutil
 
 
-
 def __walk_plugins(module):
     """Used to find all plugins
     """
diff --git a/scripts/tui/src/ovirt/node/ui/tui.py b/scripts/tui/src/ovirt/node/ui/tui.py
index 0fc6e91..43fc3b8 100644
--- a/scripts/tui/src/ovirt/node/ui/tui.py
+++ b/scripts/tui/src/ovirt/node/ui/tui.py
@@ -80,7 +80,7 @@
                ('plugin.widget.header', 'black, bold'),
                ('plugin.widget.divider', element_styles["text"]),
                ('plugin.widget.button', 'dark blue'),
-               ('plugin.widget.button.disabled', 'dark gray'),
+               ('plugin.widget.button.disabled', element_styles["disabled"]),
                ('plugin.widget.label', element_styles["text"]),
                ('plugin.widget.label.keyword', element_styles["label"]),
                ('plugin.widget.progressbar.box', 'light gray'),


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

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