Hi,
is this for testing in development or a production feature? What are the test cases?
The downside of using SSH to execute commands on the device is that it is
remote execution, meaning that there is some latency because of the need
to first connect to the devices, and that the remote process and results
are lost if the connection breaks.
Additionally, there is certainly a limit of connections at a time.
An alternative would be to deploy a script to execute the tests with
openwisp-config, and execute that script by one of the available hotplug
events:
https://openwisp.io/docs/stable/openwrt-config-agent/user/hotplug-events.html
The advantage is that such a script can be deployed to a specific set of
devices with an OpenWISP template.
Greetings,
Oliver
Am Fri, May 23, 2025 at 01:54:07AM -0700 schrieb Nikhil Vidhani:
>
>
> Hi everyone,
>
> We’re a small company building networking solutions, and we’re currently
> extending OpenWISP to include a *testing module*.
>
> The idea is:
>
> -
>
> The OpenWISP controller will be able to *trigger various test cases*
> that are already written and reside on OpenWRT devices.
> -
>
> The devices will expose a *GET API* to return available test case names
> and unique IDs. These will be fetched and saved into our OpenWISP-managed
> database.
> -
>
> From OpenWISP, an admin can *create a test suite* (a group of test
> cases) and execute these test cases remotely on the device.
>
> In exploring how to remotely trigger execution of these scripts, I came
> across *Paramiko and SSH* as a possible method.
>
> *My main question is:*
> Is using *SSH (via Paramiko in Django)* to execute Python scripts on the
> device considered *safe and scalable*, especially when extended to *many
> devices*?
>
> We are using OpenWISP’s VPN setup (WireGuard) for connectivity to the
> devices, so devices are reachable via IP internally.
>
> Any guidance on:
>
> -
>
> Best practices for scalable command execution,
> -
>
> Whether OpenWISP supports a more native or event-driven way to handle
> this,
> -
>
> Or if any part of the architecture should be rethought for better
> maintainability,
>
> would be greatly appreciated!
>
> Thanks a lot in advance!
>
> --
> You received this message because you are subscribed to the Google Groups "OpenWISP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
openwisp+u...@googlegroups.com.
> To view this discussion, visit
https://groups.google.com/d/msgid/openwisp/37c5f5b1-d968-4712-b498-b390da695e20n%40googlegroups.com.