Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias identifier Import alias identifier Import alias identifier ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list Assign NameStore Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Raise Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad With Call NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad Lambda arguments args defaults CompareEq NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore BoolOpOr CompareEq Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign NameStore Num FunctionDef arguments args NameParam defaults body Expr Str Return IfExp CompareNotEq AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot NameLoad CompareNotEq NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Return NameLoad If CompareLt AttributeLoad NameLoad attr Str body If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str orelse Import alias If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Assign NameStore IfExp Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr If BoolOpAnd CompareIs AttributeLoad AttributeLoad NameLoad attr attr NameLoad CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad orelse If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BoolOpOr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BoolOpOr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If CompareIsNot NameLoad Num body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad BoolOpAnd CompareIs AttributeLoad NameLoad attr NameLoad CompareIs AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Dict Str Str Str NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr NameLoad ExceptHandler type AttributeLoad NameLoad attr name NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BinOpSub NameLoad NameLoad If CompareLt AttributeLoad NameLoad attr Num body Raise Call AttributeLoad NameLoad attr NameLoad If CompareGt Call AttributeLoad Call NameLoad NameLoad attr Str Num body Raise Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Raise NameLoad ExceptHandler type AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr NameLoad ExceptHandler type NameLoad name NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Raise NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Lambda arguments args defaults Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse Raise Call NameLoad BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr TryExcept body Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr ExceptHandler type AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr NameLoad ExceptHandler type NameLoad name NameStore body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore IfExp CompareEq Call AttributeLoad NameLoad attr Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Raise Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str NameLoad Raise If CompareIn Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad Str Str body If CompareEq AttributeLoad NameLoad attr Dict body Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str If BoolOpOr CompareGtE SubscriptLoad AttributeLoad NameLoad attr Index Num Num BoolOpAnd CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num CompareGtE SubscriptLoad AttributeLoad NameLoad attr Index Num Num body TryExcept body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Str NameLoad TryExcept body Assign NameStore SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body If CompareIsNot Call AttributeLoad AttributeLoad NameLoad attr attr Str body Return NameLoad Return NameLoad If Call AttributeLoad NameLoad attr Str body Return Call SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad orelse Return NameLoad decorator_list NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str NameLoad body Expr Str If BoolOpAnd CompareNotIn Str NameLoad CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq Call AttributeLoad NameLoad attr Str body Return NameLoad If CompareIs NameLoad NameLoad body Return Str If CompareIn AttributeLoad NameLoad attr ListLoad Str Str body Return AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Return Call AttributeLoad NameLoad attr Str If CompareEq AttributeLoad NameLoad attr Str body Return SubscriptLoad NameLoad Index Num Return NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareIsNot AttributeLoad NameLoad attr Str body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad orelse Return BinOpAdd Str NameLoad ExceptHandler type NameLoad name NameStore body Return BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str TryExcept body Assign NameStore BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareEq NameLoad Str body Return Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Return SubscriptLoad NameLoad Index Num handlers ExceptHandler body Return BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str If Call NameLoad NameLoad body For NameStore NameLoad body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr For NameStore NameLoad body If CompareLt AttributeLoad NameLoad attr Str body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr orelse Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Return For NameStore Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str For NameStore NameLoad body TryExcept body Expr Call NameLoad NameLoad AttributeLoad NameLoad attr handlers ExceptHandler body If NameLoad body Raise Expr Call AttributeLoad NameLoad attr Str NameLoad Return decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BinOpAdd NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore NameLoad While CompareLt Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Break handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Num Pass orelse Assign NameStore BinOpSub Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A os N/A types N/A platform N/A warnings N/A traceback N/A socket N/A datetime N/A time N/A sys N/A json N/A re lxml etree ncclient manager netconf_ssh N/A ncclient.transport.errors NcErrors N/A ncclient.operations.errors NcOpErrors ncclient.operations RPCError N/A paramiko N/A jinja2 jnpr.junos.rpcmeta _RpcMetaExec jnpr.junos exception EzErrors jnpr.junos.cfg Resource jnpr.junos.facts * jnpr.junos jxml JXML jnpr.junos.decorators timeoutDecorator normalizeDecorator N/A _MODULEPATH N/A N/A N/A os path dirname __file__ _MyTemplateLoader N/A N/A jinja2 BaseLoader N/A N/A 
    Create a jinja2 template loader class that can be used to
    load templates from all over the filesystem, but defaults
    to the CWD and the 'templates' directory of the module
     __init__ N/A N/A self N/A N/A N/A N/A self paths N/A . N/A N/A N/A os path join _MODULEPATH templates N/A get_source N/A N/A self environment template N/A N/A _in_path N/A N/A dir N/A N/A N/A N/A N/A N/A os path exists N/A N/A N/A os path join dir template N/A N/A path N/A list N/A filter _in_path N/A self paths N/A N/A path N/A N/A N/A N/A jinja2 TemplateNotFound template N/A path N/A N/A N/A os path join N/A path N/A 0 template N/A mtime N/A N/A N/A os path getmtime path N/A N/A open path f N/A N/A source N/A N/A f read N/A N/A source path N/A N/A N/A N/A N/A mtime N/A N/A N/A os path getmtime path N/A N/A N/A _Jinja2ldr N/A N/A jinja2 Environment loader N/A _MyTemplateLoader Device N/A object N/A N/A 
    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

     N/A ON_JUNOS N/A N/A N/A N/A N/A N/A platform system upper JUNOS N/A N/A N/A N/A platform release startswith JNPR N/A auto_probe 0 hostname N/A N/A self N/A N/A N/A 
        :returns: the host-name of the Junos device.
         N/A N/A N/A N/A self _hostname localhost N/A self _hostname N/A N/A N/A self facts get hostname N/A property user N/A N/A self N/A N/A N/A 
        :returns: the login user (str) accessing the Junos device
         N/A N/A self _auth_user N/A property password N/A N/A self N/A N/A N/A 
        :returns: ``None`` - do not provide the password
         N/A None N/A property password N/A N/A self value N/A N/A N/A 
        Change the authentication password value.  This is handy in case
        the calling program needs to attempt different passwords.
         N/A N/A self _auth_password value N/A N/A password setter logfile N/A N/A self N/A N/A N/A 
        :returns: exsiting logfile ``file`` object.
         N/A N/A self _logfile N/A property logfile N/A N/A self value N/A N/A N/A 
        Assigns an opened file object to the device for logging
        If there is an open logfile, and 'value' is ``None`` or ``False``
        then close the existing file.

        :param file value: An open ``file`` object.

        :returns: the new logfile ``file`` object

        :raises ValueError:
            When **value** is not a ``file`` object
         N/A N/A N/A value N/A None N/A self _logfile N/A N/A rc N/A N/A N/A self _logfile close N/A N/A self _logfile False N/A rc N/A N/A N/A sys version 3 N/A N/A N/A N/A isinstance value file N/A N/A N/A ValueError value must be a file object N/A N/A io N/A N/A N/A isinstance value N/A io TextIOWrapper N/A N/A N/A ValueError value must be a file object N/A N/A self _logfile value N/A N/A self _logfile N/A N/A logfile setter timeout N/A N/A self N/A N/A N/A 
        :returns: the current RPC timeout value (int) in seconds.
         N/A N/A N/A self _conn timeout N/A property timeout N/A N/A self value N/A N/A N/A 
        Used to change the RPC timeout value (default=30 sec).

        :param int value:
            New timeout value in seconds
         N/A N/A N/A self _conn timeout value N/A N/A timeout setter facts N/A N/A self N/A N/A N/A 
        :returns: Device fact dictionary
         N/A N/A self _facts N/A property facts N/A N/A self value N/A N/A N/A  read-only property  N/A N/A RuntimeError facts is read-only! N/A N/A facts setter manages N/A N/A self N/A N/A N/A 
        :returns:
            ``list`` of Resource Managers/Utilities attached to this
            instance using the :meth:`bind` method.
         N/A N/A self _manages N/A property transform N/A N/A self N/A N/A N/A 
        :returns: the current RPC XML Transformation.
         N/A N/A N/A N/A self _conn _device_handler transform_reply N/A property transform N/A N/A self func N/A N/A N/A 
        Used to change the RPC XML Transformation.

        :param lambda value:
            New transform lambda
         N/A N/A N/A N/A self _conn _device_handler transform_reply func N/A N/A transform setter __repr__ N/A N/A self N/A N/A N/A N/A Device(%s) N/A self hostname N/A _sshconf_lkup N/A N/A self N/A N/A N/A N/A self _ssh_config N/A N/A sshconf_path N/A N/A N/A os path expanduser N/A self _ssh_config N/A N/A home N/A N/A os getenv HOME N/A N/A home N/A N/A None N/A sshconf_path N/A N/A N/A os path join N/A N/A os getenv HOME .ssh/config N/A N/A N/A N/A N/A os path exists sshconf_path N/A N/A None N/A N/A sshconf N/A N/A paramiko SSHConfig N/A N/A open sshconf_path r fp N/A N/A N/A N/A sshconf parse fp N/A found N/A N/A sshconf lookup N/A self _hostname N/A N/A self _hostname N/A N/A found get hostname N/A self _hostname N/A N/A self _port N/A N/A found get port N/A self _port N/A N/A self _conf_auth_user N/A N/A found get user N/A N/A self _conf_ssh_private_key_file N/A N/A found get identityfile N/A sshconf_path N/A __init__ N/A N/A self N/A vargs kvargs N/A N/A 
        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

        :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)

        :param bool gather_facts:
            *OPTIONAL* default is ``True``.  If ``False`` then the
            facts are not gathered on call to :meth:`open`

        :param bool auto_probe:
            *OPTIONAL*  if non-zero then this enables auto_probe at time of
            :meth:`open` and defines the amount of time(sec) for the
            probe timeout

        :param str ssh_private_key_file:
            *OPTIONAL* The path to the SSH private key file.
            This can be used if you need to provide a private key rather than
            loading the key into the ssh-key-ring/environment.  if your
            ssh-key requires a password, then you must provide it via
            **passwd**

        :param str ssh_config:
            *OPTIONAL* The path to the SSH configuration file.
            This can be used to load SSH information from a configuration file.
            By default ~/.ssh/config is queried.

        :param bool normalize:
            *OPTIONAL* default is ``False``.  If ``True`` then the
            XML returned by :meth:`execute` will have whitespace normalized
         N/A hostname N/A N/A len vargs N/A vargs N/A 0 N/A N/A kvargs get host N/A N/A self _port N/A N/A kvargs get port 830 N/A N/A self _gather_facts N/A N/A kvargs get gather_facts True N/A N/A self _normalize N/A N/A kvargs get normalize False N/A N/A self _auto_probe N/A N/A kvargs get auto_probe N/A N/A self __class__ auto_probe N/A N/A N/A N/A N/A self __class__ ON_JUNOS True N/A hostname None N/A N/A N/A self _auth_user None N/A N/A self _auth_password None N/A N/A self _hostname localhost N/A N/A self _ssh_private_key_file None N/A N/A self _ssh_config None N/A N/A N/A hostname None N/A N/A N/A ValueError You must provide the 'host' value N/A N/A self _hostname hostname N/A N/A self _auth_user N/A N/A os getenv USER N/A N/A self _conf_auth_user None N/A N/A self _conf_ssh_private_key_file None N/A N/A self _ssh_config N/A N/A kvargs get ssh_config N/A N/A self _sshconf_path N/A N/A self _sshconf_lkup N/A N/A self _auth_user N/A N/A N/A kvargs get user N/A self _conf_auth_user N/A self _auth_user N/A N/A self _ssh_private_key_file N/A N/A N/A kvargs get ssh_private_key_file N/A self _conf_ssh_private_key_file N/A N/A self _auth_password N/A N/A N/A kvargs get password N/A N/A kvargs get passwd N/A N/A self _conn None N/A N/A self _j2ldr _Jinja2ldr N/A N/A self _manages N/A N/A N/A self _facts N/A N/A N/A self connected False N/A N/A self rpc N/A _RpcMetaExec self N/A open N/A N/A self N/A vargs kvargs N/A N/A 
        Opens a connection to the device using existing login/auth
        information.

        :param bool gather_facts:
            If set to ``True``/``False`` will override the device
            instance value for only this open process

        :param bool auto_probe:
            If non-zero then this enables auto_probe and defines the amount
            of time/seconds for the probe timeout

        :param bool normalize:
            If set to ``True``/``False`` will override the device
            instance value for only this open process

        :returns Device: Device instance (*self*).

        :raises ProbeError:
            When **auto_probe** is ``True`` and the probe activity
            exceeds the timeout

        :raises ConnectAuthError:
            When provided authentication credentials fail to login

        :raises ConnectRefusedError:
            When the device does not have NETCONF enabled

        :raises ConnectTimeoutError:
            When the the :meth:`Device.timeout` value is exceeded
            during the attempt to connect to the remote device

        :raises ConnectError:
            When an error, other than the above, occurs.  The
            originating ``Exception`` is assigned as ``err._orig``
            and re-raised to the caller.
         N/A auto_probe N/A N/A kvargs get auto_probe N/A self _auto_probe N/A N/A auto_probe 0 N/A N/A N/A N/A N/A self probe auto_probe N/A N/A N/A N/A EzErrors ProbeError self N/A N/A N/A ts_start N/A N/A N/A datetime datetime now N/A allow_agent N/A bool N/A N/A N/A self _auth_password None N/A N/A self _ssh_private_key_file None N/A N/A self _conn N/A N/A netconf_ssh connect host N/A self _hostname port N/A self _port username N/A self _auth_user password N/A self _auth_password hostkey_verify False key_filename N/A self _ssh_private_key_file allow_agent allow_agent ssh_config N/A N/A self _sshconf_lkup device_params N/A name local junos False N/A N/A N/A N/A NcErrors AuthenticationError N/A err N/A N/A N/A N/A EzErrors ConnectAuthError self N/A N/A N/A NcErrors SSHError N/A err N/A N/A ts_err N/A N/A N/A datetime datetime now N/A diff_ts N/A ts_err ts_start N/A N/A N/A diff_ts seconds 3 N/A N/A N/A N/A EzErrors ConnectRefusedError self N/A N/A N/A N/A N/A str err find not open 0 N/A N/A N/A N/A EzErrors ConnectTimeoutError self N/A N/A cnx N/A N/A EzErrors ConnectError self N/A N/A cnx _orig err N/A cnx N/A N/A N/A socket gaierror N/A N/A N/A N/A EzErrors ConnectUnknownHostError self N/A N/A Exception N/A err N/A N/A cnx_err N/A N/A EzErrors ConnectError self N/A N/A cnx_err _orig err N/A cnx_err N/A N/A self connected True N/A N/A self _nc_transform N/A self transform N/A N/A self _norm_transform N/A N/A N/A N/A N/A N/A N/A JXML normalize_xslt encode UTF-8 N/A normalize N/A N/A kvargs get normalize N/A self _normalize N/A N/A normalize True N/A N/A N/A self transform N/A self _norm_transform N/A gather_facts N/A N/A kvargs get gather_facts N/A self _gather_facts N/A N/A gather_facts True N/A N/A N/A N/A self facts_refresh N/A self N/A close N/A N/A self N/A N/A N/A 
        Closes the connection to the device.
         N/A N/A N/A N/A self _conn close_session N/A N/A self connected False N/A execute N/A N/A self rpc_cmd N/A kvargs N/A N/A 
        Executes an XML RPC and returns results as either XML or native python

        :param rpc_cmd:
          can either be an XML Element or xml-as-string.  In either case
          the command starts with the specific command element, i.e., not the
          <rpc> element itself

        :param func to_py':
          Is a caller provided function that takes the response and
          will convert the results to native python types.  all kvargs
          will be passed to this function as well in the form::

            to_py( self, rpc_rsp, **kvargs )

        :raises ValueError:
            When the **rpc_cmd** is of unknown origin

        :raises PermissionError:
            When the requested RPC command is not allowed due to
            user-auth class privilege controls on Junos

        :raises RpcError:
            When an ``rpc-error`` element is contained in the RPC-reply

        :returns:
            RPC-reply as XML object.  If **to_py** is provided, then
            that function is called, and return of that function is
            provided back to the caller; presumably to convert the XML to
            native python data-types (e.g. ``dict``).
         N/A N/A N/A self connected True N/A N/A N/A N/A EzErrors ConnectClosedError self N/A N/A isinstance rpc_cmd str N/A N/A rpc_cmd_e N/A N/A etree XML rpc_cmd N/A N/A N/A isinstance rpc_cmd N/A etree _Element N/A N/A rpc_cmd_e rpc_cmd N/A N/A N/A ValueError N/A Dont know what to do with rpc of type %s N/A N/A rpc_cmd __class__ __name__ N/A N/A N/A rpc_rsp_e N/A N/A N/A N/A self _conn rpc rpc_cmd_e _NCElement__doc N/A N/A N/A N/A NcOpErrors TimeoutExpiredError N/A N/A N/A N/A EzErrors RpcTimeoutError self N/A rpc_cmd_e tag N/A self timeout N/A N/A N/A NcErrors TransportError N/A N/A N/A N/A EzErrors ConnectClosedError self N/A N/A RPCError N/A err N/A N/A rsp N/A N/A JXML remove_namespaces N/A err xml N/A e N/A N/A N/A N/A rsp findtext error-message permission denied N/A EzErrors PermissionError N/A EzErrors RpcError N/A N/A e cmd rpc_cmd_e rsp rsp errs err N/A N/A Exception N/A err N/A N/A N/A N/A warnings warn An unknown exception occured - please report. RuntimeWarning N/A N/A N/A N/A N/A N/A rpc_cmd_e attrib get format N/A json JSON N/A N/A N/A N/A self _facts N/A N/A N/A N/A N/A self facts_refresh N/A ver_info N/A N/A self _facts N/A version_info N/A N/A N/A N/A N/A ver_info major N/A 0 15 N/A N/A N/A N/A ver_info major N/A 0 14 N/A N/A N/A ver_info major N/A 1 2 N/A N/A N/A N/A N/A N/A json loads N/A rpc_rsp_e text N/A N/A N/A ValueError N/A ex N/A N/A N/A N/A N/A ex message startswith Extra data N/A N/A N/A N/A json loads N/A N/A re sub \s?{\s?}\s? N/A rpc_rsp_e text N/A N/A N/A N/A warnings warn Native JSON support is only from 14.2 onwards RuntimeWarning N/A N/A N/A ret_rpc_rsp N/A rpc_rsp_e N/A 0 N/A N/A N/A IndexError N/A N/A N/A N/A N/A N/A rpc_rsp_e text strip N/A N/A rpc_rsp_e N/A True N/A N/A N/A kvargs get to_py N/A N/A N/A N/A kvargs N/A to_py self ret_rpc_rsp kvargs N/A N/A ret_rpc_rsp N/A normalizeDecorator timeoutDecorator cli N/A N/A self command format warning N/A text True N/A N/A 
        Executes the CLI command and returns the CLI text output by default.

        :param str command:
          The CLI command to execute, e.g. "show version"

        :param str format:
          The return format, by default is text.  You can optionally select
          "xml" to return the XML structure.

        .. note::
            You can also use this method to obtain the XML RPC command for a
            given CLI command by using the pipe filter ``| display xml rpc``. When
            you do this, the return value is the XML RPC command. For example if
            you provide as the command ``show version | display xml rpc``, you will
            get back the XML Element ``<get-software-information>``.

        .. warning::
            This function is provided for **DEBUG** purposes only!
            **DO NOT** use this method for general automation purposes as
            that puts you in the realm of "screen-scraping the CLI".  The purpose of
            the PyEZ framework is to migrate away from that tooling pattern.
            Interaction with the device should be done via the RPC function.

        .. warning::
            You cannot use "pipe" filters with **command** such as ``| match``
            or ``| count``, etc.  The only value use of the "pipe" is for the
            ``| display xml rpc`` as noted above.
         N/A N/A N/A display xml rpc command N/A warning True N/A N/A N/A N/A warnings simplefilter always N/A N/A N/A warnings warn CLI command is for debug use only! RuntimeWarning N/A N/A N/A warnings resetwarnings N/A N/A N/A rsp N/A N/A N/A self rpc cli command format N/A N/A N/A isinstance rsp dict N/A N/A N/A format lower json N/A N/A rsp N/A N/A rsp True N/A N/A N/A N/A N/A rsp tag N/A output rpc-reply N/A N/A N/A rsp text N/A N/A N/A rsp tag configuration-information N/A N/A N/A N/A rsp findtext configuration-output N/A N/A N/A rsp tag rpc N/A N/A N/A rsp N/A 0 N/A rsp N/A N/A N/A N/A EzErrors RpcError N/A ex N/A N/A N/A N/A ex message N/A N/A N/A %s: %s N/A N/A ex message command N/A N/A N/A invalid command:  command N/A N/A Exception N/A ex N/A N/A N/A invalid command:  command N/A display_xml_rpc N/A N/A self command format N/A xml N/A N/A 
        Executes the CLI command and returns the CLI text output by default.

        :param str command:
          The CLI command to retrieve XML RPC for, e.g. "show version"

        :param str format:
          The return format, by default is XML.  You can optionally select
          "text" to return the XML structure as a string.
         N/A N/A N/A command N/A command | display xml rpc N/A rsp N/A N/A N/A self rpc cli command N/A N/A format text N/A N/A N/A N/A etree tostring N/A rsp N/A 0 N/A N/A rsp N/A 0 N/A N/A N/A N/A N/A invalid command:  command N/A Template N/A N/A self filename parent gvars N/A None None N/A N/A 
        Used to return a Jinja2 :class:`Template`.

        :param str filename:
            file-path to Jinja2 template file on local device

        :returns: Jinja2 :class:`Template` give **filename**.
         N/A N/A N/A N/A self _j2ldr get_template filename parent gvars N/A bind N/A N/A self N/A vargs kvargs N/A N/A 
        Used to attach things to this Device instance and make them a
        property of the :class:Device instance.  The most common use
        for bind is attaching Utility instances to a :class:Device.
        For example::

            from jnpr.junos.utils.config import Config

            dev.bind( cu=Config )
            dev.cu.lock()
            # ... load some changes
            dev.cu.commit()
            dev.cu.unlock()

        :param list vargs:
          A list of functions that will get bound as instance methods to
          this Device instance.

          .. warning:: Experimental.

        :param new_property:
          name/class pairs that will create resource-managers bound as
          instance attributes to this Device instance.  See code example above
         N/A N/A len vargs N/A N/A fn vargs N/A N/A N/A hasattr self N/A fn __name__ N/A N/A N/A ValueError N/A request attribute name %s already exists N/A fn __name__ N/A fn vargs N/A N/A N/A N/A sys version 3 N/A N/A N/A N/A self __dict__ N/A N/A fn __name__ N/A N/A types MethodType fn self N/A self __class__ N/A N/A N/A N/A self __dict__ N/A N/A fn __name__ N/A N/A types MethodType fn N/A self __class__ N/A N/A name N/A N/A kvargs keys N/A N/A N/A hasattr self name N/A N/A N/A ValueError N/A requested attribute name %s already exists name N/A N/A name thing N/A N/A kvargs items N/A N/A new_inst N/A thing self N/A N/A N/A self __dict__ N/A name new_inst N/A N/A N/A N/A self _manages append name N/A facts_refresh N/A N/A self exception_on_failure N/A False N/A N/A 
        Reload the facts from the Junos device into :attr:`facts` property.

        :param bool exception_on_failure: To raise exception or warning when
                             facts gathering errors out.

         N/A gather FACT_LIST N/A N/A N/A N/A N/A gather self N/A self _facts N/A N/A N/A N/A exception_on_failure N/A N/A N/A N/A N/A warnings warn Facts gathering is incomplete. To know the reason call "dev.facts_refresh(exception_on_failure=True)" RuntimeWarning N/A N/A probe N/A N/A self timeout intvtimeout N/A 5 1 N/A N/A 
        Probe the device to determine if the Device can accept a remote
        connection.
        This method is meant to be called *prior* to :open():
        This method will not work with ssh-jumphost environments.

        :param int timeout:
          The probe will report ``True``/``False`` if the device report
          connectivity within this timeout (seconds)

        :param int intvtimeout:
          Timeout interval on the socket connection. Generally you should not
          change this value, but you can if you want to twiddle the frequency
          of the socket attempts on the connection

        :returns: ``True`` if probe is successful, ``False`` otherwise
         N/A start N/A N/A N/A datetime datetime now N/A end N/A start N/A N/A datetime timedelta seconds timeout N/A probe_ok True N/A N/A N/A N/A N/A datetime datetime now end N/A N/A s N/A N/A socket socket N/A socket AF_INET N/A socket SOCK_STREAM N/A N/A N/A s settimeout intvtimeout N/A N/A N/A N/A N/A s connect N/A N/A self hostname N/A self _port N/A N/A N/A s shutdown N/A socket SHUT_RDWR N/A N/A N/A s close N/A N/A N/A N/A N/A N/A N/A time sleep 1 N/A N/A N/A elapsed N/A N/A N/A N/A datetime datetime now start N/A probe_ok False N/A probe_ok N/A __enter__ N/A N/A self N/A N/A N/A N/A N/A self open N/A self N/A __exit__ N/A N/A self exc_type exc_val exc_tb N/A N/A N/A N/A N/A N/A self _conn connected N/A N/A isinstance exc_val N/A EzErrors ConnectError N/A N/A N/A N/A self close N/A N/A