mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virtManager: Remove disk SCSI reservations UI
This is another advanced feature with a limited appeal. Users that know they need this can set it directly with the XML editor Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
@@ -3077,33 +3077,6 @@
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="disk-pr-label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes">Persistent _Reservations:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">disk-pr-checkbox</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="disk-pr-checkbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<signal name="toggled" handler="on_disk_pr_checkbox_toggled" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
||||
@@ -63,7 +63,6 @@ from ..xmleditor import vmmXMLEditor
|
||||
EDIT_DISK_DETECT_ZEROES,
|
||||
EDIT_DISK_BUS,
|
||||
EDIT_DISK_PATH,
|
||||
EDIT_DISK_PR,
|
||||
|
||||
EDIT_SOUND_MODEL,
|
||||
|
||||
@@ -99,7 +98,7 @@ from ..xmleditor import vmmXMLEditor
|
||||
|
||||
EDIT_FS,
|
||||
|
||||
EDIT_HOSTDEV_ROMBAR) = range(1, 54)
|
||||
EDIT_HOSTDEV_ROMBAR) = range(1, 53)
|
||||
|
||||
|
||||
# Columns in hw list model
|
||||
@@ -499,7 +498,6 @@ class vmmDetails(vmmGObjectUI):
|
||||
"on_disk_discard_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_DISCARD),
|
||||
"on_disk_detect_zeroes_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_DETECT_ZEROES),
|
||||
"on_disk_bus_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_BUS),
|
||||
"on_disk_pr_checkbox_toggled": lambda *x: self.enable_apply(x, EDIT_DISK_PR),
|
||||
|
||||
"on_network_model_combo_changed": lambda *x: self.enable_apply(x, EDIT_NET_MODEL),
|
||||
"on_network_mac_entry_changed": lambda *x: self.enable_apply(x,
|
||||
@@ -1721,9 +1719,6 @@ class vmmDetails(vmmGObjectUI):
|
||||
kwargs["detect_zeroes"] = uiutil.get_list_selection(
|
||||
self.widget("disk-detect-zeroes"))
|
||||
|
||||
if self.edited(EDIT_DISK_PR):
|
||||
kwargs["managed_pr"] = self.widget("disk-pr-checkbox").get_active()
|
||||
|
||||
if self.edited(EDIT_DISK_BUS):
|
||||
bus = uiutil.get_list_selection(self.widget("disk-bus"))
|
||||
addr = None
|
||||
@@ -2267,12 +2262,6 @@ class vmmDetails(vmmGObjectUI):
|
||||
uiutil.set_grid_row_visible(self.widget("disk-removable"),
|
||||
can_set_removable)
|
||||
|
||||
is_lun = disk.device == virtinst.DeviceDisk.DEVICE_LUN
|
||||
uiutil.set_grid_row_visible(self.widget("disk-pr-checkbox"), is_lun)
|
||||
if is_lun:
|
||||
managed = disk.reservations_managed == "yes"
|
||||
self.widget("disk-pr-checkbox").set_active(managed)
|
||||
|
||||
self.widget("disk-size").set_text(size)
|
||||
uiutil.set_list_selection(self.widget("disk-cache"), cache)
|
||||
uiutil.set_list_selection(self.widget("disk-io"), io)
|
||||
|
||||
@@ -658,8 +658,7 @@ class vmmDomain(vmmLibvirtObject):
|
||||
path=_SENTINEL, readonly=_SENTINEL,
|
||||
shareable=_SENTINEL, removable=_SENTINEL, cache=_SENTINEL,
|
||||
io=_SENTINEL, discard=_SENTINEL, detect_zeroes=_SENTINEL,
|
||||
bus=_SENTINEL, addrstr=_SENTINEL,
|
||||
managed_pr=_SENTINEL):
|
||||
bus=_SENTINEL, addrstr=_SENTINEL):
|
||||
xmlobj = self._make_xmlobj_to_define()
|
||||
editdev = self._lookup_device_to_define(xmlobj, devobj, do_hotplug)
|
||||
if not editdev:
|
||||
@@ -712,9 +711,6 @@ class vmmDomain(vmmLibvirtObject):
|
||||
if detect_zeroes != _SENTINEL:
|
||||
editdev.driver_detect_zeroes = detect_zeroes or None
|
||||
|
||||
if managed_pr != _SENTINEL:
|
||||
editdev.reservations_managed = "yes" if managed_pr else None
|
||||
|
||||
if bus != _SENTINEL:
|
||||
_change_bus()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user