addhardware: Remove IO and scsi reservation options
These were removed from the Details dialog previously, but I forgot to remove them from addhardware too Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
4cb775773f
commit
bd4b841b10
|
@ -243,30 +243,6 @@
|
|||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label-storage-io">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">_IO mode:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">storage-io</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="storage-io">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label-storage-discard">
|
||||
<property name="visible">True</property>
|
||||
|
@ -278,7 +254,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -288,7 +264,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -302,7 +278,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -312,33 +288,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</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>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -196,7 +196,6 @@ class vmmAddHardware(vmmGObjectUI):
|
|||
self.build_disk_bus_combo(self.vm, self.widget("storage-bustype"))
|
||||
self._build_disk_device_combo()
|
||||
self.build_disk_cache_combo(self.vm, self.widget("storage-cache"))
|
||||
self.build_disk_io_combo(self.vm, self.widget("storage-io"))
|
||||
self.build_disk_discard_combo(self.vm, self.widget("storage-discard"))
|
||||
self.build_disk_detect_zeroes_combo(self.vm,
|
||||
self.widget("storage-detect-zeroes"))
|
||||
|
@ -733,13 +732,6 @@ class vmmAddHardware(vmmGObjectUI):
|
|||
values.append([m, m])
|
||||
_build_combo(combo, values, sort=False)
|
||||
|
||||
@staticmethod
|
||||
def build_disk_io_combo(_vm, combo):
|
||||
values = [[None, _("Hypervisor default")]]
|
||||
for m in DeviceDisk.IO_MODES:
|
||||
values.append([m, m])
|
||||
_build_combo(combo, values, sort=False)
|
||||
|
||||
@staticmethod
|
||||
def build_disk_discard_combo(_vm, combo):
|
||||
values = [[None, _("Hypervisor default")]]
|
||||
|
@ -1140,11 +1132,6 @@ class vmmAddHardware(vmmGObjectUI):
|
|||
self.widget("storage-devtype"))
|
||||
self._refresh_disk_bus(devtype)
|
||||
|
||||
# Reset the status of disk-pr-checkbox to inactive
|
||||
self.widget("disk-pr-checkbox").set_active(False)
|
||||
is_lun = devtype == "lun"
|
||||
uiutil.set_grid_row_visible(self.widget("disk-pr-checkbox"), is_lun)
|
||||
|
||||
allow_create = devtype not in ["cdrom", "floppy"]
|
||||
self.addstorage.widget("storage-create-box").set_sensitive(
|
||||
allow_create)
|
||||
|
@ -1549,14 +1536,10 @@ class vmmAddHardware(vmmGObjectUI):
|
|||
self.widget("storage-devtype"))
|
||||
cache = uiutil.get_list_selection(
|
||||
self.widget("storage-cache"))
|
||||
io = uiutil.get_list_selection(
|
||||
self.widget("storage-io"))
|
||||
discard = uiutil.get_list_selection(
|
||||
self.widget("storage-discard"))
|
||||
detect_zeroes = uiutil.get_list_selection(
|
||||
self.widget("storage-detect-zeroes"))
|
||||
if device == "lun":
|
||||
reservations_managed = self.widget("disk-pr-checkbox").get_active()
|
||||
|
||||
controller_model = None
|
||||
if (bus == "scsi" and
|
||||
|
@ -1572,14 +1555,10 @@ class vmmAddHardware(vmmGObjectUI):
|
|||
disk.bus = bus
|
||||
if cache:
|
||||
disk.driver_cache = cache
|
||||
if io:
|
||||
disk.driver_io = io
|
||||
if discard:
|
||||
disk.driver_discard = discard
|
||||
if detect_zeroes:
|
||||
disk.driver_detect_zeroes = detect_zeroes
|
||||
if device == "lun" and reservations_managed:
|
||||
disk.reservations_managed = "yes"
|
||||
|
||||
# Generate target
|
||||
disks = (self.vm.xmlobj.devices.disk +
|
||||
|
|
|
@ -78,7 +78,7 @@ class DeviceDisk(Device):
|
|||
|
||||
IO_MODE_NATIVE = "native"
|
||||
IO_MODE_THREADS = "threads"
|
||||
IO_MODES = [IO_MODE_NATIVE, IO_MODE_THREADS]
|
||||
|
||||
|
||||
@staticmethod
|
||||
def path_definitely_exists(conn, path):
|
||||
|
|
Loading…
Reference in New Issue