def __init__(self):
     try:
         host = Config().getFromConfigs(arbiter, "arbiter-server-host")
         port = Config().getFromConfigs(arbiter, "stream-control-server-port")
         self.client = ThriftClient.getThriftClient(host, port, StreamControlService)
     except Exception, e:
         log.error("StreamControlServer setup Error:%s",e)
         raise Exception("StreamControlServer setup error")
 def __init__(self):
     try:
         host = Config().getFromConfigs(arbiter, "arbiter-server-host")
         port = Config().getFromConfigs(arbiter, "config-control-server-port")
         self.client = ThriftClient.getThriftClient(host, port, ConfigControlService)
     except Exception, e:
         log.error("ConfigControlService init error:%s",e)
         raise Exception("ConfigControlService Exception")
 def __init__(self):
     try:
         host = Config("configuration.cfg").getFromConfigs(arbiter, "arbiter-server-host")
         port = Config("configuration.cfg").getFromConfigs(arbiter, "device-management-server-port")
         self.client = ThriftClient.getThriftClient(host, port, DeviceManagementService)
     except Exception,e:
         log.error("DeviceManagementServer error:%s",e)
         raise Exception("DeviceManagementServer setup!")
 def __init__(self):
     try:
         self.deviceId = Config().getFromConfigs(Constants.deleteDevice,"device-id")
         rsServerInfo = Mysql().getRsServerInfo(self.deviceId)
         if len(rsServerInfo)!=0:
             host = rsServerInfo[0][1]
             port = rsServerInfo[0][2]
             self.client = ThriftClient.getThriftClient(host, port, RecordingServerService)
     except Exception,e:
         log.error('RecordingServerService error:%s',e)
         raise Exception('RecordingServerService __init__ exception')
 def __init__(self):
     '''
     Constructor
     '''
     try:
         host = Config().getFromConfigs(arbiter, "arbiter-server-host")
         port = Config().getFromConfigs(arbiter, "data-receiver-port")
         self.client = ThriftClient.getThriftClient(host, port, DeviceDataReceiverService)
     except Exception, e:
         log.error("DeviceManagementServer error:%s",e)
         raise Exception("DeviceDataReceiverService setup:")
    def __init__(self):
        try:
            log.debug('************DeviceServerServiceClient init come in*******************')
            self.deviceId = Config().getFromConfigs(deleteDevice,"device-id")
            dsServerInfo = Mysql().getDsServerInfo(self.deviceId)
            if len(dsServerInfo)!=0:
                host = dsServerInfo[0][2]
#                 print host
                port = dsServerInfo[0][3]
#                 print port
                self.client = ThriftClient.getThriftClient(host, port, DeviceServerService)
#                 print self.client
            log.debug('************DeviceServerServiceClient init End*******************')
        except Exception, e:
            log.error("DeviceServerService setup:%s",e)
            raise Exception("DeviceServerService setup error")