def traceroute(self,<EOL>destination,<EOL>source=C.TRACEROUTE_SOURCE,<EOL>ttl=C.TRACEROUTE_TTL,<EOL>timeout=C.TRACEROUTE_TIMEOUT,<EOL>vrf=C.TRACEROUTE_VRF):
traceroute_result = {}<EOL>source_str = '<STR_LIT>'<EOL>maxttl_str = '<STR_LIT>'<EOL>wait_str = '<STR_LIT>'<EOL>vrf_str = '<STR_LIT>'<EOL>if source:<EOL><INDENT>source_str = '<STR_LIT>'.format(source=source)<EOL><DEDENT>if ttl:<EOL><INDENT>maxttl_str = '<STR_LIT>'.format(ttl=ttl)<EOL><DEDENT>if timeout:<EOL><INDENT>wait_str = '<STR_LIT>'.format(timeout=timeout)<EOL><DEDENT>if vrf:<EOL><INDENT>vrf_str = '<STR_LIT>'.format(vrf=vrf)<EOL><DEDENT>traceroute_command = '<STR_LIT>'.format(<EOL>destination=destination,<EOL>source=source_str,<EOL>maxttl=maxttl_str,<EOL>wait=wait_str,<EOL>vrf=vrf_str<EOL>)<EOL>traceroute_rpc = E('<STR_LIT>', traceroute_command)<EOL>rpc_reply = self.device._conn.rpc(traceroute_rpc)._NCElement__doc<EOL>traceroute_results = rpc_reply.find('<STR_LIT>')<EOL>traceroute_failure = napalm_base.helpers.find_txt(<EOL>traceroute_results, '<STR_LIT>', '<STR_LIT>')<EOL>error_message = napalm_base.helpers.find_txt(<EOL>traceroute_results, '<STR_LIT>', '<STR_LIT>')<EOL>if traceroute_failure and error_message:<EOL><INDENT>return {'<STR_LIT:error>': '<STR_LIT>'.format(traceroute_failure, error_message)}<EOL><DEDENT>traceroute_result['<STR_LIT:success>'] = {}<EOL>for hop in traceroute_results.findall('<STR_LIT>'):<EOL><INDENT>ttl_value = napalm_base.helpers.convert(<EOL>int, napalm_base.helpers.find_txt(hop, '<STR_LIT>'), <NUM_LIT:1>)<EOL>if ttl_value not in traceroute_result['<STR_LIT:success>']:<EOL><INDENT>traceroute_result['<STR_LIT:success>'][ttl_value] = {'<STR_LIT>': {}}<EOL><DEDENT>for probe in hop.findall('<STR_LIT>'):<EOL><INDENT>probe_index = napalm_base.helpers.convert(<EOL>int, napalm_base.helpers.find_txt(probe, '<STR_LIT>'), <NUM_LIT:0>)<EOL>ip_address = napalm_base.helpers.convert(<EOL>napalm_base.helpers.ip, napalm_base.helpers.find_txt(probe, '<STR_LIT>'), '<STR_LIT:*>')<EOL>host_name = py23_compat.text_type(<EOL>napalm_base.helpers.find_txt(probe, '<STR_LIT>', '<STR_LIT:*>'))<EOL>rtt = napalm_base.helpers.convert(<EOL>float, napalm_base.helpers.find_txt(probe, '<STR_LIT>'), <NUM_LIT:0>) * <NUM_LIT>  <EOL>traceroute_result['<STR_LIT:success>'][ttl_value]['<STR_LIT>'][probe_index] = {<EOL>'<STR_LIT>': ip_address,<EOL>'<STR_LIT>': host_name,<EOL>'<STR_LIT>': rtt<EOL>}<EOL><DEDENT><DEDENT>return traceroute_result<EOL>
Execute traceroute and return results.