#NEWLINE# def tell_parents_our_capabilities( self , ctxt ) : #NEWLINE# #INDENT# 'Send our capabilities to parent cells.' #NEWLINE# parent_cells = self . state_manager . get_parent_cells ( ) #NEWLINE# if ( not parent_cells ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# my_cell_info = self . state_manager . get_my_state ( ) #NEWLINE# capabs = self . state_manager . get_our_capabilities ( ) #NEWLINE# parent_cell_names = ',' . join ( ( x . name for x in parent_cells ) ) #NEWLINE# LOG . debug ( 'Updating parents [%(parent_cell_names)s] with our capabilities: %(capabs)s' , { #NEWLINE# #INDENT# 'parent_cell_names' : parent_cell_names , #NEWLINE# 'capabs' : capabs , #NEWLINE# #UNINDENT# } ) #NEWLINE# for ( key , values ) in capabs . items ( ) : #NEWLINE# #INDENT# capabs [ key ] = list ( values ) #NEWLINE# #UNINDENT# method_kwargs = { #NEWLINE# #INDENT# 'cell_name' : my_cell_info . name , #NEWLINE# 'capabilities' : capabs , #NEWLINE# #UNINDENT# } #NEWLINE# for cell in parent_cells : #NEWLINE# #INDENT# message = _TargetedMessage ( self , ctxt , 'update_capabilities' , method_kwargs , 'up' , cell , fanout = True ) #NEWLINE# message . process ( )