08-30-2025 07:54 AM
Hi Guys,
I am looking for an API in PyATS (or Genie, Unicon...) that would copy a file from the Linux client (where my PyATS script is running) to a router declared in the PyATS testbed.
I've found various APIs :
I would expect to have an API to execute something like :
scp -O myfile 1.2.3.4:bootflash:/myfile
with the credentials of the 1.2.3.4 router coming from the testbed.
Ok I could activate an FTP (or whatever) server on the client then execute the copy command from the IOS but why such a complexity ?
Did I miss something in the PyATS toolbox ?
BR, Damien.
08-30-2025 09:10 AM
i am sure you can achieve this using fastAPI+Python+Pyats - use any LLM like perplexity or google AI or chat GBT give you steps.
08-31-2025 11:25 PM
Yes I'm sure it would be possible to use some SSH lib to do this ... but the need is so obvious that I would have expected to have some API within PyATS for this.
09-01-2025 01:46 AM
Sure Python and PyATS support that SSH feature and run that commands.
08-30-2025 09:52 AM
You could try the execute command https://devnetdan.com/2021/06/14/pyats-and-genie-part-2/ this you should be able to run the scp command on the local machine where your PyATS script is running.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide