File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/influxdb_retention_policy.cpython-310.pyc
Back
o ;j� � @ s* d Z dd� Zdd� Zd dd �Zd d� ZdS )z� Management of Influxdb retention policies ========================================= .. versionadded:: 2017.7.0 (compatible with InfluxDB version 0.9+) c C s dt v rdS dS )z7 Only load if the influxdb module is available zinfluxdb.db_existsZinfluxdb_retention_policy)Fz#influxdb module could not be loaded)�__salt__� r r �Y/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/influxdb_retention_policy.py�__virtual__ s r c C sx | � d�r t| �d��}n'| � d�r | �d�}t|d �d }n| � d�r4| �d�}t|d �d d }t|�d }|S )z� Convert the a duration string into XXhYYmZZs format duration Duration to convert Returns: duration_string String representation of duration in XXhYYmZZs format �h�d� � �w� Zh0m0s)�endswith�int�split�str)�duration�hours�days�weeksZduration_stringr r r �convert_duration s r �7d� Fc K s� | i dd| � d�d�}t d d | |d�|��sTtd r)d|d <