%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/modules/napalm_snmp.pyc

�
���^c@@s�dZddlmZmZmZddlZeje�Zddl	Z
ddl	mZdZdgZ
dZd�Zed	��Zeddddeed
��Zeddddeed��ZdS(
u�
NAPALM SNMP
===========

Manages SNMP on network devices.

:codeauthor: Mircea Ulinic <mircea@cloudflare.com>
:maturity:   new
:depends:    napalm
:platform:   unix

Dependencies
------------
- :mod:`NAPALM proxy minion <salt.proxy.napalm>`
- :mod:`NET basic features <salt.modules.napalm_network>`

.. seealso::
    :mod:`SNMP configuration management state <salt.states.netsnmp>`

.. versionadded:: 2016.11.0
i(tabsolute_importtunicode_literalstprint_functionN(tproxy_napalm_wrapusnmpunapalmunapalm_snmpcC@stjjjttt�S(u_
    NAPALM library must be installed for this module to work and run in a (proxy) minion.
    (tsalttutilstnapalmtvirtualt__opts__t__virtualname__t__file__(((s</usr/lib/python2.7/site-packages/salt/modules/napalm_snmp.pyt__virtual__/scK@stjjjtdi�S(ur
    Returns the SNMP configuration

    CLI Example:

    .. code-block:: bash

        salt '*' snmp.config
    uget_snmp_information(RRRtcallt
napalm_device(tkwargs((s</usr/lib/python2.7/site-packages/salt/modules/napalm_snmp.pytconfig>s
cK@sidd6|d6|d6}|r.||d<n|rA||d<n|rT||d<n|rg||d<nt|d	<td
|�S(u7
    Removes a configuration element from the SNMP configuration.

    :param chassis_id: (optional) Chassis ID

    :param community: (optional) A dictionary having the following optional keys:

    - acl (if any policy / ACL need to be set)
    - mode: rw or ro. Default: ro

    :param contact: Contact details

    :param location: Location

    :param test: Dry run? If set as True, will apply the config, discard and return the changes. Default: False

    :param commit: Commit? (default: True) Sometimes it is not needed to commit
        the config immediately after loading the changes. E.g.: a state loads a
        couple of parts (add / remove / update) and would not be optimal to
        commit after each operation.  Also, from the CLI when the user needs to
        apply the similar changes before committing, can specify commit=False
        and will not discard the config.

    :raise MergeConfigException: If there is an error on the configuration sent.
    :return: A dictionary having the following keys:

    - result (bool): if the config was applied successfully. It is `False`
      only in case of failure. In case there are no changes to be applied
      and successfully performs all operations it is still `True` and so
      will be the `already_configured` flag (example below)
    - comment (str): a message for the user
    - already_configured (bool): flag to check if there were no changes applied
    - diff (str): returns the config changes applied

    CLI Example:

    .. code-block:: bash

        salt '*' snmp.remove_config community='abcd'
    udelete_snmp_configu
template_nameutestucommitu
chassis_idu	communityucontactulocationuinherit_napalm_deviceunet.load_template(R
t__salt__(t
chassis_idt	communitytcontacttlocationttesttcommitRtdic((s</usr/lib/python2.7/site-packages/salt/modules/napalm_snmp.pyt
remove_configSs2





cK@sidd6|d6|d6}|r.||d<n|rA||d<n|rT||d<n|rg||d<nt|d	<td
|�S(u�
    Updates the SNMP configuration.

    :param chassis_id: (optional) Chassis ID
    :param community: (optional) A dictionary having the following optional keys:

    - acl (if any policy / ACL need to be set)
    - mode: rw or ro. Default: ro

    :param contact: Contact details
    :param location: Location
    :param test: Dry run? If set as True, will apply the config, discard and return the changes. Default: False
    :param commit: Commit? (default: True) Sometimes it is not needed to commit the config immediately
        after loading the changes. E.g.: a state loads a couple of parts (add / remove / update)
        and would not be optimal to commit after each operation.
        Also, from the CLI when the user needs to apply the similar changes before committing,
        can specify commit=False and will not discard the config.
    :raise MergeConfigException: If there is an error on the configuration sent.
    :return a dictionary having the following keys:

    - result (bool): if the config was applied successfully. It is `False` only
      in case of failure. In case there are no changes to be applied and
      successfully performs all operations it is still `True` and so will be
      the `already_configured` flag (example below)
    - comment (str): a message for the user
    - already_configured (bool): flag to check if there were no changes applied
    - diff (str): returns the config changes applied

    CLI Example:

    .. code-block:: bash

        salt 'edge01.lon01' snmp.update_config location="Greenwich, UK" test=True

    Output example (for the CLI example above):

    .. code-block:: yaml

        edge01.lon01:
            ----------
            already_configured:
                False
            comment:
                Configuration discarded.
            diff:
                [edit snmp]
                -  location "London, UK";
                +  location "Greenwich, UK";
            result:
                True
    usnmp_configu
template_nameutestucommitu
chassis_idu	communityucontactulocationuinherit_napalm_deviceunet.load_template(R
R(RRRRRRRR((s</usr/lib/python2.7/site-packages/salt/modules/napalm_snmp.pyt
update_config�s=





(unapalm_snmp(t__doc__t
__future__RRRtloggingt	getLoggerR
tlogtsalt.utils.napalmRRR	t__proxyenabled__t__virtual_aliases__RRtNonetFalsetTrueRR(((s</usr/lib/python2.7/site-packages/salt/modules/napalm_snmp.pyt<module>s0		?

Zerion Mini Shell 1.0