[gnome-boxes] vm-configurator: Replace 'network' interface also
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] vm-configurator: Replace 'network' interface also
- Date: Mon, 2 Feb 2015 20:47:05 +0000 (UTC)
commit 367b7e3255c11ffede5537cda86f3a3bc5ed1c6e
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 a3dcf76..442db49 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -248,12 +248,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]