bitkeeper revision 1.1713.3.7 (42b2eca9N1e5S0oGdW8OeKAkL9oDOQ)

netif.py, blkif.py:
  Add exportToDB functions to save evtchn port.
Signed-off-by: Mike Wray <mike.wray@hp.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
cl349@firebug.cl.cam.ac.uk committed 2005-06-17 15:30:49 +00:00
1 parent 99a2107ffa
commit c7fcce5589
2 files changed
+13 -2

No files matched your search

+7
View File
@@ -193,6 +193,13 @@ class BlkDev(Dev):
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()
+6 -2
View File
@@ -66,11 +66,9 @@ class NetDev(Dev):
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):
@@ -92,6 +90,12 @@ class NetDev(Dev):
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
self.status = NETIF_INTERFACE_STATUS_DISCONNECTED
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.