[PATCH v2 08/13] hyperv: implement connectNumOfDefinedNetworks and connectListDefinedNetworks

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

 



Co-authored-by: Dawid Zamirski <dzamirski@xxxxxxxxx>
Signed-off-by: Matt Coleman <matt@xxxxxxxxx>
---
 src/hyperv/hyperv_network_driver.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/hyperv/hyperv_network_driver.c b/src/hyperv/hyperv_network_driver.c
index 25755f2525..f85dea31fe 100644
--- a/src/hyperv/hyperv_network_driver.c
+++ b/src/hyperv/hyperv_network_driver.c
@@ -76,6 +76,24 @@ hypervNetworkLookup(virConnectPtr conn, const char *property, const char *value)
  * Exported API functions
  */
 
+static int
+hypervConnectNumOfDefinedNetworks(virConnectPtr conn G_GNUC_UNUSED)
+{
+    /* Hyper-V networks are always active */
+    return 0;
+}
+
+
+static int
+hypervConnectListDefinedNetworks(virConnectPtr conn G_GNUC_UNUSED,
+                                 char **const names G_GNUC_UNUSED,
+                                 int maxnames G_GNUC_UNUSED)
+{
+    /* Hyper-V networks are always active */
+    return 0;
+}
+
+
 #define MATCH(FLAG) (flags & (FLAG))
 static int
 hypervConnectListAllNetworks(virConnectPtr conn,
@@ -164,6 +182,8 @@ hypervNetworkLookupByName(virConnectPtr conn, const char *name)
 
 virNetworkDriver hypervNetworkDriver = {
     .connectNumOfNetworks = hypervConnectNumOfNetworks, /* 7.1.0 */
+    .connectNumOfDefinedNetworks = hypervConnectNumOfDefinedNetworks, /* 7.1.0 */
+    .connectListDefinedNetworks = hypervConnectListDefinedNetworks, /* 7.1.0 */
     .connectListAllNetworks = hypervConnectListAllNetworks, /* 7.1.0 */
     .networkLookupByUUID = hypervNetworkLookupByUUID, /* 7.1.0 */
     .networkLookupByName = hypervNetworkLookupByName, /* 7.1.0 */
-- 
2.30.0





[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