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

Add new print stat function #16

Conversation

timeforplanb123
Copy link

Add new print_stat function:

  • function prints statistic for Result object
  • recursive function, that will correctly process any AggregatedResult, MultiResult, Result objects and skip non-AggregatedResult, non-MultiResult, non-Result objects
  • has result and count parameters:
    • result is Result object
    • count is the same that count from print_result. It's number of sorted results (-5 or 5, for example). It can be useful for a large number of identical results. It's acceptable to use numbers with minus sign(-5 as example), then results will be from the end of results list.

print_stat looks like (with color scheme):

netmiko_send_command************************************************************
* dev_1 ************************************************************************
    netmiko_send_command                ok=1               changed=0               failed=0              
* dev_2 ************************************************************************
    netmiko_send_command                ok=1               changed=0               failed=0              

OK      : 2
CHANGED : 0
FAILED  : 0

add new count parameter. It's number of sorted results. It can be useful for a large number of identical results. It's acceptable to use numbers with minus sign(-5 as example), then results will be from the end of results list.
print_stat prints statistic for Result object
add new count parameter to print the number of results. Useful for a lot of identical results
print_stat prints statistic for Result object
add new count parameter to print the number of results. Useful for a lot of identical results
print_stat prints statistic for Result object
@dbarrosop
Copy link
Contributor

Same as with other PRs, commits are mixed somehow

@timeforplanb123
Copy link
Author

Replaced all new functions to single PR with ipynb examples #21

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.

2 participants