[gnome-boxes] Update libvirt-gconfig API usage
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Update libvirt-gconfig API usage
- Date: Mon, 14 Nov 2011 16:48:27 +0000 (UTC)
commit 4be68615cf5f9985f78b073902ed2a5596e7f666
Author: Christophe Fergeau <cfergeau redhat com>
Date: Mon Nov 14 18:47:01 2011 +0200
Update libvirt-gconfig API usage
Make boxes build/work against latest libvirt-glib git master.
src/libvirt-machine.vala | 2 +-
src/vm-creator.vala | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 0df5f28..14d85b3 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -96,7 +96,7 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
string type, port, socket, host;
try {
- var xmldoc = domain.get_config (0).doc;
+ var xmldoc = domain.get_config (0).to_xml();
type = extract_xpath (xmldoc, "string(/domain/devices/graphics/@type)", true);
port = extract_xpath (xmldoc, @"string(/domain/devices/graphics[ type='$type']/@port)");
socket = extract_xpath (xmldoc, @"string(/domain/devices/graphics[ type='$type']/@socket)");
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 439fbbb..230fc7a 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -28,7 +28,7 @@ private class Boxes.VMCreator {
var target_path = yield create_target_volume (name, resources.storage);
var xml = get_virt_xml (install_media, name, target_path, resources);
- var config = new GVirConfig.Domain (xml);
+ var config = new GVirConfig.Domain.from_xml (xml);
return connection.create_domain (config);
}
@@ -112,7 +112,7 @@ private class Boxes.VMCreator {
" </permissions>\n" +
" </target>\n" +
"</volume>";
- var config = new GVirConfig.StorageVol (xml);
+ var config = new GVirConfig.StorageVol.from_xml (xml);
var volume = pool.create_volume (config);
return volume.get_path ();
@@ -190,7 +190,7 @@ private class Boxes.VMCreator {
" </permissions>\n" +
" </target>\n" +
"</pool>";
- var config = new GVirConfig.StoragePool (xml);
+ var config = new GVirConfig.StoragePool.from_xml (xml);
pool = connection.create_storage_pool (config, 0);
yield pool.build_async (0, null);
yield pool.start_async (0, null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]