-
Task
-
Resolution: Unresolved
-
Undefined
-
None
-
None
Following discussions in slack and related PRs, we need to refactor our ping() function and address these points:
- Totally separating the formatting and building of the command (e.g. adding MTU, adding "-6 for IPv6, etc.) from the execution of the ping action.
- Enable executing the command from either console or ssh. Currently we always execute it via ssh, but we need to stop depending on ssh, and allow the ability to execute via console.
For this point there are 2 suggested approaches, and we will have to decide on one of them:
a. Add a `connect_method` argument to ping() signature, to determine whether to execute the command via ssh or via console.
b. Create 2 separate functions that implement the ping: ping_via_console() and ping_via_ssh().