0

I am in a project where I have to automate some tasks and for this the program must connect via SSH to some routers. My question is, how should I test this function? How can i simulate the ssh connection to the router and probe scenarios?

the function is something like this:

from jnpr.junos import Device
from lxml import etree

user = 'some_user'
password = 'some_password'
host = 'some_router_IP'

with Device(host=host , user=user, password=password) as jdev:
    rsp = jdev.rpc.get_interface_information()

with the response saved in the variable "rsp" calculations are made to show statistics of the network.

ehidoz
  • 21
  • 5
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Sep 03 '22 at 06:40

0 Answers0