File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/grafana4_user.cpython-310.pyc
Back
o ;j� � @ sN d Z ddlm mZ ddlmZ dd� Z ddd �Zdd d�Zddd �Z dS )a� Manage Grafana v4.0 users .. versionadded:: 2017.7.0 :configuration: This state requires a configuration profile to be configured in the minion config, minion pillar, or master config. The module will use the 'grafana' key by default, if defined. Example configuration using basic authentication: .. code-block:: yaml grafana: grafana_url: http://grafana.localhost grafana_user: admin grafana_password: admin grafana_timeout: 3 Example configuration using token based authentication: .. code-block:: yaml grafana: grafana_url: http://grafana.localhost grafana_token: token grafana_timeout: 3 .. code-block:: yaml Ensure foobar user is present: grafana4_user.present: - name: foobar - password: mypass - email: "foobar@localhost" - fullname: Foo Bar - is_admin: true � N)� deep_diffc C s dt v rdS dS )z)Only load if grafana4 module is available�grafana4.get_userT)Fz#grafana4 module could not be loaded)�__salt__� r r �M/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/grafana4_user.py�__virtual__, s r F�grafanac C s� t |t�rtd |�}| ddi d�}td | |�}| } | rDtd r,d| � d�|d<