]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Activate virtual networks initialized in custom test driver.
authorCole Robinson <crobinso@redhat.com>
Mon, 22 Jun 2009 16:39:23 +0000 (16:39 +0000)
committerCole Robinson <crobinso@redhat.com>
Mon, 22 Jun 2009 16:39:23 +0000 (16:39 +0000)
If specifying a custom test driver, virtual networks were not 'activated'
on driver init. This differs from the behavior of domains and storage pools,
so fix it. Also improve a couple error messages in that area.

ChangeLog
src/test.c

index f8c157a8f0939efea873801e807e099c18c53ec8..faf3da69036c1fc196cea89ae99867443ed14826 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jun 22 12:38:19 EDT 2009 Cole Robinson <crobinso@redhat.com>
+
+       * src/test.c: Activate virtual networks initialized in custom test driver.
+
 Mon Jun 22 12:35:34 EDT 2009 Cole Robinson <crobinso@redhat.com>
 
        * src/util.c: Fix segfault if storage pool has no type attribute
index 2a672a3f69f5c639271532c114910fd3dc49ff4c..7bc3fee56a1118e6067db755fc647cb21d2f9e51 100644 (file)
@@ -381,7 +381,8 @@ static int testOpenFromFile(virConnectPtr conn,
     if (!(xml = xmlReadFd(fd, file, NULL,
                           XML_PARSE_NOENT | XML_PARSE_NONET |
                           XML_PARSE_NOERROR | XML_PARSE_NOWARNING))) {
-        testError(NULL, VIR_ERR_INTERNAL_ERROR, "%s", _("host"));
+        testError(NULL, VIR_ERR_INTERNAL_ERROR,
+                  _("Invalid XML in file '%s'"), file);
         goto error;
     }
     close(fd);
@@ -389,7 +390,8 @@ static int testOpenFromFile(virConnectPtr conn,
 
     root = xmlDocGetRootElement(xml);
     if ((root == NULL) || (!xmlStrEqual(root->name, BAD_CAST "node"))) {
-        testError(NULL, VIR_ERR_XML_ERROR, "%s", _("node"));
+        testError(NULL, VIR_ERR_XML_ERROR, "%s",
+                  _("Root element is not 'node'"));
         goto error;
     }
 
@@ -541,6 +543,7 @@ static int testOpenFromFile(virConnectPtr conn,
             goto error;
         }
         net->persistent = 1;
+        net->active = 1;
         virNetworkObjUnlock(net);
     }
     VIR_FREE(networks);