[PATCH 6/8] Test driver implementation for Network metadata change callbacks

K Shiva Kiran posted 8 patches 10 months, 3 weeks ago
[PATCH 6/8] Test driver implementation for Network metadata change callbacks
Posted by K Shiva Kiran 10 months, 3 weeks ago
Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net>
---
 src/test/test_driver.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 0174b28bac..0144df164e 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -9989,6 +9989,7 @@ testNetworkSetMetadata(virNetworkPtr net,
                        const char *uri,
                        unsigned int flags)
 {
+    testDriver *privconn = net->conn->privateData;
     virNetworkObj *privnet;
     int ret;
 
@@ -10002,6 +10003,12 @@ testNetworkSetMetadata(virNetworkPtr net,
                                    key, uri, NULL,
                                    NULL, NULL, flags);
 
+    if (ret == 0) {
+        virObjectEvent *ev = NULL;
+        ev = virNetworkEventMetadataChangeNewFromObj(privnet, type, uri);
+        virObjectEventStateQueue(privconn->eventState, ev);
+    }
+
     virNetworkObjEndAPI(&privnet);
     return ret;
 }
-- 
2.42.0