%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/states/keystone_endpoint.pyo

�
���^c@@sVdZddlmZmZmZdZd�Zd�Zdd�Z	dd�Z
dS(	uM
Management of OpenStack Keystone Endpoints
==========================================

.. versionadded:: 2018.3.0

:depends: shade
:configuration: see :py:mod:`salt.modules.keystoneng` for setup instructions

Example States

.. code-block:: yaml

    create endpoint:
      keystone_endpoint.present:
        - name: public
        - url: https://example.org:9292
        - region: RegionOne
        - service_name: glance

    destroy endpoint:
      keystone_endpoint.absent:
        - name: public
        - url: https://example.org:9292
        - region: RegionOne
        - service_name: glance

    create multiple endpoints:
      keystone_endpoint.absent:
        - names:
            - public
            - admin
            - internal
        - url: https://example.org:9292
        - region: RegionOne
        - service_name: glance
i(tabsolute_importtunicode_literalstprint_functionukeystone_endpointcC@sdtkrtStdfS(Nukeystoneng.endpoint_getuTThe keystoneng execution module failed to load: shade python module is not available(t__salt__t__virtualname__tFalse(((sA/usr/lib/python2.7/site-packages/salt/states/keystone_endpoint.pyt__virtual__-scC@s�d|kr%d|kr%||d<ntdd|�}|s\d|d<t|d<t|fS|j�}|jdd�|jd	d�|j|d
<|j|d<tdd
|�}t|�dkr�d|d<t|d<|S|r�|dnd}t|fS(u�
    Returns: tuple whose first element is a bool indicating success or failure
             and the second element is either a ret dict for salt or an object
    u	interfaceu
public_urlukeystoneng.service_gett
name_or_iduCannot find serviceucommenturesultuenableduurlu
service_iduservice_name_or_idukeystoneng.endpoint_searchtfiltersiu!Multiple endpoints match criteriaiN(RRtcopytpoptNonetidtlentTrue(trettnametservice_nametkwargstserviceRt	endpointstendpoint((sA/usr/lib/python2.7/site-packages/salt/states/keystone_endpoint.pyt_common3s&







cK@s�i|d6id6td6dd6}td|�}td|�t||||�\}}\}}|so|S|stdtkr�d|d<||d<d	|d<|Std
|�}	t|	�dkr�|	d|d<n+x(t|	�D]\}
}||d|
<q�Wd
|d<|Std||�}|r�tdtkr^d|d<||d<d|d<|S|j|d<td|�|dj	|�d|d<n|S(u"
    Ensure an endpoint exists and is up-to-date

    name
        Interface name

    url
        URL of the endpoint

    service_name
        Service name or ID

    region
        The region name to assign the endpoint

    enabled
        Boolean to control if endpoint is enabled
    unameuchangesuresultuucommentuargs.clean_kwargsukeystoneng.setup_cloudsutestuEndpoint will be created.ukeystoneng.endpoint_createiiuCreated endpointukeystoneng.compare_changesuEndpoint will be updated.uendpoint_idukeystoneng.endpoint_updateuUpdated endpointN(
Rt	__utils__RRt__opts__RR
t	enumerateRtupdate(RRtauthRRtsuccesstvalt_RRtitchanges((sA/usr/lib/python2.7/site-packages/salt/states/keystone_endpoint.pytpresentPsD

%








c	K@s�i|d6id6td6dd6}td|�t||||�\}}\}}|s_|S|r�tdtkr�d
|d<i|jd6|d<d	|d<|Std
d|j�|j|dd<d|d<n|S(u�
    Ensure an endpoint does not exists

    name
        Interface name

    url
        URL of the endpoint

    service_name
        Service name or ID

    region
        The region name to assign the endpoint
    unameuchangesuresultuucommentukeystoneng.setup_cloudsutestuiduEndpoint will be deleted.ukeystoneng.endpoint_deleteRuDeleted endpointN(RRRRRR(	RRRRRRRRR((sA/usr/lib/python2.7/site-packages/salt/states/keystone_endpoint.pytabsent�s$

%


N(t__doc__t
__future__RRRRRRRR!R"(((sA/usr/lib/python2.7/site-packages/salt/states/keystone_endpoint.pyt<module>&s		B

Zerion Mini Shell 1.0