daemon/core/broker.py
def configure_values(self, msg, values):
        ''' Receive configuration message with a list of server:host:port
            combinations that we'll need to connect with.
        '''
        objname = msg.gettlv(coreapi.CORE_TLV_CONF_OBJ)
        conftype = msg.gettlv(coreapi.CORE_TLV_CONF_TYPE)
        
        if values is None:
            self.session.info("emulation server data missing")
            return None
        values = values.split('|')       
        # string of "server:ip:port,server:ip:port,..."
        serverstrings = values[0]
        server_list = serverstrings.split(',')
        for server in server_list:
            server_items = server.split(':')
            (name, host, port) = server_items[:3]
            if host == '':
                host = None
            if port == '':
                port = None
            else:
                port = int(port)
            sid = msg.gettlv(coreapi.CORE_TLV_CONF_SESSION)
            if sid is not None:
                # receive session ID and my IP from master
                self.session_id_master = int(sid.split('|')[0])
                self.myip = host
                host = None
                port = None
            # this connects to the server immediately; maybe we should wait
            # or spin off a new "client" thread here
            self.addserver(name, host, port)
            self.setupserver(name)
        return None
 Receive configuration message with a list of server:host:port
            combinations that we'll need to connect with.
        
Receive configuration message with a list of server:host:port
combinations that we'll need to connect with.
Receive configuration message with a list of server : host : port combinations that we ' ll need to connect with .
def configure_values(self, msg, values):
        objname = msg.gettlv(coreapi.CORE_TLV_CONF_OBJ)
        conftype = msg.gettlv(coreapi.CORE_TLV_CONF_TYPE)
        if values is None:
            self.session.info("emulation server data missing")
            return None
        values = values.split('|')       
        serverstrings = values[0]
        server_list = serverstrings.split(',')
        for server in server_list:
            server_items = server.split(':')
            (name, host, port) = server_items[:3]
            if host == '':
                host = None
            if port == '':
                port = None
            else:
                port = int(port)
            sid = msg.gettlv(coreapi.CORE_TLV_CONF_SESSION)
            if sid is not None:
                self.session_id_master = int(sid.split('|')[0])
                self.myip = host
                host = None
                port = None
            self.addserver(name, host, port)
            self.setupserver(name)
        return None
def configure_values ( self , msg , values ) : objname = msg . gettlv ( coreapi . CORE_TLV_CONF_OBJ ) conftype = msg . gettlv ( coreapi . CORE_TLV_CONF_TYPE ) if values is None : self . session . info ( "emulation server data missing" ) return None values = values . split ( '|' ) serverstrings = values [ 0 ] server_list = serverstrings . split ( ',' ) for server in server_list : server_items = server . split ( ':' ) ( name , host , port ) = server_items [ : 3 ] if host == '' : host = None if port == '' : port = None else : port = int ( port ) sid = msg . gettlv ( coreapi . CORE_TLV_CONF_SESSION ) if sid is not None : self . session_id_master = int ( sid . split ( '|' ) [ 0 ] ) self . myip = host host = None port = None self . addserver ( name , host , port ) self . setupserver ( name ) return None
Receive configuration message with a list of server:host:port
combinations that we'll need to connect with.
Receive configuration message with a list of server : host : port combinations that we ' ll need to connect with .
''' Receive configuration message with a list of server:host:port
            combinations that we'll need to connect with.
        ''' # string of "server:ip:port,server:ip:port,..." # receive session ID and my IP from master # this connects to the server immediately; maybe we should wait # or spin off a new "client" thread here
self
msg
values