PATCH: Remove no-op network API impl from OpenVZ driver

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

 



The openvz_driver.c file registers an implementation of the networking
driver APIs, which is a no-op. 

Even though the networking APIs are implemented in the QEMU driver, this
one impl is *shared* and used across all virtualization driver backends.
Thus no other driver such as Xen/OpenVZ/etc should ever implement the
network APIs. The only exceptions are the remote driver, and the test
driver. So this patch removes the no-op impl from openvz


diff -r 079dc4e2fd54 src/openvz_driver.c
--- a/src/openvz_driver.c	Mon Jan 14 18:09:49 2008 -0500
+++ b/src/openvz_driver.c	Mon Jan 14 19:04:10 2008 -0500
@@ -86,14 +86,6 @@ static int openvzShutdown(void);
 static int openvzShutdown(void);
 static int openvzReload(void);
 static int openvzActive(void);
-static int openvzCloseNetwork(virConnectPtr conn);
-static virDrvOpenStatus openvzOpenNetwork(virConnectPtr conn, 
-                                          const char *name ATTRIBUTE_UNUSED,
-                                          int *credtype ATTRIBUTE_UNUSED,
-                                          int ncredtype ATTRIBUTE_UNUSED,
-                                          virConnectAuthCallbackPtr cb ATTRIBUTE_UNUSED,
-                                          void *cbdata ATTRIBUTE_UNUSED,
-                                          int flags ATTRIBUTE_UNUSED);
 
 static virDomainPtr openvzDomainDefineXML(virConnectPtr conn, const char *xml);
 static virDomainPtr openvzDomainCreateLinux(virConnectPtr conn, const char *xml, 
@@ -696,20 +688,6 @@ static int openvzActive(void) {
 static int openvzActive(void) {
 
     return 1;
-}
-
-static int openvzCloseNetwork(virConnectPtr conn ATTRIBUTE_UNUSED) {
-    return 0;
-}
-
-static virDrvOpenStatus openvzOpenNetwork(virConnectPtr conn ATTRIBUTE_UNUSED,
-                                          const char *name ATTRIBUTE_UNUSED,
-                                          int *credtype ATTRIBUTE_UNUSED,
-                                          int ncredtype ATTRIBUTE_UNUSED,
-                                          virConnectAuthCallbackPtr cb ATTRIBUTE_UNUSED,
-                                          void *cbdata ATTRIBUTE_UNUSED,
-                                          int flags ATTRIBUTE_UNUSED) {
-    return VIR_DRV_OPEN_SUCCESS;
 }
 
 static virDriver openvzDriver = {
@@ -771,27 +749,6 @@ static virDriver openvzDriver = {
     NULL, /* nodeGetFreeMemory */
 };
 
-static virNetworkDriver openvzNetworkDriver = {
-    NULL, /* name */	
-    openvzOpenNetwork, /* open */
-    openvzCloseNetwork, /* close */
-    NULL, /* 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 */
-};
-
 static virStateDriver openvzStateDriver = {
     openvzStartup,
     openvzShutdown,
@@ -801,7 +758,6 @@ static virStateDriver openvzStateDriver 
 
 int openvzRegister(void) {
     virRegisterDriver(&openvzDriver);
-    virRegisterNetworkDriver(&openvzNetworkDriver);
     virRegisterStateDriver(&openvzStateDriver);
     return 0;
 }


Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

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