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

[Xen-changelog] netif.py, blkif.py:



ChangeSet 1.1713.1.20, 2005/06/17 16:30:49+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        netif.py, blkif.py:
          Add exportToDB functions to save evtchn port.
        Signed-off-by: Mike Wray <mike.wray@xxxxxx>
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 blkif.py |    7 +++++++
 netif.py |    8 ++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)


diff -Nru a/tools/python/xen/xend/server/blkif.py 
b/tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     2005-06-17 21:03:31 -04:00
+++ b/tools/python/xen/xend/server/blkif.py     2005-06-17 21:03:31 -04:00
@@ -193,6 +193,13 @@
         self.backendId = 0
         self.configure(self.config, recreate=recreate)
 
+    def exportToDB(self, save=False):
+        Dev.exportToDB(self, save=save)
+        backend = self.getBackend()
+        if backend and backend.evtchn:
+            db = self.db.addChild("evtchn")
+            backend.evtchn.exportToDB(db, save=save)
+
     def init(self, recreate=False, reboot=False):
         self.frontendDomain = self.getDomain()
         self.frontendChannel = self.getChannel()
diff -Nru a/tools/python/xen/xend/server/netif.py 
b/tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py     2005-06-17 21:03:31 -04:00
+++ b/tools/python/xen/xend/server/netif.py     2005-06-17 21:03:31 -04:00
@@ -66,11 +66,9 @@
         DBVar('be_mac',  ty='mac'),
         DBVar('bridge',  ty='str'),
         DBVar('script',  ty='str'),
-        #DBVar('ipaddr'),
         DBVar('credit',  ty='int'),
         DBVar('period',  ty='int'),
         DBVar('vifname', ty='str'),
-        DBVar('evtchn'),                #todo: export fields (renamed)
         ]
 
     def __init__(self, controller, id, config, recreate=False):
@@ -91,6 +89,12 @@
         self.ipaddr = None
         self.vifname = None
         self.configure(self.config, recreate=recreate)
+
+    def exportToDB(self, save=False):
+        Dev.exportToDB(self, save=save)
+        if self.evtchn:
+            db = self.db.addChild("evtchn")
+            self.evtchn.exportToDB(db, save=save)
 
     def init(self, recreate=False, reboot=False):
         self.destroyed = False

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.