[PATCH v2 09/13] hyperv: implement networkGetAutostart, networkIsActive, and networkIsPersistent

[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 | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/src/hyperv/hyperv_network_driver.c b/src/hyperv/hyperv_network_driver.c
index f85dea31fe..d6407ac591 100644
--- a/src/hyperv/hyperv_network_driver.c
+++ b/src/hyperv/hyperv_network_driver.c
@@ -180,6 +180,31 @@ hypervNetworkLookupByName(virConnectPtr conn, const char *name)
 }
 
 
+static int
+hypervNetworkGetAutostart(virNetworkPtr network G_GNUC_UNUSED, int *autostart)
+{
+    /* Hyper-V networks are always active */
+    *autostart = 1;
+    return 0;
+}
+
+
+static int
+hypervNetworkIsActive(virNetworkPtr network G_GNUC_UNUSED)
+{
+    /* Hyper-V networks are always active */
+    return 1;
+}
+
+
+static int
+hypervNetworkIsPersistent(virNetworkPtr network G_GNUC_UNUSED)
+{
+    /* Hyper-V networks are always persistent */
+    return 1;
+}
+
+
 virNetworkDriver hypervNetworkDriver = {
     .connectNumOfNetworks = hypervConnectNumOfNetworks, /* 7.1.0 */
     .connectNumOfDefinedNetworks = hypervConnectNumOfDefinedNetworks, /* 7.1.0 */
@@ -187,4 +212,7 @@ virNetworkDriver hypervNetworkDriver = {
     .connectListAllNetworks = hypervConnectListAllNetworks, /* 7.1.0 */
     .networkLookupByUUID = hypervNetworkLookupByUUID, /* 7.1.0 */
     .networkLookupByName = hypervNetworkLookupByName, /* 7.1.0 */
+    .networkGetAutostart = hypervNetworkGetAutostart, /* 7.1.0 */
+    .networkIsActive = hypervNetworkIsActive, /* 7.1.0 */
+    .networkIsPersistent = hypervNetworkIsPersistent, /* 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