details: Remove iotune UI

This is a little low level and rarely used IMO to have it in the UI.
If people want to edit this we should point them at virt-xml which
seems like the appropriate user friendlyness for this feature.
This commit is contained in:
Cole Robinson 2015-09-13 15:54:47 -04:00
parent 15a6a7e210
commit 4b5e65fe8d
3 changed files with 1 additions and 312 deletions

View File

@ -3985,222 +3985,6 @@ if you know what you are doing.&lt;/small&gt;</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="iotune-expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkGrid" id="table20">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="row_spacing">3</property>
<property name="column_spacing">8</property>
<child>
<object class="GtkLabel" id="label80">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Re_ad:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">disk-iotune-rbs</property>
<property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label84">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xpad">2</property>
<property name="use_underline">True</property>
<property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label86">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">KiBytes/Sec</property>
<property name="use_underline">True</property>
<property name="max_width_chars">20</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label87">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">IOPS/Sec</property>
<property name="use_underline">True</property>
<property name="max_width_chars">20</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="disk-iotune-rbs">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">16</property>
<property name="adjustment">adjustment8</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
<signal name="changed" handler="on_disk_iotune_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="disk-iotune-ris">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">16</property>
<property name="adjustment">adjustment9</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
<signal name="changed" handler="on_disk_iotune_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="disk-iotune-wbs">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">16</property>
<property name="adjustment">adjustment10</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
<signal name="changed" handler="on_disk_iotune_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="disk-iotune-wis">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">16</property>
<property name="adjustment">adjustment11</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
<signal name="changed" handler="on_disk_iotune_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="disk-iotune-tbs">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">16</property>
<property name="adjustment">adjustment12</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
<signal name="changed" handler="on_disk_iotune_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="disk-iotune-tis">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">16</property>
<property name="adjustment">adjustment13</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
<signal name="changed" handler="on_disk_iotune_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label85">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Total_:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">disk-iotune-tbs</property>
<property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label82">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Write:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">disk-iotune-wbs</property>
<property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label83">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">IO Tu_ning</property>
<property name="use_underline">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child type="label">

View File

@ -74,7 +74,6 @@ EDIT_DISK_IO,
EDIT_DISK_BUS,
EDIT_DISK_SERIAL,
EDIT_DISK_FORMAT,
EDIT_DISK_IOTUNE,
EDIT_DISK_SGIO,
EDIT_SOUND_MODEL,
@ -106,7 +105,7 @@ EDIT_FS,
EDIT_HOSTDEV_ROMBAR,
) = range(1, 47)
) = range(1, 46)
# Columns in hw list model
@ -500,7 +499,6 @@ class vmmDetails(vmmGObjectUI):
"on_disk_bus_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_BUS),
"on_disk_format_changed": self.disk_format_changed,
"on_disk_serial_changed": lambda *x: self.enable_apply(x, EDIT_DISK_SERIAL),
"on_disk_iotune_changed": self.iotune_changed,
"on_disk_sgio_entry_changed": lambda *x: self.enable_apply(x, EDIT_DISK_SGIO),
"on_network_model_combo_changed": lambda *x: self.enable_apply(x, EDIT_NET_MODEL),
@ -988,10 +986,6 @@ class vmmDetails(vmmGObjectUI):
disk_bus = self.widget("disk-bus")
vmmAddHardware.build_disk_bus_combo(self.vm, disk_bus)
# Disk iotune expander
if not (self.conn.is_qemu() or self.conn.is_test_conn()):
self.widget("iotune-expander").set_visible(False)
# Network model
net_model = self.widget("network-model")
vmmAddHardware.build_network_model_combo(self.vm, net_model)
@ -1792,53 +1786,6 @@ class vmmDetails(vmmGObjectUI):
self.widget("disk-format-warn").show()
self.enable_apply(EDIT_DISK_FORMAT)
# IO Tuning
def iotune_changed(self, ignore):
iotune_rbs = int(self.get_text("disk-iotune-rbs") or 0)
iotune_ris = int(self.get_text("disk-iotune-ris") or 0)
iotune_tbs = int(self.get_text("disk-iotune-tbs") or 0)
iotune_tis = int(self.get_text("disk-iotune-tis") or 0)
iotune_wbs = int(self.get_text("disk-iotune-wbs") or 0)
iotune_wis = int(self.get_text("disk-iotune-wis") or 0)
# libvirt doesn't support having read/write settings along side total
# settings, so disable the widgets accordingly.
have_rw_bytes = (iotune_rbs > 0 or
iotune_wbs > 0)
have_t_bytes = (not have_rw_bytes and iotune_tbs > 0)
self.widget("disk-iotune-rbs").set_sensitive(have_rw_bytes or not
have_t_bytes)
self.widget("disk-iotune-wbs").set_sensitive(have_rw_bytes or not
have_t_bytes)
self.widget("disk-iotune-tbs").set_sensitive(have_t_bytes or not
have_rw_bytes)
if have_rw_bytes:
self.widget("disk-iotune-tbs").set_value(0)
elif have_t_bytes:
self.widget("disk-iotune-rbs").set_value(0)
self.widget("disk-iotune-wbs").set_value(0)
have_rw_iops = (iotune_ris > 0 or iotune_wis > 0)
have_t_iops = (not have_rw_iops and iotune_tis > 0)
self.widget("disk-iotune-ris").set_sensitive(have_rw_iops or not
have_t_iops)
self.widget("disk-iotune-wis").set_sensitive(have_rw_iops or not
have_t_iops)
self.widget("disk-iotune-tis").set_sensitive(have_t_iops or not
have_rw_iops)
if have_rw_iops:
self.widget("disk-iotune-tis").set_value(0)
elif have_t_iops:
self.widget("disk-iotune-ris").set_value(0)
self.widget("disk-iotune-wis").set_value(0)
self.enable_apply(EDIT_DISK_IOTUNE)
# CDROM Eject/Connect
def _change_storage_media(self, devobj, newpath):
@ -2141,20 +2088,6 @@ class vmmDetails(vmmGObjectUI):
sgio = uiutil.get_list_selection(self.widget("disk-sgio"))
kwargs["sgio"] = sgio
if self.edited(EDIT_DISK_IOTUNE):
kwargs["iotune_rbs"] = int(
self.widget("disk-iotune-rbs").get_value() * 1024)
kwargs["iotune_ris"] = int(
self.widget("disk-iotune-ris").get_value())
kwargs["iotune_tbs"] = int(
self.widget("disk-iotune-tbs").get_value() * 1024)
kwargs["iotune_tis"] = int(
self.widget("disk-iotune-tis").get_value())
kwargs["iotune_wbs"] = int(
self.widget("disk-iotune-wbs").get_value() * 1024)
kwargs["iotune_wis"] = int(
self.widget("disk-iotune-wis").get_value())
if self.edited(EDIT_DISK_BUS):
bus = uiutil.get_list_selection(self.widget("disk-bus"))
addr = None
@ -2641,13 +2574,6 @@ class vmmDetails(vmmGObjectUI):
driver_type = disk.driver_type or ""
serial = disk.serial
iotune_rbs = (disk.iotune_rbs or 0) / 1024
iotune_ris = (disk.iotune_ris or 0)
iotune_tbs = (disk.iotune_tbs or 0) / 1024
iotune_tis = (disk.iotune_tis or 0)
iotune_wbs = (disk.iotune_wbs or 0) / 1024
iotune_wis = (disk.iotune_wis or 0)
show_format = (not self.is_customize_dialog or
virtinst.VirtualDisk.path_definitely_exists(
disk.conn, disk.path))
@ -2701,13 +2627,6 @@ class vmmDetails(vmmGObjectUI):
uiutil.set_list_selection(self.widget("disk-bus"), bus)
self.widget("disk-serial").set_text(serial or "")
self.widget("disk-iotune-rbs").set_value(iotune_rbs)
self.widget("disk-iotune-ris").set_value(iotune_ris)
self.widget("disk-iotune-tbs").set_value(iotune_tbs)
self.widget("disk-iotune-tis").set_value(iotune_tis)
self.widget("disk-iotune-wbs").set_value(iotune_wbs)
self.widget("disk-iotune-wis").set_value(iotune_wis)
button = self.widget("config-cdrom-connect")
if is_cdrom or is_floppy:
if not path:

View File

@ -714,8 +714,6 @@ class vmmDomain(vmmLibvirtObject):
path=_SENTINEL, readonly=_SENTINEL, serial=_SENTINEL,
shareable=_SENTINEL, removable=_SENTINEL, cache=_SENTINEL,
io=_SENTINEL, driver_type=_SENTINEL, bus=_SENTINEL, addrstr=_SENTINEL,
iotune_rbs=_SENTINEL, iotune_ris=_SENTINEL, iotune_tbs=_SENTINEL,
iotune_tis=_SENTINEL, iotune_wbs=_SENTINEL, iotune_wis=_SENTINEL,
sgio=_SENTINEL):
xmlobj = self._make_xmlobj_to_define()
editdev = self._lookup_device_to_define(xmlobj, devobj, do_hotplug)
@ -769,18 +767,6 @@ class vmmDomain(vmmLibvirtObject):
if serial != _SENTINEL:
editdev.serial = serial or None
if iotune_rbs != _SENTINEL:
editdev.iotune_rbs = iotune_rbs
if iotune_ris != _SENTINEL:
editdev.iotune_ris = iotune_ris
if iotune_tbs != _SENTINEL:
editdev.iotune_tbs = iotune_tbs
if iotune_tis != _SENTINEL:
editdev.iotune_tis = iotune_tis
if iotune_wbs != _SENTINEL:
editdev.iotune_wbs = iotune_wbs
if iotune_wis != _SENTINEL:
editdev.iotune_wis = iotune_wis
if sgio != _SENTINEL:
editdev.sgio = sgio or None