Module Expr Str Import alias If CompareGtE AttributeLoad NameLoad attr Str body Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad For NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr If Call AttributeLoad NameLoad attr Str body If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Slice Num Num orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Slice Num orelse If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Slice Num orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return ListLoad Str Str Str Str Str Str Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return ListLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr orelse Assign NameStore Str For NameStore AttributeLoad NameLoad attr body If CompareEq NameLoad NameLoad body Return NameLoad For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad For NameStore AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Dict decorator_list FunctionDef arguments args NameParam NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list decorator_list
N/A N/A 
Handler for default device information.

Some devices require very specific information and action during client interaction.

The "device handlers" provide a number of callbacks that return the necessary
information. This allows the ncclient code to merely call upon this device handler -
once configured - instead of cluttering its code with if-statements.

Initially, not much is dealt with by the handler. However, in the future, as more
devices with specific handling are added, more handlers and more functions should be
implememted here, so that the ncclient code can use these callbacks to fill in the
device specific information.

Note that for proper import, the classname has to be:

    "<Devicename>DeviceHandler"

...where <Devicename> is something like "Default", "Nexus", etc.

All device-specific handlers derive from the DefaultDeviceHandler, which implements the
generic information needed for interaction with a Netconf server.

 N/A sys N/A N/A N/A sys version 3 N/A N/A xrange range DefaultDeviceHandler N/A object N/A N/A 
    Default handler for device specific information.

     N/A _EXEMPT_ERRORS N/A __init__ N/A N/A self device_params N/A None N/A N/A N/A self device_params device_params N/A N/A self _exempt_errors_exact_match N/A N/A N/A self _exempt_errors_startwith_wildcard_match N/A N/A N/A self _exempt_errors_endwith_wildcard_match N/A N/A N/A self _exempt_errors_full_wildcard_match N/A N/A i N/A xrange N/A len N/A self _EXEMPT_ERRORS N/A N/A e N/A N/A N/A N/A self _EXEMPT_ERRORS N/A i lower N/A N/A N/A e startswith * N/A N/A N/A N/A e endswith * N/A N/A N/A N/A N/A self _exempt_errors_full_wildcard_match append N/A e N/A 1 -1 N/A N/A N/A N/A N/A self _exempt_errors_startwith_wildcard_match append N/A e N/A 1 N/A N/A N/A N/A e endswith * N/A N/A N/A N/A N/A self _exempt_errors_endwith_wildcard_match append N/A e N/A -1 N/A N/A N/A N/A N/A self _exempt_errors_exact_match append e N/A add_additional_ssh_connect_params N/A N/A self kwargs N/A N/A N/A 
        Add device specific parameters for the SSH connect.

        Pass in the keyword-argument dictionary for the SSH connect call. The
        dictionary will be modified (!) with the additional device-specific parameters.

         N/A N/A get_capabilities N/A N/A self N/A N/A N/A 
        Return the capability list.

        A list of URI's representing the client's capabilities. This is used during
        the initial capability exchange. Modify (in a new device-handler subclass)
        as needed.

         N/A N/A urn:ietf:params:netconf:base:1.0 urn:ietf:params:netconf:base:1.1 urn:ietf:params:netconf:capability:writable-running:1.0 urn:ietf:params:netconf:capability:candidate:1.0 urn:ietf:params:netconf:capability:confirmed-commit:1.0 urn:ietf:params:netconf:capability:rollback-on-error:1.0 urn:ietf:params:netconf:capability:startup:1.0 urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file,https,sftp urn:ietf:params:netconf:capability:validate:1.0 urn:ietf:params:netconf:capability:xpath:1.0 urn:liberouter:params:netconf:capability:power-control:1.0 urn:ietf:params:netconf:capability:interleave:1.0 N/A get_xml_base_namespace_dict N/A N/A self N/A N/A N/A 
        A dictionary containing the base namespace.

        For lxml's nsmap, the base namespace should have a 'None' key.

            {
                None: "... base namespace... "
            }

        If no base namespace is needed, an empty dictionary should be
        returned.

         N/A N/A N/A get_xml_extra_prefix_kwargs N/A N/A self N/A N/A N/A 
        Return any extra prefix that should be sent with each RPC request.

        Since these are used as kwargs, the function should return
        either an empty dictionary if there are no additional arguments,
        or a dictionary with keyword parameters suitable fo the Element()
        function. Mostly, this is the "nsmap" argument.

            {
                "nsmap" : {
                    ... namespace definitions ...
                }
            }

         N/A N/A N/A get_ssh_subsystem_names N/A N/A self N/A N/A N/A 
        Return a list of names to try for the SSH subsystems.

        This always returns a list, even if only a single subsystem name is used.

        If the returned list contains multiple names then the various subsystems are
        tried in order, until one of them can successfully connect.

         N/A N/A netconf N/A is_rpc_error_exempt N/A N/A self error_text N/A N/A N/A 
        Check whether an RPC error message is excempt, thus NOT causing an exception.

        On some devices the RPC operations may indicate an error response, even though
        the operation actually succeeded. This may be in cases where a warning would be
        more appropriate. In that case, the client may be better advised to simply
        ignore that error and not raise an exception.

        Note that there is also the "raise_mode", set on session and manager, which
        controls the exception-raising behaviour in case of returned errors. This error
        filter here is independent of that: No matter what the raise_mode says, if the
        error message matches one of the exempt errors returned here, an exception
        will not be raised.

        The exempt error messages are defined in the _EXEMPT_ERRORS field of the device
        handler object and can be overwritten by child classes.  Wild cards are
        possible: Start and/or end with a '*' to indicate that the text can appear at
        the start, the end or the middle of the error message to still match. All
        comparisons are case insensitive.

        Return True/False depending on found match.

         N/A N/A error_text None N/A N/A error_text N/A N/A N/A N/A error_text lower strip N/A N/A error_text no error given N/A ex N/A self _exempt_errors_exact_match N/A N/A N/A error_text ex N/A N/A True N/A ex N/A self _exempt_errors_startwith_wildcard_match N/A N/A N/A N/A error_text endswith ex N/A N/A True N/A ex N/A self _exempt_errors_endwith_wildcard_match N/A N/A N/A N/A error_text startswith ex N/A N/A True N/A ex N/A self _exempt_errors_full_wildcard_match N/A N/A N/A ex error_text N/A N/A True N/A False N/A perform_qualify_check N/A N/A self N/A N/A N/A 
        During RPC operations, we perform some initial sanity checks on the responses.

        This check will fail for some devices, in which case this function here should
        return False in order to skip the test.

         N/A True N/A add_additional_operations N/A N/A self N/A N/A N/A 
        Add device/vendor specific operations.

         N/A N/A N/A handle_raw_dispatch N/A N/A self raw N/A N/A N/A False N/A handle_connection_exceptions N/A N/A self sshsession N/A N/A N/A False N/A transform_reply N/A N/A self N/A N/A N/A False N/A N/A