[PATCH] PHYP: Add rudimentary network driver

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

 



I changed virStorage[Open|Close] to virVIOSDriver[Open|Close] so
the network driver can use it - since the network driver deals
with Open/Close in the same way.
---
 src/phyp/phyp_driver.c |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index aa4722e..975d941 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -3864,7 +3864,7 @@ phypDomainSetCPU(virDomainPtr dom, unsigned int nvcpus)
 }
 
 static virDrvOpenStatus
-phypStorageOpen(virConnectPtr conn,
+phypVIOSDriverOpen(virConnectPtr conn,
                 virConnectAuthPtr auth ATTRIBUTE_UNUSED,
                 int flags)
 {
@@ -3877,7 +3877,7 @@ phypStorageOpen(virConnectPtr conn,
 }
 
 static int
-phypStorageClose(virConnectPtr conn ATTRIBUTE_UNUSED)
+phypVIOSDriverClose(virConnectPtr conn ATTRIBUTE_UNUSED)
 {
     return 0;
 }
@@ -3984,8 +3984,8 @@ static virDriver phypDriver = {
 
 static virStorageDriver phypStorageDriver = {
     .name = "PHYP",
-    .open = phypStorageOpen,
-    .close = phypStorageClose,
+    .open = phypVIOSDriverOpen,
+    .close = phypVIOSDriverClose,
 
     .numOfPools = phypNumOfStoragePools,
     .listPools = phypListStoragePools,
@@ -4023,6 +4023,29 @@ static virStorageDriver phypStorageDriver = {
     .poolIsPersistent = NULL
 };
 
+static virNetworkDriver phypNetworkDriver = {
+    .name = "PHYP",
+    .open = phypVIOSDriverOpen,
+    .close = phypVIOSDriverClose,
+    .numOfNetworks = NULL,
+    .listNetworks = NULL,
+    .numOfDefinedNetworks = NULL,
+    .listDefinedNetworks = NULL,
+    .networkLookupByUUID = NULL,
+    .networkLookupByName = NULL,
+    .networkCreateXML = NULL,
+    .networkDefineXML = NULL,
+    .networkUndefine = NULL,
+    .networkCreate = NULL,
+    .networkDestroy = NULL,
+    .networkDumpXML = NULL,
+    .networkGetBridgeName = NULL,
+    .networkGetAutostart = NULL,
+    .networkSetAutostart = NULL,
+    .networkIsActive = NULL,
+    .networkIsPersistent = NULL
+};
+
 int
 phypRegister(void)
 {
@@ -4030,6 +4053,8 @@ phypRegister(void)
         return -1;
     if (virRegisterStorageDriver(&phypStorageDriver) < 0)
         return -1;
+    if (virRegisterNetworkDriver(&phypNetworkDriver) < 0)
+        return -1;
 
     return 0;
 }
-- 
1.7.0.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]