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

Arista and show int status #410

Closed
jshively37 opened this issue May 1, 2019 · 4 comments
Closed

Arista and show int status #410

jshively37 opened this issue May 1, 2019 · 4 comments

Comments

@jshively37
Copy link

jshively37 commented May 1, 2019

ISSUE TYPE
  • Bug Report
TEMPLATE USING
Arista EOS Software image version: 4.20.7M

                device = {
                    'device_type': 'arista_eos',
                    'host': switch,
                    'username': user,
                    'password': passwd}

the host is a simple python comma-separated list of devices.

command = 'show int status' (I have tried show interface status too with the same result).

These values are being passed to another function that calls netmiko:
        print(f"Running {command} on {switch}")
        net_connect = ConnectHandler(**device)
        net_connect.enable()
        output = net_connect.send_command(command, use_textfsm=True)
        return output
SAMPLE COMMAND OUTPUT
The output is being returned as <class 'str'>

If I change the command to another value in the index such as show inventory it returns the type correctly as <class 'list'>

I did verify that show int status is in the index file:
arista_eos_show_interfaces_status.template, .*, arista_eos, sh[[ow]] int[[erfaces]] st[[atus]]
@jmcgill298
Copy link
Contributor

I am confused as to what issue you are reporting. I am assuming that the type of the object being returned is not really the issue, but that the data is not being parsed by TextFSM. What is actually returned? Is it a message, is it the contents of the command output from the device, or is it something else? Have you tried using this project with the command output? Have you tried CliTable or TextFSM with the command output?

@jshively37
Copy link
Author

Basically the show int status is not returning structured data but instead is returning just text string.

I brought the issue up to a co-worker and it appears the newer Arista code integrated a flags field in the output of show int status. This is probably why the returned data does not match the template.

We are going to play around with the template file and see if we can get it work properly. If we do I will post the changes.

@FragmentedPacket
Copy link
Contributor

@jshively37 Just wanted to see if there was an update on your end?

@FragmentedPacket
Copy link
Contributor

@jshively37 I'm going to go ahead and close this issue.

If you guys fixed the issue and would like to share the changes to to the template then you're more than welcome to submit a PR back for this or you can post the output and we can help figure out a fix for your issue.

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

No branches or pull requests

3 participants