[node-patches] Change in ovirt-node[master]: ui: Add CPU details dialog

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 CPU details dialog
......................................................................

ui: Add CPU details dialog

Display CPU details in the dialog.

Change-Id: I110ba06a2d452fcd0f4780937e17986d3a9e3844
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/setup/status_page.py
M scripts/tui/src/ovirt/node/utils/system.py
2 files changed, 21 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/78/11478/1

diff --git a/scripts/tui/src/ovirt/node/setup/status_page.py b/scripts/tui/src/ovirt/node/setup/status_page.py
index f1dec6c..b67348b 100644
--- a/scripts/tui/src/ovirt/node/setup/status_page.py
+++ b/scripts/tui/src/ovirt/node/setup/status_page.py
@@ -102,8 +102,8 @@
 
                    ui.Row("row[1]",
                           [ui.Button("action.hostkey", "View Host Key"),
-                           ui.Button("action.cpu_features",
-                                     "View CPU Features"),
+                           ui.Button("action.cpu_details",
+                                     "View CPU Details"),
                            ]),
 
                    ui.Row("row[2]", action_widgets),
@@ -146,9 +146,9 @@
             self.logger.info("Showing hostkey")
             return HostkeyDialog("dialog.hostkey", "Host Key")
 
-        elif "action.cpu_features" in changes:
-            self.logger.info("Showing CPU features")
-            return CPUFeaturesDialog("dialog.cpu_features", "CPU Features")
+        elif "action.cpu_details" in changes:
+            self.logger.info("Showing CPU details")
+            return CPUFeaturesDialog("dialog.cpu_details", "CPU Details")
 
         elif "_save" in changes:
             self.widgets["dialog.hostkey"].close()
@@ -188,6 +188,6 @@
 class CPUFeaturesDialog(ui.Dialog):
     def __init__(self, path, title):
         super(CPUFeaturesDialog, self).__init__(path, title, [])
-        self.children = [ui.Label("label[0]", "TBD"),
+        self.children = [ui.Label("label[0]", utils.system.cpu_details()),
                          ]
         self.buttons = [ui.CloseButton("dialog.close")]
diff --git a/scripts/tui/src/ovirt/node/utils/system.py b/scripts/tui/src/ovirt/node/utils/system.py
index b8b59a2..afc7051 100644
--- a/scripts/tui/src/ovirt/node/utils/system.py
+++ b/scripts/tui/src/ovirt/node/utils/system.py
@@ -30,18 +30,33 @@
 
 
 def reboot():
+    """Reboot the system
+    """
     process.call("reboot")
 
 
 def poweroff():
+    """Poweroff the system
+    """
     process.call("poweroff")
 
 
 def is_efi():
+    """If the system is booted in (U)EFI mode
+    """
     return os.path.exists("/sys/firmware/efi")
 
 
+def cpu_details():
+    """Return details for the CPU of this machine, virt related
+    """
+    from ovirtnode.ovirtfunctions import cpu_details
+    return cpu_details
+
+
 class ProductInformation(base.Base):
+    """Return oVirt Node product informations
+    """
     _version_filename = "/files/etc/default/version"
     PRODUCT_SHORT = None
     VERSION = None


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

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