ia64/xen-unstable

changeset 6942:fb1fa3a4106f

Remove unused restoreFromDB, saveToDB.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Sat Sep 17 20:23:53 2005 +0100 (2005-09-17)
parents 8462eff90433
children 191ffe9a9967
files tools/python/xen/xend/server/channel.py
line diff
     1.1 --- a/tools/python/xen/xend/server/channel.py	Sat Sep 17 18:09:31 2005 +0100
     1.2 +++ b/tools/python/xen/xend/server/channel.py	Sat Sep 17 20:23:53 2005 +0100
     1.3 @@ -43,33 +43,6 @@ class EventChannel(dict):
     1.4  
     1.5      interdomain = classmethod(interdomain)
     1.6  
     1.7 -    def restoreFromDB(cls, db, dom1, dom2, port1=0, port2=0):
     1.8 -        """Create an event channel using db info if available.
     1.9 -        Inverse to saveToDB().
    1.10 -
    1.11 -        @param db db
    1.12 -        @param dom1
    1.13 -        @param dom2
    1.14 -        @param port1
    1.15 -        @param port2
    1.16 -        """
    1.17 -        try:
    1.18 -            dom1  = int(db['dom1'].getData())
    1.19 -        except: pass
    1.20 -        try:
    1.21 -            dom2  = int(db['dom2'].getData())
    1.22 -        except: pass
    1.23 -        try:
    1.24 -            port1 = int(db['port1'].getData())
    1.25 -        except: pass
    1.26 -        try:
    1.27 -            port2 = int(db['port2'].getData())
    1.28 -        except: pass
    1.29 -        evtchn = cls.interdomain(dom1, dom2, port1=port1, port2=port2)
    1.30 -        return evtchn
    1.31 -
    1.32 -    restoreFromDB = classmethod(restoreFromDB)
    1.33 -
    1.34      def __init__(self, dom1, dom2, d):
    1.35          d['dom1'] = dom1
    1.36          d['dom2'] = dom2
    1.37 @@ -93,18 +66,6 @@ class EventChannel(dict):
    1.38          evtchn_close(self.dom1, self.port1)
    1.39          evtchn_close(self.dom2, self.port2)
    1.40  
    1.41 -    def saveToDB(self, db, save=False):
    1.42 -        """Save the event channel to the db so it can be restored later,
    1.43 -        using restoreFromDB() on the class.
    1.44 -
    1.45 -        @param db db
    1.46 -        """
    1.47 -        db['dom1']  = str(self.dom1)
    1.48 -        db['dom2']  = str(self.dom2)
    1.49 -        db['port1'] = str(self.port1)
    1.50 -        db['port2'] = str(self.port2)
    1.51 -        db.saveDB(save=save)
    1.52 -
    1.53      def sxpr(self):
    1.54          return ['event-channel',
    1.55                  ['dom1',  self.dom1  ],