%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@s�dZddlmZmZmZddlZddlmZeje	�Z
d�Zddddddddddd�
Z
dddddddddd�	ZdS(u�
Management of PostgreSQL extensions
===================================

A module used to install and manage PostgreSQL extensions.

.. code-block:: yaml

    adminpack:
      postgres_extension.present


.. versionadded:: 2014.7.0
i(tabsolute_importtunicode_literalstprint_functionN(tpostgrescC@sdtkrtdfStS(u5
    Only load if the postgres module is present
    upostgres.create_extensionuFUnable to load postgres module.  Make sure `postgres.bins_dir` is set.(t__salt__tFalsetTrue(((sB/usr/lib/python2.7/site-packages/salt/states/postgres_extension.pyt__virtual__s
c
C@si|d6id6td6dj|�d6}i|d6|d6|d6|d	6|	d
6|
d6}d}
td
|d|d||�}tj|k}|r�d}
nt}tj|kr�x8tjtjgD]!}||kr�t}d}
q�q�Wnd}|s|rtt
drCd|d<|
r?dj||
�jdd�|d<n|Stdd|d|d|d|d||�}n|r�|
jd�r�d}nd}dj||
|�|d<dj|
j
�|�|d|<n/|dk	rdj||
�|d<t|d<n|S( u8
    Ensure that the named extension is present.

    .. note::

        Before you can use the state to load an extension into a database, the
        extension's supporting files must be already installed.

    For more information about all of these options see ``CREATE EXTENSION`` SQL
    command reference in the PostgreSQL documentation.

    name
        The name of the extension to be installed

    if_not_exists
        Add an ``IF NOT EXISTS`` parameter to the DDL statement

    schema
        Schema to install the extension into

    ext_version
        Version to install

    from_version
        Old extension version if already installed

    user
        System user all operations should be performed on behalf of

    maintenance_db
        Database to act on

    db_user
        Database username if different from config or default

    db_password
        User password if any password for a specified user

    db_host
        Database host if different from config or default

    db_port
        Database port if different from config or default
    unameuchangesuresultu Extension {0} is already presentucommentumaintenance_dburunasuuserupassworduhostuportucreateupostgres.create_metadatatschematext_versionuinstalluupgradeutestu Extension {0} is set to be {1}edueeduedupostgres.create_extensiontnamet
if_not_existstfrom_versionueudu!The extension {0} has been {1}{2}u{0}{1}uFailed to {1} extension {0}N(RtformatRRt_EXTENSION_NOT_INSTALLEDRt_EXTENSION_INSTALLEDt_EXTENSION_TO_MOVEt_EXTENSION_TO_UPGRADEtNonet__opts__treplacetendswitht
capitalize(R
RRR	Rtusertmaintenance_dbtdb_usertdb_passwordtdb_hosttdb_porttrettdb_argstmodetmtdatat	toinstallt	toupgradetflagtcrettsuffix((sB/usr/lib/python2.7/site-packages/salt/states/postgres_extension.pytpresent$sj7

		


	#
c

	C@si|d6id6td6dd6}
i|d6|d6|d6|d	6|	d
6|d6}td||�}|rtd
r�d|
d<dj|�|
d<|
Std|d|d|d||�r�dj|�|
d<d|
d|<|
St|
d<dj|�|
d<|
Sndj|�|
d<|
S(u�
    Ensure that the named extension is absent.

    name
        Extension name of the extension to remove

    if_exists
        Add if exist slug

    restrict
        Add restrict slug

    cascade
        Drop on cascade

    user
        System user all operations should be performed on behalf of

    maintenance_db
        Database to act on

    db_user
        Database username if different from config or default

    db_password
        User password if any password for a specified user

    db_host
        Database host if different from config or default

    db_port
        Database port if different from config or default
    unameuchangesuresultuucommentumaintenance_dburunasuhostuuseruportupasswordupostgres.is_installed_extensionutestu"Extension {0} is set to be removedupostgres.drop_extensiont	if_existstrestricttcascadeuExtension {0} has been removeduAbsentu"Extension {0} failed to be removedu5Extension {0} is not present, so it cannot be removedN(RRRRR
R(
R
R'R(R)RRRRRRRRtexists((sB/usr/lib/python2.7/site-packages/salt/states/postgres_extension.pytabsent�s>+





	

(t__doc__t
__future__RRRtloggingtsalt.modulesRt	getLoggert__name__tlogRRR&R+(((sB/usr/lib/python2.7/site-packages/salt/states/postgres_extension.pyt<module>s0	
m

Zerion Mini Shell 1.0