def __init__(self, networkManager, serverListeningPort, packetHandler, transferDirectory, ftpTimeout, maxTransferAttempts, dbConnector, useSSL, max_cancel_timeout=60): """ Initializes the transfer thread's state Args: networkManager: the network manager to use serverListeningPort: the control connection's port packetHandler: the virtual machine server packet handler to use transferDirectory: the directory where the .zip files will be stored ftpTimeout: the FTP timeout (in seconds) maxTransferAttempts: the maximum number of times that a transfer will be restarted after a failure. dbConnector: a database connector useSSL: indicates wheter SSL encryption must be used when establishing the connection with the image repository or not max_cancel_timeout: unlock transfers timeout (in seconds) """ BasicThread.__init__(self, "File transfer thread") self.__networkManager = networkManager self.__serverListeningPort = serverListeningPort self.__transferDirectory = transferDirectory self.__repositoryPacketHandler = ImageRepositoryPacketHandler( self.__networkManager) self.__vmServerPacketHandler = packetHandler self.__ftpTimeout = ftpTimeout self.__maxTransferAttempts = maxTransferAttempts self.__dbConnector = dbConnector self.__max_cancel_timeout = max_cancel_timeout self.__useSSL = useSSL
def __init__(self, transferDirectory, diskImagesDirectory, definitionFileDirectory, dbConnector, domainHandler, networkManager, serverListenningPort, packetHandler): """ Initializes the compression thread's state Args: transferDirectory: the transfers directory diskImagesDirectory: the directory where the disk images are stored definitionFileDirectory: the directory where the definition files are stored dbConnector: the database connector domainHandler: the domain handler to use networkManger: the network manager to use serverListenningPort: the virtual machine server's control connection port. packetHandler: the packet handler to use """ BasicThread.__init__(self, "File compression thread") self.__diskImagesDirectory = diskImagesDirectory self.__transferDirectory = transferDirectory self.__definitionFileDirectory = definitionFileDirectory self.__dbConnector = dbConnector self.__domainHandler = domainHandler self.__compressor = ZipBasedCompressor() self.__networkManager = networkManager self.__serverListenningPort = serverListenningPort self.__packetHandler = packetHandler
def __init__(self, threadName, queue): """ Initializes the thread's state Args: queue: the queue to use """ BasicThread.__init__(self, threadName) self._queue = queue
def __init__(self, processesList): """ Initializes the thread's state Args: processesList: a background processes list """ BasicThread.__init__(self, "Background processes polling thread") self.__processesList = processesList
def __init__(self, commandsDBConnector, commandTimeout, commandsHandler, sleepTime): """ Initializes the thread's state Args: commandsDBConnector: a commands database connector commandTimeout: the timeout to use (in seconds) commandsHandler: the commands handler object to use sleepTime: the sleep time between two consecutive updates (in seconds) """ BasicThread.__init__(self, "Command monitoring thread") self.__commandsDBConnector = commandsDBConnector self.__commandTimeout = commandTimeout self.__commandsHandler = commandsHandler self.__sleepTime = sleepTime
def __init__(self, clusterServerPacketHandler, networkManager, commandsProcessor, clusterServerIP, clusterServerPort, sleepTime): """ Initializes the thread's state Args: clusterServerPacketHandler: the cluster server packet handler to use networkManager: the NetworkManager object to use commandsProcessor: the commands processor object to use clusterServerIP: the cluster server's IP address clusterServerPort: the cluster server control connection's port sleepTime: the sleep time between two consecutive updates (in seconds) """ BasicThread.__init__(self, "Status database update thread") self.__packetHandler = clusterServerPacketHandler self.__networkManager = networkManager self.__commandsProcessor = commandsProcessor self.__clusterServerIP = clusterServerIP self.__clusterServerPort = clusterServerPort self.__sleepTime = sleepTime
def __init__(self, sleepTime, dbConnector, networkManager, repositoryIP, repositoryPort, vmServerPacketHandler, imageRepositoryPacketHandler): """ Initializes the thread's state Args: sleepTime: the sleep time between updates (in seconds) dbConnector: a cluster server database connector networkManager: the NetworkManager object to use repositoryIP: the image repository's IP address repositoryPort: the image repository's port vmServerPacketHandler: the virtual machine server packet handler imageRepositoryPacketHandler: the image repository packet handler """ BasicThread.__init__(self, "Cluster status update thread") self.__sleepTime = sleepTime self.__commandsDBConnector = dbConnector self.__networkManager = networkManager self.__vmServerPacketHandler = vmServerPacketHandler self.__imageRepositoryPacketHandler = imageRepositoryPacketHandler self.__repositoryIP = repositoryIP self.__repositoryPort = repositoryPort
def __init__( self, networkManager, serverListeningPort, packetHandler, transferDirectory, ftpTimeout, maxTransferAttempts, dbConnector, useSSL, max_cancel_timeout=60, ): """ Initializes the transfer thread's state Args: networkManager: the network manager to use serverListeningPort: the control connection's port packetHandler: the virtual machine server packet handler to use transferDirectory: the directory where the .zip files will be stored ftpTimeout: the FTP timeout (in seconds) maxTransferAttempts: the maximum number of times that a transfer will be restarted after a failure. dbConnector: a database connector useSSL: indicates wheter SSL encryption must be used when establishing the connection with the image repository or not max_cancel_timeout: unlock transfers timeout (in seconds) """ BasicThread.__init__(self, "File transfer thread") self.__networkManager = networkManager self.__serverListeningPort = serverListeningPort self.__transferDirectory = transferDirectory self.__repositoryPacketHandler = ImageRepositoryPacketHandler(self.__networkManager) self.__vmServerPacketHandler = packetHandler self.__ftpTimeout = ftpTimeout self.__maxTransferAttempts = maxTransferAttempts self.__dbConnector = dbConnector self.__max_cancel_timeout = max_cancel_timeout self.__useSSL = useSSL
def __init__(self, connectionPool): """ Initializes the thread's state. """ BasicThread.__init__(self, "Connection monitoring thread") self.__connectionPool = connectionPool