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

Cleaning up the messy output #18

Open
HaiderNL opened this issue May 7, 2023 · 1 comment
Open

Cleaning up the messy output #18

HaiderNL opened this issue May 7, 2023 · 1 comment

Comments

@HaiderNL
Copy link

HaiderNL commented May 7, 2023

A remarkable evolution, that nornir. It's the fastest I/O tool I've tried so far.
Yet, I think the output is a bit messy.

netmiko_send_command************************************************************

  • sw01 ** changed : False ******************************************************
    vvvv netmiko_send_command ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO
    hostname s1
    ^^^^ END netmiko_send_command ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • sw02 ** changed : False ******************************************************
    vvvv netmiko_send_command ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO
    hostname s2
    ^^^^ END netmiko_send_command ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • sw03 ** changed : False ******************************************************
    vvvv netmiko_send_command ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO
    hostname s3
    ^^^^ END netmiko_send_command ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Can you adjust the result=nr.run() function in order to give a neat output like below?
hostname s1
hostname s2
hostname s3

@ktbyers
Copy link
Contributor

ktbyers commented May 8, 2023

You can just loop over the aggregated result object and print the results (i.e. basically just create your own printing solution that prints things the way you want it to be).

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

No branches or pull requests

2 participants