[PATCH 6/7] network: allow VIR_NETWORK_DEFINE_VALIDATE flag

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

 



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

diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
index 8a0cfa3729..673ed5421f 100644
--- a/src/esx/esx_network_driver.c
+++ b/src/esx/esx_network_driver.c
@@ -292,13 +292,13 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char *xml,
 
     unsigned char md5[VIR_CRYPTO_HASH_SIZE_MD5]; /* VIR_CRYPTO_HASH_SIZE_MD5 = VIR_UUID_BUFLEN = 16 */
 
-    virCheckFlags(0, NULL);
+    virCheckFlags(VIR_NETWORK_DEFINE_VALIDATE, NULL);
 
     if (esxVI_EnsureSession(priv->primary) < 0)
         return NULL;
 
     /* Parse network XML */
-    def = virNetworkDefParseString(xml, NULL, 0);
+    def = virNetworkDefParseString(xml, NULL, flags);
 
     if (!def)
         return NULL;
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 207163cde2..e8b9ffa1fc 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3527,9 +3527,9 @@ networkDefineXMLFlags(virConnectPtr conn,
     virNetworkPtr net = NULL;
     virObjectEvent *event = NULL;
 
-    virCheckFlags(0, NULL);
+    virCheckFlags(VIR_NETWORK_DEFINE_VALIDATE, NULL);
 
-    if (!(def = virNetworkDefParseString(xml, network_driver->xmlopt, 0)))
+    if (!(def = virNetworkDefParseString(xml, network_driver->xmlopt, flags)))
         goto cleanup;
 
     if (virNetworkDefineXMLFlagsEnsureACL(conn, def) < 0)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 117d1e6ba9..f60ea870db 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5618,9 +5618,9 @@ testNetworkDefineXMLFlags(virConnectPtr conn,
     virNetworkPtr net = NULL;
     virObjectEvent *event = NULL;
 
-    virCheckFlags(0, NULL);
+    virCheckFlags(VIR_NETWORK_DEFINE_VALIDATE, NULL);
 
-    if ((newDef = virNetworkDefParseString(xml, NULL, 0)) == NULL)
+    if ((newDef = virNetworkDefParseString(xml, NULL, flags)) == NULL)
         goto cleanup;
 
     if (!(obj = virNetworkObjAssignDef(privconn->networks, newDef, 0)))
diff --git a/src/vbox/vbox_network.c b/src/vbox/vbox_network.c
index 804f9f0b01..c554b052c9 100644
--- a/src/vbox/vbox_network.c
+++ b/src/vbox/vbox_network.c
@@ -386,7 +386,7 @@ vboxNetworkDefineCreateXML(virConnectPtr conn, const char *xml, bool start,
     virNetworkPtr ret = NULL;
     nsresult rc;
 
-    virCheckFlags(0, NULL);
+    virCheckFlags(VIR_NETWORK_DEFINE_VALIDATE, NULL);
 
     if (!data->vboxObj)
         return ret;
@@ -397,7 +397,7 @@ vboxNetworkDefineCreateXML(virConnectPtr conn, const char *xml, bool start,
 
     VBOX_IID_INITIALIZE(&vboxnetiid);
 
-    if (!(def = virNetworkDefParseString(xml, NULL, 0)) ||
+    if (!(def = virNetworkDefParseString(xml, NULL, flags)) ||
         (def->forward.type != VIR_NETWORK_FORWARD_NONE) ||
         (def->nips == 0 || !def->ips))
         goto cleanup;
-- 
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