#NEWLINE# def _register_agent( agent ) : #NEWLINE# #INDENT# plugin = FakePlugin ( ) #NEWLINE# admin_context = context . get_admin_context ( ) #NEWLINE# plugin . create_or_update_agent ( admin_context , agent ) #NEWLINE# return plugin . _get_agent_by_type_and_host ( admin_context , agent [ 'agent_type' ] , agent [ 'host' ] )