[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[libvirt] [PATCH] Activate virtual networks initialized in custom test driver.
- From: Cole Robinson <crobinso redhat com>
- To: libvir-list redhat com
- Cc:
- Subject: [libvirt] [PATCH] Activate virtual networks initialized in custom test driver.
- Date: Fri, 19 Jun 2009 12:37:33 -0400
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.
Signed-off-by: Cole Robinson <crobinso redhat com>
---
src/test.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/test.c b/src/test.c
index 1661144..6f07462 100644
--- a/src/test.c
+++ b/src/test.c
@@ -462,7 +462,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);
@@ -470,7 +471,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;
}
@@ -622,6 +624,7 @@ static int testOpenFromFile(virConnectPtr conn,
goto error;
}
net->persistent = 1;
+ net->active = 1;
virNetworkObjUnlock(net);
}
VIR_FREE(networks);
--
1.6.3.2
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]