%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_schema.pyo

�
���^c@@s}dZddlmZmZmZddlZeje�Zd�Z	ddddddd�Zdddddd�ZdS(u�
Management of PostgreSQL schemas
================================

The postgres_schemas module is used to create and manage Postgres schemas.

.. code-block:: yaml

    public:
      postgres_schema.present 'dbname' 'name'
i(tabsolute_importtunicode_literalstprint_functionNcC@sdtkrtdfStS(u5
    Only load if the postgres module is present
    upostgres.schema_existsuFUnable to load postgres module.  Make sure `postgres.bins_dir` is set.(t__salt__tFalsetTrue(((s?/usr/lib/python2.7/site-packages/salt/states/postgres_schema.pyt__virtual__s
c
C@sOi|d6|d6id6td6dj||�d6}i|d6|d6|d	6|d
6|d6}	td|||	�}
d}|
dkr�td
r�d|d<dj||�|d<|Std||d||	�}nd}d}|rd}t|d<d|d|<n/|dk	r%d}t|d<nd}t|d<|j||�|d<|S(u
    Ensure that the named schema is present in the database.

    dbname
        The database's name will work on

    name
        The name of the schema to manage

    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
    udbnameunameuchangesuresultu-Schema {0} is already present in database {1}ucommentudb_userudb_passwordudb_hostudb_portuuserupostgres.schema_getutestu0Schema {0} is set to be created in database {1}.upostgres.schema_createtowneru)Schema {0} already exists in database {1}u+Schema {0} has been created in database {1}uPresentu+Failed to create schema {0} in database {1}N(RtformatRtNonet__opts__R(
tdbnametnameRtusertdb_usertdb_passwordtdb_hosttdb_porttrettdb_argstschema_attrtcrettmsg((s?/usr/lib/python2.7/site-packages/salt/states/postgres_schema.pytpresentsJ







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

    dbname
        The database's name will work on

    name
        The name of the schema to remove

    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
    unameudbnameuchangesuresultuucommentudb_userudb_passwordudb_hostudb_portuuserupostgres.schema_existsutestu1Schema {0} is set to be removed from database {1}upostgres.schema_removeu-Schema {0} has been removed from database {1}uAbsentuSchema {0} failed to be removeduBSchema {0} is not present in database {1}, so it cannot be removedN(RRR
R	RR(	RRR
RRRRRR((s?/usr/lib/python2.7/site-packages/salt/states/postgres_schema.pytabsentms8





(
t__doc__t
__future__RRRtloggingt	getLoggert__name__tlogRR	RR(((s?/usr/lib/python2.7/site-packages/salt/states/postgres_schema.pyt<module>s	
K

Zerion Mini Shell 1.0