#NEWLINE# def __init__( self , uri , control_uri , attributes = None ) : #NEWLINE# #INDENT# super ( Node , self ) . __init__ ( ) #NEWLINE# self . uri = uri #NEWLINE# self . control_uri = control_uri #NEWLINE# self . external_uri = ( attributes . pop ( 'external_uri' , self . uri ) if attributes else self . uri ) #NEWLINE# self . external_control_uri = ( attributes . pop ( 'external_control_uri' , self . control_uri ) if attributes else self . control_uri ) #NEWLINE# try : #NEWLINE# #INDENT# self . attributes = AttributeResolver ( attributes ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# _log . exception ( 'Attributes not correct, uses empty attribute!' ) #NEWLINE# self . attributes = AttributeResolver ( None ) #NEWLINE# #UNINDENT# self . id = certificate . obtain_cert_node_info ( self . attributes . get_node_name_as_str ( ) ) [ 'id' ] #NEWLINE# self . metering = metering . set_metering ( metering . Metering ( self ) ) #NEWLINE# self . monitor = Event_Monitor ( ) #NEWLINE# self . am = actormanager . ActorManager ( self ) #NEWLINE# self . control = calvincontrol . get_calvincontrol ( ) #NEWLINE# _scheduler = ( scheduler . DebugScheduler if ( _log . getEffectiveLevel ( ) <= logging . DEBUG ) else scheduler . Scheduler ) #NEWLINE# self . sched = _scheduler ( self , self . am , self . monitor ) #NEWLINE# self . async_msg_ids = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _calvinsys = CalvinSys ( self ) #NEWLINE# self . storage = storage . Storage ( self ) #NEWLINE# self . network = CalvinNetwork ( self ) #NEWLINE# self . proto = CalvinProto ( self , self . network ) #NEWLINE# self . pm = PortManager ( self , control_uri . proto ) #NEWLINE# self . app_manager = appmanager . AppManager ( self ) #NEWLINE# async . DelayedCall ( 0 , self . start )