File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/data.cpython-310.pyc
o
�N�gc � @ s� d Z ddlZddlZddlZddlZddlZe�e�Z dd� Z
dd� Zdd� Zd d
� Z
dd� Zdd
d�Zddd�Zdd� Zdd� Zdd� Zdd� ZdS )zb
Manage a local persistent data structure that can hold any arbitrary data
specific to the minion
� Nc C s4 zt �t j�td d�� W dS ty Y dS w )z�
Clear out all of the data in the minion datastore, this function is
destructive!
CLI Example:
.. code-block:: bash
salt '*' data.clear
�cachedir� datastoreT)�os�remove�path�join�__opts__�OSError� r
r
�E/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/data.py�clear s ��r c C sv z-t j�td d�} tjj�| d��}tj� |�
� �W d � W S 1 s&w Y W dS ttfy: i Y S w )z�
Return all of the data in the minion datastore
CLI Example:
.. code-block:: bash
salt '*' data.load
r r �rbN)
r r r r �salt�utils�files�fopen�payload�loads�readr � NameError)�datastore_pathZrfhr
r
r �load"