labuser@saltsackmaster:~$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from jnpr.junos.device import Device
>>> help (Device)
Help on class Device in module jnpr.junos.device:
class Device(_Connection)
| Junos Device class.
|
| :attr:`ON_JUNOS`:
| **READ-ONLY** -
| Auto-set to ``True`` when this code is running on a Junos device,
| vs. running on a local-server remotely connecting to a device.
|
| :attr:`auto_probe`:
| When non-zero the call to :meth:`open` will probe for NETCONF
| reachability before proceeding with the NETCONF session establishment.
| If you want to enable this behavior by default, you could do the
| following in your code::
|
| from jnpr.junos import Device
|
| # set all device open to auto-probe with timeout of 10 sec
| Device.auto_probe = 10
|
| dev = Device( ... )
| dev.open() # this will probe before attempting NETCONF connect
|
| Method resolution order:
| Device
| _Connection
| builtins.object
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, exc_type, exc_val, exc_tb)
|
| __init__(self, *vargs, **kvargs)
| Device object constructor.
|
| :param str vargs[0]: host-name or ipaddress. This is an
| alternative for **host**
|
| :param str host:
| **REQUIRED** host-name or ipaddress of target device, unless sock_fd is provided
|
| :param str sock_fd:
| **REQUIRED** file descriptor of an existing socket instead of providing a host.
| Used for outbound ssh.
|
| :param str user:
| *OPTIONAL* login user-name, uses $USER if not provided
|
| :param str passwd:
| *OPTIONAL* if not provided, assumed ssh-keys are enforced
|
| :param int port:
| *OPTIONAL* NETCONF port (defaults to 830)
|
:
|