Example #1
0
 def __init__(self):
     try:           
         self.db = dblayer.dblayer()
         self.config = ConfigParser.RawConfigParser( )
         if os.path.exists(self.configfilepath):
             self.config.read(self.configfilepath)
         else:
             logging.error("Config file doesn't exists")
             os.sys.exit(1)   
         self.keyfilename=self.config.get("euca", "keyfilename")
         self.keyfilefullpath = "%s/%s" % (self.keyfilepath, self.keyfilename)
         self.SSH_OPTS  = '-o StrictHostKeyChecking=no -i %s' % self.keyfilefullpath
         self.conn = self.connect()              
         self.upscalethreshold=int(self.config.get("euca", "upscalethreshold"))
         self.downscaletime=int(self.config.get("euca", "downscaletime"))
     except Exception,e:
         logging.error("Error in init method:  %s",str(e))       
         os.sys.exit()
Example #2
0
 def __init__(self):
     try:           
         self.db = dblayer.dblayer()           
     except Exception,e:
         logging.error(str(e))       
Example #3
0
 def __init__(self):
     try:
         self.db = dblayer.dblayer()
     except Exception, e:
         logging.error(str(e))