Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Commit

Permalink
Merge pull request #107 from napalm-automation/develop
Browse files Browse the repository at this point in the history
Release 0.4.8
  • Loading branch information
mirceaulinic authored Feb 8, 2017
2 parents 7240ac2 + 613dfa8 commit 36f3783
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions napalm_iosxr/iosxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,8 @@ def traceroute(self,
destination,
source=C.TRACEROUTE_SOURCE,
ttl=C.TRACEROUTE_TTL,
timeout=C.TRACEROUTE_TIMEOUT):
timeout=C.TRACEROUTE_TIMEOUT,
vrf=C.TRACEROUTE_VRF):

traceroute_result = {}

Expand All @@ -1587,20 +1588,22 @@ def traceroute(self,
source_tag = ''
ttl_tag = ''
timeout_tag = ''
vrf_tag = ''
if source:
source_tag = '<Source>{source}</Source>'.format(source=source)
if ttl:
ttl_tag = '<MaxTTL>{maxttl}</MaxTTL>'.format(maxttl=ttl)
if timeout:
timeout_tag = '<Timeout>{timeout}</Timeout>'.format(timeout=timeout)
else:
timeout = 5 # seconds
if vrf:
vrf_tag = '<VRFName>{vrf}</VRFName>'.format(vrf=vrf)

traceroute_rpc_command = '<Set><Action><TraceRoute><IPV{version}><Destination>{destination}\
</Destination>{source_tag}{ttl_tag}{timeout_tag}</IPV{version}></TraceRoute></Action>\
</Destination>{vrf_tag}{source_tag}{ttl_tag}{timeout_tag}</IPV{version}></TraceRoute></Action>\
</Set>'.format(
version=ipv,
destination=destination,
vrf_tag=vrf_tag,
source_tag=source_tag,
ttl_tag=ttl_tag,
timeout_tag=timeout_tag
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name="napalm-iosxr",
version="0.4.7",
version="0.4.8",
packages=find_packages(),
author="David Barroso, Mircea Ulinic",
author_email="dbarrosop@dravetech.com, mircea@cloudflare.com",
Expand Down

0 comments on commit 36f3783

Please sign in to comment.