-
Notifications
You must be signed in to change notification settings - Fork 77
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
Cisco Like output #9
Comments
Hello p3rtinax, I'd really love to add the Cisco output on pythonping ASAP! Sadly, as I am busy on other projects, this won't happen soon. However, I would love to get other people on board on this project, so if you feel like contributing I'll try to write down some more specific requirements and you can fork me. I'll do my best to be available for any help or question! Let me know what you think, |
Sorry to bump an old issue, but I'm looking for my first open source project to contribute to, and github's recommended projects listed this one. So, hello! Is there a good documentation on what the Cisco-like output should look like? Maybe I can take a look at this issue. I don't have really any Cisco terminal experience, but I'm feeling better about my Python experience lately, so let me know if there's anything I can pick up or start learning about. |
@ecdestro, thanks for reaching out! In short, the Cisco output is a series of characters that represent the status of the ping. They appear on screen on the same line as soon as we get a result for the ping (either response, timeout, or something else). The line is truncated at 80 characters, so that if you have more than 80 pings they will go onto the next line.
You should read the full reference here: https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-121-mainline/12778-ping-traceroute.html This output is great because it is quicker to understand if you are troubleshooting and do not really care about milliseconds for each packet. Furthermore, as this library is used extensively by network engineers, Cisco-like format is something they are well accustomed to. |
Can I take a crack at this issue if it's still open? We have a long weekend in my region this Friday. I want to get started with my first open source contribution... Formatting output should not be to big of an issue 👍 |
Sounds great to me! I'm excited to see this in action |
@AleksaZatezalo I think @ecdestro was the first one to spot this issue so he should work on that. You mentioned documentation in another thread. True, we are good on documentation in the code but the README.md is pretty basic and does not fully explain the logic within the application itself. You may work on that, or extent tests to reach 100% coverage (which would be amazing to have a more reliable app). |
Also getting used to contributing on github, so please pardon my ignorance. I've created a preliminary function in executor.py to just try some outputs:
And have implemented out_format='cisco'
So I can get outputs of !, ., and U, but currently they are on individual lines. I'm curious about formatting the output to print the info line, then the symbol output line, then the stats line like Cisco's example:
I'm searching through the code to find the print statements looped through the count of pings, or the function that outputs results but I kinda end up chasing my own tail lol. I think it's in Response, or something that calls Response and iterates through it. This is my first time really looking at someone else's code in an environment like this, so again I apologize for my ignorance. If you can point me in the right direction of how to control output messages, I think I have a handle on how to format this Cisco-like output for each message case, I just wanted to see what it might currently look like. EDIT: I feel like it's somewhere within the append call or the Repeat object, but I don't know which one is telling the responses to enter a newline character. |
Thank you! I will work on the README and help implement test cases :) Kind Regards, |
Hi @alessandromaggio, is this issue still up for grabs? |
Hey folks sorry for late reply. So, @ecdestro you are on the right path for this, you need to represent the individual response as you are alredy doing. However, in the ResponseList we need to make some tweaks because if we just iterate through responses and print them it wil be in individual lines as you said. So we need to fetch the string value from the response. Then, it is just a matter of printing on the same line as we go, using @batman004 feel free to join @ecdestro to work on this. |
Sure @alessandromaggio, thanks |
Hello dear @alessandromaggio , I am a newbie in Open Source. May I contribute to this issue? |
Add Cisco like output, related to issue alessandromaggio#9
Hi @alessandromaggio, I was looking to my first open source contribution and found this issue. Is this still an issue and if no one is working on this so can I start working on this issue? I will appreciate your response in this regard. |
Hi dear @FahadYameen , I added a commit for this issue , but dear @alessandromaggio has not seen my commit yet. I worked on this issue. you can find and review my commit here #101 |
Sorry for the delay, life has gotten in the way of me working on this, I might have to pull back if someone else has a clearer idea of how to do this, I bow to your expertise. |
Hi @estaji, your changes LGTM. Thanks for the update 👍 |
Dear Alessandro,
Very useful code,
Following you from https://www.ictshore.com/python/python-ping-tutorial
When you gonna make it, or add Cisco like output flag to it?
It will be very more advanced if you add Cisco like output option,
I look forward to it
Thank you
The text was updated successfully, but these errors were encountered: