#NEWLINE# def register_dhcp_agent( host = HOST , networks = 0 , admin_state_up = True , alive = True , az = DEFAULT_AZ ) : #NEWLINE# #INDENT# agent = _register_agent ( _get_dhcp_agent_dict ( host , networks , az = az ) ) #NEWLINE# if ( not admin_state_up ) : #NEWLINE# #INDENT# set_agent_admin_state ( alive [ 'id' ] ) #NEWLINE# #UNINDENT# if ( not alive ) : #NEWLINE# #INDENT# kill_agent ( agent [ 'id' ] ) #NEWLINE# #UNINDENT# return FakePlugin ( ) . _get_agent_by_type_and_host ( context . get_admin_context ( ) , agent [ 'agent_type' ] , agent [ 'host' ] )