]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Plumb domain description tag in xend backend
authorJim Fehlig <jfehlig@novell.com>
Wed, 9 Dec 2009 14:25:31 +0000 (15:25 +0100)
committerDaniel Veillard <veillard@redhat.com>
Wed, 9 Dec 2009 14:25:31 +0000 (15:25 +0100)
xen-unstable changesets 20321 and 20521 added support for
description in xend domain config.  This patch extends that
support in xend backend.
* src/xen/xend_internal.c: add parse and output of domain description

src/xen/xend_internal.c

index 8822f44c81ec30a9b2efae0d845a7f428b815520..76556d05071b46b49d6020fc20635c2703aa9fe0 100644 (file)
@@ -2366,6 +2366,9 @@ xenDaemonParseSxpr(virConnectPtr conn,
     }
     virUUIDParse(tmp, def->uuid);
 
+    if (sexpr_node_copy(root, "domain/description", &def->description) < 0)
+        goto no_memory;
+
     hvm = sexpr_lookup(root, "domain/image/hvm") ? 1 : 0;
     if (!hvm) {
         if (sexpr_node_copy(root, "domain/bootloader",
@@ -5699,6 +5702,9 @@ xenDaemonFormatSxpr(virConnectPtr conn,
     virUUIDFormat(def->uuid, uuidstr);
     virBufferVSprintf(&buf, "(uuid '%s')", uuidstr);
 
+    if (def->description)
+        virBufferVSprintf(&buf, "(description '%s')", def->description);
+
     if (def->os.bootloader) {
         if (def->os.bootloader[0])
             virBufferVSprintf(&buf, "(bootloader '%s')", def->os.bootloader);