%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/influxdb_retention_policy.pyc

�
���^c@@sSdZddlmZmZmZd�Zd�Zdded�Zd�Z	d	S(
u�
Management of Influxdb retention policies
=========================================

.. versionadded:: 2017.7.0

(compatible with InfluxDB version 0.9+)
i(tabsolute_importtprint_functiontunicode_literalscC@sdtkrdStS(u7
    Only load if the influxdb module is available
    uinfluxdb.db_existsuinfluxdb_retention_policy(t__salt__tFalse(((sI/usr/lib/python2.7/site-packages/salt/states/influxdb_retention_policy.pyt__virtual__scC@s�|jd�r't|jd��}nn|jd�r\|jd�}t|d�d}n9|jd�r�|jd�}t|d�dd}nt|�d}|S(u�
    Convert the a duration string into XXhYYmZZs format

    duration
        Duration to convert

    Returns: duration_string
        String representation of duration in XXhYYmZZs format
    uhudiiuwiuh0m0s(tendswithtinttsplittstr(tdurationthourstdaystweekstduration_string((sI/usr/lib/python2.7/site-packages/salt/states/influxdb_retention_policy.pytconvert_durations
u7dic	K@s6i|d6id6td6dj|�d6}tdd|d||�s�td	rrd|d<d
j|�|d<|Std||||||�r�dj|�|d<d
|d|<|Sdj|�|d<t|d<|SnXtdd|d||�}t}|dt|�kr9t}dj|d|�|dd<n|d|krpt}dj|d|�|dd<n|d|kr�t}dj|d|�|dd<n|r2td	r�d|d<dj|�|d<|Std||||||�rdj|�|d<|Sdj|�|d<t|d<|Sn|S(u�
    Ensure that given retention policy is present.

    name
        Name of the retention policy to create.

    database
        Database to create retention policy on.
    unameuchangesuresultu'retention policy {0} is already presentucommentu influxdb.retention_policy_existstnametdatabaseutestu" {0} is absent and will be createdu influxdb.create_retention_policyu%retention policy {0} has been createduPresentu%Failed to create retention policy {0}uinfluxdb.get_retention_policyudurationu"Retention changed from {0} to {1}.ureplicaNu$Replication changed from {0} to {1}.ureplicationudefaultu Default changed from {0} to {1}.u% {0} is present and set to be changeduinfluxdb.alter_retention_policyu%retention policy {0} has been changedu%Failed to update retention policy {0}N(tTruetformatRt__opts__tNoneRR(	RRR
treplicationtdefaulttclient_argstrettcurrent_policyt
update_policy((sI/usr/lib/python2.7/site-packages/salt/states/influxdb_retention_policy.pytpresent4sf
	





!!!





cK@s�i|d6id6td6dj|�d6}td|||�r�tdrld
|d<dj|�|d<|Std	|||�r�d
j|�|d<d|d|<|Sdj|�|d<t|d<|Sn|S(u�
    Ensure that given retention policy is absent.

    name
        Name of the retention policy to remove.

    database
        Name of the database that the retention policy was defined on.
    unameuchangesuresultu#retention policy {0} is not presentucommentu influxdb.retention_policy_existsutestu7retention policy {0} is present and needs to be removeduinfluxdb.drop_retention_policyu%retention policy {0} has been removeduAbsentu%Failed to remove retention policy {0}N(RRRRRR(RRRR((sI/usr/lib/python2.7/site-packages/salt/states/influxdb_retention_policy.pytabsent�s(







N(
t__doc__t
__future__RRRRRRRR(((sI/usr/lib/python2.7/site-packages/salt/states/influxdb_retention_policy.pyt<module>	s			L

Zerion Mini Shell 1.0