Source

imalse / core / cmd / description.py

"""This file contains the default node descriptions."""

class Description(object):
    
    """The superclass, it contains the server settings."""
    
    def __init__(self):
        """Initialize the default settings.""" 
        self.server_address = '127.0.0.1'
        self.server_port = 3333
        self.request_timeout = 10

class ServerDescription(Description):        
        
    """
    
    This class is the subclass of description. It contains the default 
    server settings.
    
    """
    
    def __init__(self):
        """Initialize the default settings."""
        Description.__init__(self)
        self.initial = 'waiting'
        self.start_action = 'initialize'
        self.master_password = '1234'
         
class BotmasterDescription(Description):
    
    """
    
    This class is the subclass of description. It contains the default 
    botmaster settings.
    
    """
    
    def __init__(self):
        """Initialize the default settings.""" 
        Description.__init__(self)    
        self.initial = 'waiting'
        self.start_action = 'request_connect'
        self.master_password = '1234'
        self.interval = 2 
        self.num_commands = 1
        self.command = None   

class ClientDescription(Description):
    
    """
    
    This class is the subclass of description. It contains the default 
    client settings.
    
    """
        
    def __init__(self):
        """Initialize the default settings."""
        Description.__init__(self)
        self.initial = 'disconn'
        self.start_action = 'request_connect'