[PATCH 5/6] network: allow VIR_NETWORK_CREATE_VALIDATE flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx>
---
 src/network/bridge_driver.c | 4 ++--
 src/test/test_driver.c      | 4 ++--
 src/vbox/vbox_network.c     | 3 ++-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 32b37de030..57f4ce21b7 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3475,9 +3475,9 @@ networkCreateXMLFlags(virConnectPtr conn,
     virNetworkPtr net = NULL;
     virObjectEvent *event = NULL;
 
-    virCheckFlags(0, NULL);
+    virCheckFlags(VIR_NETWORK_CREATE_VALIDATE, NULL);
 
-    if (!(newDef = virNetworkDefParseString(xml, network_driver->xmlopt, 0)))
+    if (!(newDef = virNetworkDefParseString(xml, network_driver->xmlopt, flags)))
         goto cleanup;
 
     if (virNetworkCreateXMLFlagsEnsureACL(conn, newDef) < 0)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 4ab03019e1..b5ed2555d8 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5582,9 +5582,9 @@ testNetworkCreateXMLFlags(virConnectPtr conn, const char *xml,
     virNetworkPtr net = NULL;
     virObjectEvent *event = NULL;
 
-    virCheckFlags(0, NULL);
+    virCheckFlags(VIR_NETWORK_CREATE_VALIDATE, NULL);
 
-    if ((newDef = virNetworkDefParseString(xml, NULL, 0)) == NULL)
+    if ((newDef = virNetworkDefParseString(xml, NULL, flags)) == NULL)
         goto cleanup;
 
     if (!(obj = virNetworkObjAssignDef(privconn->networks, newDef,
diff --git a/src/vbox/vbox_network.c b/src/vbox/vbox_network.c
index 2826937f81..d9402eff42 100644
--- a/src/vbox/vbox_network.c
+++ b/src/vbox/vbox_network.c
@@ -386,7 +386,8 @@ vboxNetworkDefineCreateXML(virConnectPtr conn, const char *xml, bool start,
     virNetworkPtr ret = NULL;
     nsresult rc;
 
-    virCheckFlags(VIR_NETWORK_DEFINE_VALIDATE, NULL);
+    virCheckFlags(VIR_NETWORK_DEFINE_VALIDATE |
+                  VIR_NETWORK_CREATE_VALIDATE, NULL);
 
     if (!data->vboxObj)
         return ret;
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux