-
Notifications
You must be signed in to change notification settings - Fork 33
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 function to check host network connectivity #55
Add function to check host network connectivity #55
Conversation
@cynepco3hahue It is great, just please add dummy test which pings 127.0.0.1. regarding to ping6, I am not sure whether it will work, because in Host.init there is ipv4 validation for Host.ip, so it basically impossible to create instance of ipv6 Host. Also I can find that function on other places ...
Please open issue to support ipv6 hosts. |
|
||
:param ping_timeout: time to wait for response | ||
:type ping_timeout: float | ||
:param ipv6: if address IPV6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this param is not necessary, you can use netaddr.valid_ipv6(self.host.ip) function to decide what command to use. like:
ping_cmd = "ping6" if netaddr.valid_ipv6(self.host.ip) else "ping"
@@ -3,6 +3,8 @@ python: | |||
- "2.6" | |||
- "2.7" | |||
- "3.4" | |||
before_install: | |||
- sudo apt-get install inetutils-ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not all instances supports sudo ... use apt addon instead ...
addons:
apt:
packages:
- iputils-ping
covers #29