Signed-off-by: Shi Lei <shi_lei(a)massclouds.com>
---
docs/schemas/network.rng | 1 +
src/conf/network_conf.c | 31 +------------------------------
2 files changed, 2 insertions(+), 30 deletions(-)
diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng
index 20878a8..702018b 100644
--- a/docs/schemas/network.rng
+++ b/docs/schemas/network.rng
@@ -279,6 +279,7 @@
"structure": {"output":
"src/conf/network_conf"},
"clearfunc": {"output":
"src/conf/network_conf"},
"parsefunc": {
+ "output": "src/conf/network_conf",
"post": true,
"args.noctxt": true,
"args.instname": true
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 91f08e9..3a43e40 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -214,7 +214,7 @@ virNetworkDefFree(virNetworkDefPtr def)
}
-static int
+int
virNetworkDNSForwarderParseXMLPost(xmlNodePtr curnode G_GNUC_UNUSED,
virNetworkDNSForwarderPtr def,
const char *networkName G_GNUC_UNUSED,
@@ -232,35 +232,6 @@ virNetworkDNSForwarderParseXMLPost(xmlNodePtr curnode G_GNUC_UNUSED,
}
-/* virNetworkDNSForwarderParseXML will be replaced by generated namesake */
-static int
-virNetworkDNSForwarderParseXML(xmlNodePtr curnode,
- virNetworkDNSForwarderPtr def,
- const char *networkName)
-{
- char *addr = virXMLPropString(curnode, "addr");
- if (addr && virSocketAddrParse(&def->addr, addr, AF_UNSPEC) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
- _("Invalid forwarder IP address '%s' "
- "in network '%s'"),
- addr, networkName);
- VIR_FREE(addr);
- return -1;
- }
-
- def->domain = virXMLPropString(curnode, "domain");
-
- if (virNetworkDNSForwarderParseXMLPost(curnode, def, networkName,
- addr, def->domain) < 0) {
- VIR_FREE(addr);
- return -1;
- }
-
- VIR_FREE(addr);
- return 0;
-}
-
-
/* This includes all characters used in the names of current
* /etc/services and /etc/protocols files (on Fedora 20), except ".",
* which we can't allow because it would conflict with the use of "."
--
2.17.1