[node-patches] Change in ovirt-node[master]: remove extra diagnostics page missed in initial move
mburns at redhat.com
mburns at redhat.com
Thu May 30 18:52:28 UTC 2013
Michael Burns has uploaded a new change for review.
Change subject: remove extra diagnostics page missed in initial move
......................................................................
remove extra diagnostics page missed in initial move
Change-Id: I9ea1d7059ca124a056bef1285a130de68cced8ab
Signed-off-by: Mike Burns <mburns at redhat.com>
---
D scripts/tui/src/ovirt/node/setup/diagnostic_page.py
1 file changed, 0 insertions(+), 92 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/36/15236/1
diff --git a/scripts/tui/src/ovirt/node/setup/diagnostic_page.py b/scripts/tui/src/ovirt/node/setup/diagnostic_page.py
deleted file mode 100644
index ab02ca2..0000000
--- a/scripts/tui/src/ovirt/node/setup/diagnostic_page.py
+++ /dev/null
@@ -1,92 +0,0 @@
-# -*- coding: utf-8 *-*
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-#
-# kdump_page.py - Copyright (C) 2012 Red Hat, Inc.
-# Written by Fabian Deutsch <fabiand at redhat.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA 02110-1301, USA. A copy of the GNU General Public License is
-# also available at http://www.gnu.org/copyleft/gpl.html.
-
-"""
-Diagnostics page
-"""
-
-from ovirt.node import plugins, ui
-
-
-class Plugin(plugins.NodePlugin):
-
- def name(self):
- return "Diagnostics"
-
- def rank(self):
- return 95
-
- def model(self):
- """Don't need to set up anything"""
- return {}
-
- def validators(self):
- """Validators validate the input on change and give UI feedback
- """
- return {}
-
- def ui_content(self):
- """Describes the UI this plugin requires
- This is an ordered list of (path, widget) tuples.
- """
- ws = [ui.Header("diagnostic._header", "Diagnostic Utilities"),
- ui.Label("diagnostic.info", "Select one of the tools below. \n" +
- "Press 'q' to quit when viewing output"),
- ui.Divider("diagnostic.divider"),
- ui.Table("diagnostic.tools", "", "Available diagnostics",
- self.__diagnostics(), height=min(
- len(self.__diagnostics()), 4)),
- ]
-
- page = ui.Page("page", ws)
- self.widgets.add(page)
- return page
-
- def on_change(self, changes):
- pass
-
- def on_merge(self, changes):
- if changes.contains_any(["diagnostic.logfiles", "diagnostic.tools"]):
- cmds = {}
- changed_field = changes.keys()[0]
- if "diagnostic.tools" in changed_field:
- cmds = dict((name, cmd) for (name, cmd)
- in self.__diagnostics())
- cmd = cmds.get(changes[changed_field], None)
- if cmd:
- return OutputDialog("output.dialog", "Command Output", cmd)
-
- def __diagnostics(self):
- return [("multipath", "multipath -ll"),
- ("fdisk", "fdisk -l"),
- ("parted", "parted -l")]
-
-
-class OutputDialog(ui.Dialog):
-
- def __init__(self, path, title, cmd):
- from ovirt.node.utils import process
- super(OutputDialog, self).__init__(path, title, [])
- output = process.check_output(cmd)
- self.children = [ui.Table("output[0]", "", cmd,
- output, height=10)]
- self.buttons = [ui.CloseButton("dialog.close")]
--
To view, visit http://gerrit.ovirt.org/15236
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ea1d7059ca124a056bef1285a130de68cced8ab
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>
More information about the node-patches
mailing list