%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/postgres_database.pyo

�
���^c@@szdZddlmZmZmZd�Zdddddedddddddd�
Zddddddd�Z	dS(u	
Management of PostgreSQL databases
==================================

The postgres_database module is used to create and manage Postgres databases.
Databases can be set as either absent or present

.. code-block:: yaml

    frank:
      postgres_database.present
i(tabsolute_importtunicode_literalstprint_functioncC@sdtkrtdfStS(u5
    Only load if the postgres module is present
    upostgres.user_existsuFUnable to load postgres module.  Make sure `postgres.bins_dir` is set.(t__salt__tFalsetTrue(((sA/usr/lib/python2.7/site-packages/salt/states/postgres_database.pyt__virtual__s
cC@s0i|d6id6td6dj|�d6}i|	d6|d6|d6|
d	6|d
6|
d6}td|�}|j|i�}||kr;t|r�|jd
�|knt|r�|jd�j�|j�knt|r�|jd�|knt|r
|jd�|knt|r+|jd�|kntf�r;|S||kr�t|rq|jd�j�|j�knt|r�|jd�|knt|r�|jd�|kntf�r�dj|�|d<t|d<|Stdr'd%|d<||krdj|�|d<ndj|�|d<|S||kr�td|d|d|d|d|d|d||�r�dj|�|d<d|d|<n�||kr�td|d|d|d ||�r�d!j|�|d<d"|d|<nI||krd#j|�|d<t|d<nd$j|�|d<t|d<|S(&uW
    Ensure that the named database is present with the specified properties.
    For more information about all of these options see man createdb(1)

    name
        The name of the database to manage

    tablespace
        Default tablespace for the database

    encoding
        The character encoding scheme to be used in this database

    lc_collate
        The LC_COLLATE setting to be used in this database

    lc_ctype
        The LC_CTYPE setting to be used in this database

    owner
        The username of the database owner

    owner_recurse
        Recurse owner change to all relations in the database

    template
        The template database from which to build this database

    user
        System user all operations should be performed on behalf of

    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

        .. versionadded:: 0.17.0
    unameuchangesuresultuDatabase {0} is already presentucommentumaintenance_dburunasuhostuuseruportupasswordupostgres.db_listu
TablespaceuEncodinguCollateuCtypeuOwneruCDatabase {0} has wrong parameters which couldn't be changed on fly.utestu!Database {0} is set to be createdu6Database {0} exists, but parameters need to be changedupostgres.db_createt
tablespacetencodingt
lc_collatetlc_ctypetownerttemplateu!The database {0} has been createduPresentupostgres.db_altert
owner_recurseu-Parameters for database {0} have been changeduParameters changedu,Failed to change parameters for database {0}uFailed to create database {0}N(
RtformatRtgettalltlowertanyRt__opts__tNone(tnameRRR	R
RR
Rtusertmaintenance_dbtdb_passwordtdb_hosttdb_porttdb_usertrettdb_argstdbst	db_params((sA/usr/lib/python2.7/site-packages/salt/states/postgres_database.pytpresentsx;

*'*'




	



c	C@s�i|d6id6td6dd6}i|d6|d6|d6|d	6|d
6|d6}td||�r�td
r�d|d<dj|�|d<|Std||�r�dj|�|d<d|d|<|Sndj|�|d<|S(u�
    Ensure that the named database is absent

    name
        The name of the database to remove

    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

    user
        System user all operations should be performed on behalf of

        .. versionadded:: 0.17.0
    unameuchangesuresultuucommentumaintenance_dburunasuhostuuseruportupasswordupostgres.db_existsutestu!Database {0} is set to be removedupostgres.db_removeuDatabase {0} has been removeduAbsentu4Database {0} is not present, so it cannot be removedN(RRRRR(	RRRRRRRRR((sA/usr/lib/python2.7/site-packages/salt/states/postgres_database.pytabsent�s.





N(
t__doc__t
__future__RRRRRRR R!(((sA/usr/lib/python2.7/site-packages/salt/states/postgres_database.pyt<module>
s*	
~

Zerion Mini Shell 1.0