Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'show ip device tracking all' parser for IOS #727

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jreker
Copy link

@jreker jreker commented Jan 31, 2023

Description

Added 'show ip device tracking all' parser for IOS devices

Motivation and Context

The parser was missing

Impact (If any)

None

Screenshots:

pyats1

pyats2

Checklist:

  • I have updated the changelog.
  • I have updated the documentation (If applicable).
  • I have added tests to cover my changes (If applicable).
  • All new and existing tests passed.
  • All new code passed compilation.

@jreker jreker requested a review from a team as a code owner January 31, 2023 07:49
@jreker jreker changed the title Added 'show ip device tracking all' parser for IOSXE Added 'show ip device tracking all' parser for IOS Feb 8, 2023
Comment on lines 85 to 88
if output is None:
out = self.device.execute(self.cli_command)
else:
out = output
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if output is None:
out = self.device.execute(self.cli_command)
else:
out = output
if output is None:
output = self.device.execute(self.cli_command)

p4 = re.compile(
r"(Total number interfaces enabled:)\s(?P<numb>\d+)")

for line in out.splitlines():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for line in out.splitlines():
for line in output.splitlines():

Comment on lines 112 to 114
m1 = p1.match(line)

if m1:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m1 = p1.match(line)
if m1:
# Global IP Device Tracking for clients = Enabled
m1 = p1.match(line)
if m1:

parsed_dict['state'] = m1.group(1)
continue

m2 = p2.match(line)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add examples of strings that would match the other patterns as well

src/genie/libs/parser/ios/show_ip.py Outdated Show resolved Hide resolved
@jreker
Copy link
Author

jreker commented Mar 3, 2023

@domachad : I implemented all the changes you have mentioned. Thank you for that.

@jreker jreker requested a review from domachad March 3, 2023 10:36
@jreker
Copy link
Author

jreker commented Sep 26, 2023

@domachad @Taarini
When will this PR be merged?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants