Trees | Indices | Help |
|
---|
|
1 ############################################################################## 2 # 3 # Copyright (C) Zenoss, Inc. 2007, all rights reserved. 4 # 5 # This content is made available according to terms specified in 6 # License.zenoss under the directory where your Zenoss product is installed. 7 # 8 ############################################################################## 9 10 11 from zope.component import getUtility 12 from Products.ZenUtils.Utils import set_context 13 from Products.ZenUtils.ZodbFactory import IZodbFactoryLookup 14164418 connectionFactory = getUtility(IZodbFactoryLookup).get() 19 self.db, self.storage = connectionFactory.getConnection(**kwargs) 20 21 self.app = None 22 self.dmd = None 23 self.opendb()24 2527 if self.app: return 28 self.connection=self.db.open() 29 root=self.connection.root() 30 app = root['Application'] 31 self.app = set_context(app) 32 self.dmd = self.app.zport.dmd33 3436 self.connection.sync()37 38
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1.1812 on Mon Jul 30 17:11:38 2012 | http://epydoc.sourceforge.net |