createvm: Remove kernel/initrd/dtb/kernel args UI

Add an info message that these can be set via the
'Customize before install' option. Duplicating this doesn't add a ton
of value here IMO

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson
2020-01-26 09:38:22 -05:00
parent 0bf65e6ce8
commit f073ad6fb6
3 changed files with 20 additions and 205 deletions

View File

@@ -324,7 +324,8 @@ class NewVM(uiutils.UITestCase):
# Validate some initial defaults
newvm.find_fuzzy("Virt Type", "combo").click()
self.assertFalse(newvm.find_fuzzy("PXE", "radio").sensitive)
newvm.find_fuzzy("Import", "radio").click()
self.assertFalse(newvm.find_fuzzy("Local", "radio").sensitive)
newvm.find_fuzzy("vexpress-a15", "menu item")
newvm.find("virt", "menu item")
self.forward(newvm)
@@ -332,14 +333,8 @@ class NewVM(uiutils.UITestCase):
# Set the import media details
newvm.find_fuzzy(None,
"text", "existing storage").text = "/dev/default-pool/default-vol"
newvm.find_fuzzy(None,
"text", "Kernel path").text = "/tmp/kernel"
newvm.find_fuzzy(None,
"text", "Initrd").text = "/tmp/initrd"
newvm.find_fuzzy(None,
"text", "DTB").text = "/tmp/dtb"
newvm.find_fuzzy(None,
"text", "Kernel args").text = "console=ttyS0"
# Make sure the info box shows up
newvm.find("Kernel/initrd settings can be configured")
newvm.find("oslist-entry").text = "generic"
newvm.find("oslist-popover").find_fuzzy("generic").click()
self.forward(newvm, check=False)

View File

@@ -1030,7 +1030,7 @@ User shouldn't see this.</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">24</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox" id="vbox20">
<property name="visible">True</property>
@@ -1104,178 +1104,34 @@ User shouldn't see this.</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="kernel-box">
<object class="GtkBox" id="kernel-info-box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<property name="spacing">3</property>
<child>
<object class="GtkLabel" id="label38">
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_Kernel path:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">kernel</property>
<property name="stock">gtk-info</property>
<property name="icon_size">3</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label48">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_Initrd path:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">initrd</property>
<property name="label" translatable="yes">&lt;small&gt;Kernel/initrd settings can be configured with 'Customize before install' on the final page.&lt;/small&gt;</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label49">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_DTB path:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">dtb</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="kernel">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="initrd">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="dtb">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="kernel-browse">
<property name="label" translatable="yes">Br_owse...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_kernel_browse_clicked" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="kernel-browse-atkobject">
<property name="AtkObject::accessible-name">kernel-browse</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="initrd-browse">
<property name="label" translatable="yes">Bro_wse...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_initrd_browse_clicked" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="initrd-browse-atkobject">
<property name="AtkObject::accessible-name">initrd-browse</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="dtb-browse">
<property name="label" translatable="yes">Brow_se...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_dtb_browse_clicked" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="dtb-browse-atkobject">
<property name="AtkObject::accessible-name">dtb-browse</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="dtb-warn-virtio">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label51">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Kerne_l args:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">kernel-args</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="kernel-args">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>
<property name="width">2</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>

View File

@@ -175,10 +175,6 @@ class vmmCreateVM(vmmGObjectUI):
"on_install_detect_os_toggled": self._detect_os_toggled_cb,
"on_kernel_browse_clicked": self._browse_kernel,
"on_initrd_browse_clicked": self._browse_initrd,
"on_dtb_browse_clicked": self._browse_dtb,
"on_enable_storage_toggled": self._toggle_enable_storage,
"on_create_vm_name_changed": self._name_changed,
@@ -372,9 +368,6 @@ class vmmCreateVM(vmmGObjectUI):
# Install import
self.widget("install-import-entry").set_text("")
self.widget("kernel").set_text("")
self.widget("initrd").set_text("")
self.widget("dtb").set_text("")
# Install container app
self.widget("install-app-entry").set_text("/bin/sh")
@@ -503,11 +496,7 @@ class vmmCreateVM(vmmGObjectUI):
self.widget("virt-install-box").set_visible(
not is_container and not is_vz_container)
show_dtb = ("arm" in guest.os.arch or
"microblaze" in guest.os.arch or
"ppc" in guest.os.arch)
self.widget("kernel-box").set_visible(not installable_arch)
uiutil.set_grid_row_visible(self.widget("dtb"), show_dtb)
self.widget("kernel-info-box").set_visible(not installable_arch)
def _populate_conn_state(self):
"""
@@ -1196,12 +1185,6 @@ class vmmCreateVM(vmmGObjectUI):
def set_path(ignore, path):
self._mediacombo.set_path(path)
self._browse_file(None, cb=set_path, is_media=True)
def _browse_kernel(self, ignore):
self._browse_file("kernel")
def _browse_initrd(self, ignore):
self._browse_file("initrd")
def _browse_dtb(self, ignore):
self._browse_file("dtb")
# Storage page listeners
@@ -1603,25 +1586,6 @@ class vmmCreateVM(vmmGObjectUI):
return self.err.val_err(
_("Error setting install media location."), e)
# Setting kernel
if instmethod == INSTALL_PAGE_IMPORT:
kernel = self.widget("kernel").get_text() or None
kargs = self.widget("kernel-args").get_text() or None
initrd = self.widget("initrd").get_text() or None
dtb = self.widget("dtb").get_text() or None
if not self.widget("dtb").get_visible():
dtb = None
if not self.widget("kernel").get_visible():
kernel = None
initrd = None
kargs = None
self._guest.os.kernel = kernel
self._guest.os.initrd = initrd
self._guest.os.dtb = dtb
self._guest.os.kernel_args = kargs
try:
name = virtinst.Guest.generate_name(self._guest)
self.widget("create-vm-name").set_text(name)