[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [et-mgmt-tools] [PATCH] virt-manager: network devices vs qemu:///session



Hi,
the attached patch is a follow up. It replaces comparisions to
qemu:///session with is_qemu_session - just cosmetics so we have all the
logic in one place.
 -- Guido
# HG changeset patch
# User "Guido Günther <agx sigxcpu org>"
# Date 1222334680 -7200
# Node ID 25a890e5c8f76f9244b675922cdecba878b1123f
# Parent  77917c65d1ee82816544954e087d3e1a5c464998
more qemu:///session cleanup

diff -r 77917c65d1ee -r 25a890e5c8f7 src/virtManager/create.py
--- a/src/virtManager/create.py	Thu Sep 25 11:19:26 2008 +0200
+++ b/src/virtManager/create.py	Thu Sep 25 11:24:40 2008 +0200
@@ -317,7 +317,7 @@
                 notebook.set_current_page(PAGE_DISK)
         elif notebook.get_current_page() in [PAGE_INST_TREE, PAGE_INST_LOCAL]:
             notebook.set_current_page(PAGE_DISK)
-        elif notebook.get_current_page() == PAGE_DISK and self.connection.get_uri() == "qemu:///session":
+        elif notebook.get_current_page() == PAGE_DISK and self.connection.is_qemu_session():
             # Skip network for non-root
             notebook.set_current_page(PAGE_CPUMEM)
         else:
@@ -338,7 +338,7 @@
             else:
                 # No config for PXE needed (yet)
                 notebook.set_current_page(PAGE_INST)
-        elif notebook.get_current_page() == PAGE_CPUMEM and self.connection.get_uri() == "qemu:///session":
+        elif notebook.get_current_page() == PAGE_CPUMEM and self.connection.is_qemu_session():
             # Skip network for non-root
             notebook.set_current_page(PAGE_DISK)
         else:
@@ -422,7 +422,7 @@
 	return self.window.get_widget("kernel-params").get_text()
 
     def get_config_network(self):
-        if self.connection.get_uri() == "qemu:///session":
+        if self.connection.is_qemu_session():
             return ["user"]
 
         if self.window.get_widget("net-type-network").get_active():
@@ -621,7 +621,7 @@
             return self.err.val_err(_("UUID Error"), str(e))
 
         # HACK: If usermode, and no nic is setup, use usermode networking
-        if self.connection.get_uri() == "qemu:///session":
+        if self.connection.is_qemu_session():
             try:
                 self._net = virtinst.VirtualNetworkInterface(type="user")
             except ValueError, e:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]