File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/test.cpython-310.pyc
o
�N�g�= � @ s d Z ddlZddlZddlZddlZddlZddlZddlZddlZ ddl
Z ddlZ ddlZ ddl
Z ddlZ ddlZ ddlZ ddlmZ ddlmZ dgZdddd �Ze�e�Zed
�dd� �Zd
d� Zdd� Zdd� Zdd� Zdd� Zd[dd�Z dd� Z!dd� Z"dd� Z#e j$j%�&e#d �Z'd!d"� Z(d#d$� Z)d\d%d&�Z*d'd(� Z+d)d*� Z,d+d,� Z-d-d.� Z.d/d0� Z/d1d2� Z0d3d4� Z1d5d6� Z2d]d8d9�Z3d:d;� Z4d<d=� Z5d>d?� Z6d@dA� Z7d^dCdD�Z8d^dEdF�Z9d_dHdI�Z:dJdK� Z;dLdM� Z<d`dOdP�Z=dQdR� Z>dSdT� Z?dUdV� Z@dWdX� ZAdYdZ� ZBdS )az$
Module for running arbitrary tests
� N)�DEFAULT_HASH_TYPE)�depends�*�true�false�try)�true_�false_�try_Znon_existantmodulenamec C � dS )NZfoo� r r r �E/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/test.py�missing_func$ s r c C �
t j�� S )zz
Call grains.items via the attribute
CLI Example:
.. code-block:: bash
salt '*' test.attr_call
)�__salt__�grains�itemsr r r r
� attr_call) �
r c C s� g g g g g g g d�} t D ]K}d|v r| d �|� q| d �|� tt |�r-| d �|� t | D ]%}|� d|� �}ttt |�|�rI| d �|� |t | v rV| d �|� q1q| d D ]}|| d vrk| d �|� || d vrx| d �|� q\| S )
z�
Return a dict containing all of the execution modules with a report on
the overall availability via different references
CLI Example:
.. code-block:: bash
salt '*' test.module_report
)� functions�function_attrs�
function_subs�modules�module_attrs�
missing_attrs�missing_subs�.r r r r r r r )r �append�hasattr�getattr)�ret�ref�func�fullr r r
�
module_report6 s: �
���r$ c C � | S )z�
Return a string - used for testing the connection
CLI Example:
.. code-block:: bash
salt '*' test.echo 'foo bar baz quo qux'
r )�textr r r
�echo_ �
r'