[gnome-boxes/gnome-3-14] vm-configurator: Replace 'network' interface also



commit b7c7f026a5715d3bd59595a22aaeae999ed60135
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Feb 2 20:13:43 2015 +0000

    vm-configurator: Replace 'network' interface also
    
    When updating domain configs, along with replacing the user interface
    with bridge interface, also replace interface of 'network' type. This
    interface is used by system libvirt VMs and seems to be not available to
    session libvirt.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732761

 src/vm-configurator.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 44d6db3..1b0442c 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -243,12 +243,12 @@ private class Boxes.VMConfigurator {
         if (!is_libvirt_bridge_net_available ())
             return;
 
-        // First remove user interface device
+        // First remove user and 'network' (used by system libvirt machines) interface device
         GLib.List<GVirConfig.DomainDevice> devices = null;
-        DomainInterfaceUser iface = null;
+        DomainInterface iface = null;
         foreach (var device in domain.get_devices ()) {
-            if (device is DomainInterfaceUser)
-                iface = device as DomainInterfaceUser;
+            if (device is DomainInterfaceUser || device is DomainInterfaceNetwork)
+                iface = device as DomainInterface;
             else
                 devices.prepend (device);
         }


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