示例#1
0
 def get_dbpassword(self):
     """Returns the password for this container's database, as read from its nappl metadata file"""
     meta = NapplMeta(self.appName)
     if not os.path.exists(meta.datafile):
         raise Exception("Metadata file for container '%s' not found." % self.appName)
     meta.load()
     return meta.data["database"]["password"]
 def get_dbname(self):
     """Returns the name of this container's database, as read from its nappl metadata file"""
     meta = NapplMeta(self.appName)
     if not os.path.exists(meta.datafile):
         raise Exception("Metadata file for container '%s' not found." % self.appName)
     meta.load()
     return meta.data['database']['name']