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

[libvirt] [RFC][PATCH 2/7] interface: define internal driver API



---
 src/driver.h                   |   12 ++++++++++++
 src/esx/esx_interface_driver.c |    3 +++
 src/interface/netcf_driver.c   |    3 +++
 src/phyp/phyp_driver.c         |    5 ++++-
 src/remote/remote_driver.c     |    3 +++
 src/test/test_driver.c         |    3 +++
 6 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/src/driver.h b/src/driver.h
index a8b79e6..af6f173 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -766,6 +766,15 @@ typedef int
 typedef int
         (*virDrvInterfaceIsActive)(virInterfacePtr iface);
 
+typedef int
+        (*virDrvInterfaceChangeStart)   (virConnectPtr conn,
+                                         unsigned int flags);
+typedef int
+        (*virDrvInterfaceChangeCommit)  (virConnectPtr conn,
+                                         unsigned int flags);
+typedef int
+        (*virDrvInterfaceChangeRollback)(virConnectPtr conn,
+                                         unsigned int flags);
 
 typedef struct _virInterfaceDriver virInterfaceDriver;
 typedef virInterfaceDriver *virInterfaceDriverPtr;
@@ -796,6 +805,9 @@ struct _virInterfaceDriver {
     virDrvInterfaceCreate            interfaceCreate;
     virDrvInterfaceDestroy           interfaceDestroy;
     virDrvInterfaceIsActive          interfaceIsActive;
+    virDrvInterfaceChangeStart       interfaceChangeStart;
+    virDrvInterfaceChangeCommit      interfaceChangeCommit;
+    virDrvInterfaceChangeRollback    interfaceChangeRollback;
 };
 
 
diff --git a/src/esx/esx_interface_driver.c b/src/esx/esx_interface_driver.c
index 4bac3d5..26fcf20 100644
--- a/src/esx/esx_interface_driver.c
+++ b/src/esx/esx_interface_driver.c
@@ -81,6 +81,9 @@ static virInterfaceDriver esxInterfaceDriver = {
     NULL,                                  /* interfaceCreate */
     NULL,                                  /* interfaceDestroy */
     NULL,                                  /* interfaceIsActive */
+    NULL,                                  /* interfaceChangeStart */
+    NULL,                                  /* interfaceChangeCommit */
+    NULL,                                  /* interfaceChangeRollback */
 };
 
 
diff --git a/src/interface/netcf_driver.c b/src/interface/netcf_driver.c
index 709f09b..fc7979c 100644
--- a/src/interface/netcf_driver.c
+++ b/src/interface/netcf_driver.c
@@ -556,6 +556,9 @@ static virInterfaceDriver interfaceDriver = {
     interfaceCreate,                 /* interfaceCreate */
     interfaceDestroy,                /* interfaceDestroy */
     interfaceIsActive,               /* interfaceIsActive */
+    NULL,                            /* interfaceChangeStart */
+    NULL,                            /* interfaceChangeCommit */
+    NULL,                            /* interfaceChangeRollback */
 };
 
 int interfaceRegister(void) {
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 30d4adf..31aab28 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -3886,7 +3886,10 @@ static virInterfaceDriver phypInterfaceDriver = {
     .interfaceUndefine = NULL,
     .interfaceCreate = NULL,
     .interfaceDestroy = phypInterfaceDestroy,
-    .interfaceIsActive = phypInterfaceIsActive
+    .interfaceIsActive = phypInterfaceIsActive,
+    .interfaceChangeStart = NULL,
+    .interfaceChangeCommit = NULL,
+    .interfaceChangeRollback = NULL,
 };
 
 int
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index d076a90..d56f352 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -6534,6 +6534,9 @@ static virInterfaceDriver interface_driver = {
     .interfaceCreate = remoteInterfaceCreate,
     .interfaceDestroy = remoteInterfaceDestroy,
     .interfaceIsActive = remoteInterfaceIsActive,
+    .interfaceChangeStart = NULL,
+    .interfaceChangeCommit = NULL,
+    .interfaceChangeRollback = NULL,
 };
 
 static virStorageDriver storage_driver = {
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 0978214..83dcf1a 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5488,6 +5488,9 @@ static virInterfaceDriver testInterfaceDriver = {
     testInterfaceCreate,        /* interfaceCreate */
     testInterfaceDestroy,       /* interfaceDestroy */
     testInterfaceIsActive,      /* interfaceIsActive */
+    NULL,                       /* interfaceChangeStart */
+    NULL,                       /* interfaceChangeCommit */
+    NULL,                       /* interfaceChangeRollback */
 };
 
 
-- 
1.7.5.rc3


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