%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@sdZddlmZddlZeje�ZddlZyddl	m
Z
Wn!ek
rtddlm
Z
nXdZ
dgZdZd�Zddd	�Zdd
�Zdd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS(s�
PeeringDB Module
================

.. versionadded:: 2019.2.0

Execution module for the basic interaction with the
`PeeringDB <https://www.peeringdb.com/>`_ API.

While for GET operations (the functions prefixed by ``get_``) the credentials
are optional, there are some specific details that are visible only to
authenticated users. Moreover, the credentials are required when adding or
updating information. That means, the module can equally work out of the box
without any further configuration with the limitations imposed by the PeeringDB
API.

For complete API documentation, please refer to https://www.peeringdb.com/apidocs/.

Configuration (in the opts or Pillar):

.. code-block:: yaml

    peeringdb:
      username: salt
      password: 5@1t
i(tabsolute_importN(tclean_kwargst	peeringdbt*shttps://www.peeringdb.com/apicC@stS(N(t__virtualname__(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pyt__virtual__/scC@sVtdddi�}|s1|jd|�}n|sL|jd|�}n||fS(Nsconfig.mergeRtdefaulttusernametpassword(t__salt__tget(RRt
peeringdb_cfg((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pyt	_get_auth3scC@s8|r"djdtd|d|�Sdjdtd|�S(Ns{base}/{endp}/{id}tbasetendptids
{base}/{endp}(tformatt
PEERINGDB_URL(tendpointR((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pyt
_build_url=scK@s�t|jdd�|jdd��\}}t|�}t|d|�}idd6td6dd6}tjjj	|dd	d
td|d|d|�}d|kr�|j
itd6|dd6�|S|d
d|d<|S(NRRRttcommenttresulttouttmethodtGETtdecodetparamsterrortdicttdata(RtpoptNoneRRtTruetsalttutilsthttptquerytupdatetFalse(RRtkwargsRRturltrettres((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pyt
_get_endpointCs*
		cK@s
td|�S(s\
    Return the details of a network identified using the search filters
    specified in the query.

    .. note::
        If no ``id`` or filter arguments are specified, it will return all the
        possible networks registered in PeeringDB.

        The available filters are documented at:
        https://www.peeringdb.com/apidocs/#!/net/net_list

    CLI Example:

    .. code-block:: bash

        salt '*' peeringdb.get_net id=4224
        salt '*' peeringdb.get_net asn=13335
        salt '*' peeringdb.get_net city='Salt Lake City'
        salt '*' peeringdb.get_net name__startswith=GTT
    tnet(R,(R(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pytget_net]scK@s
td|�S(s�
    Return the details of the facility identified using the search
    filters specified in the query.

    .. note::
        If no ``id`` or filter arguments are specified, it will return all the
        possible facilities registered in PeeringDB.

        The available filters are documented at:
        https://www.peeringdb.com/apidocs/#!/netfac/netfac_list

    CLI Example:

    .. code-block:: bash

        salt '*' peeringdb.get_fac id=1774
        salt '*' peeringdb.get_fac state=UT
    tfac(R,(R(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pytget_facuscK@s
td|�S(s�
    Return the details of an IX (Internet Exchange) using the search filters
    specified in the query.

    .. note::
        If no ``id`` or filter arguments are specified, it will return all the
        possible IXs registered in PeeringDB.

        The available filters are documented at:
        https://www.peeringdb.com/apidocs/#!/ix/ix_list

    CLI Example:

    .. code-block:: bash

        salt '*' peeringdb.get_ix id=1
        salt '*' peeringdb.get_ix city='Milwaukee'
    tix(R,(R(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pytget_ix�scK@s
td|�S(s

    Return the details of an IX (Internet Exchange) facility using the search
    filters specified in the query.

    .. note::
        If no ``id`` or filter arguments are specified, it will return all the
        possible IX facilities registered in PeeringDB.

        The available filters are documented at:
        https://www.peeringdb.com/apidocs/#!/ixfac/ixfac_list

    CLI Example:

    .. code-block:: bash

        salt '*' peeringdb.get_ixfac id=1
        salt '*' peeringdb.get_ixfac city='Milwaukee'
    tixfac(R,(R(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pyt	get_ixfac�scK@s
td|�S(sV
    Return the details of an IX (Internet Exchange) together with the networks
    available in this location (and their details), using the search filters
    specified in the query.

    .. note::
        If no ``id`` or filter arguments are specified, it will return all the
        possible IX LAN facilities registered in PeeringDB.

        The available filters are documented at:
        https://www.peeringdb.com/apidocs/#!/ixlan/ixlan_list

    CLI Example:

    .. code-block:: bash

        salt '*' peeringdb.get_ixlan id=780
        salt '*' peeringdb.get_ixlan city='Milwaukee'
    tixlan(R,(R(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pyt	get_ixlan�scK@s
td|�S(sW
    Return the details of an IX (Internet Exchange) together with the PeeringDB
    IDs of the networks available in this location, using the search filters
    specified in the query.

    .. note::
        If no ``id`` or filter arguments are specified, it will return all the
        possible IX LAN facilities registered in PeeringDB.

        The available filters are documented at:
        https://www.peeringdb.com/apidocs/#!/ixpfx/ixpfx_list

    CLI Example:

    .. code-block:: bash

        salt '*' peeringdb.get_ixpfx id=780
        salt '*' peeringdb.get_ixpfx city='Milwaukee'
    tixpfx(R,(R(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pyt	get_ixpfx�scK@s
td|�S(s!
    Return the list of facilities used by a particular network, given the ``id``
    or other filters specified in the query.

    .. note::
        If no ``id`` or filter arguments are specified, it will return all the
        possible network facilities registered in PeeringDB.

        The available filters are documented at:
        https://www.peeringdb.com/apidocs/#!/netfac/netfac_list

    CLI Example:

    .. code-block:: bash

        salt '*' peeringdb.get_netfac id=780
        salt '*' peeringdb.get_netfac city='Milwaukee'
    tnetfac(R,(R(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pyt
get_netfac�scK@s
td|�S(s�
    Return the IP addresses used by a particular network at all the IXs where it
    is available. The network is selected either via the ``id`` argument or the
    other filters specified in the query.

    .. note::
        If no ``id`` or filter arguments are specified, it will return all the
        possible IP addresses, of all networks, at all IXs, registered in
        PeeringDB.

        The available filters are documented at:
        https://www.peeringdb.com/apidocs/#!/netixlan/netixlan_list

    CLI Example:

    .. code-block:: bash

        salt '*' peeringdb.get_netixlan asn=13335
        salt '*' peeringdb.get_netixlan ipaddr4=185.1.114.25
    tnetixlan(R,(R(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pytget_netixlan�scK@s
td|�S(s&
    Return the details of an organisation together with the networks
    available in this location, using the search filters specified in the query.

    .. note::
        If no ``id`` or filter arguments are specified, it will return all the
        possible organisations registered in PeeringDB.

        The available filters are documented at:
        https://www.peeringdb.com/apidocs/#!/org/org_list

    CLI Example:

    .. code-block:: bash

        salt '*' peeringdb.get_org id=2
        salt '*' peeringdb.get_org city=Duesseldorf
    torg(R,(R(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pytget_orgscK@s
td|�S(s
    Return the details of a person of contact together using the search filters
    specified in the query.

    .. note::
        If no ``id`` or filter arguments are specified, it will return all the
        possible contacts registered in PeeringDB.

        The available filters are documented at:
        https://www.peeringdb.com/apidocs/#!/poc/poc_list

    CLI Example:

    .. code-block:: bash

        salt '*' peeringdb.get_poc id=6721
        salt '*' peeringdb.get_poc email__contains='@cloudflare.com'
    tpoc(R,(R(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pytget_poc)s(t__doc__t
__future__Rtloggingt	getLoggert__name__tlogtsalt.utils.httpR"t
salt.utilsRtImportErrortsalt.utils.argsRt__proxyenabled__RRR RRR,R.R0R2R4R6R8R:R<R>R@(((s:/usr/lib/python2.7/site-packages/salt/modules/peeringdb.pyt<module>s4
												

Zerion Mini Shell 1.0