HEX
Server: LiteSpeed
System: Linux shams.tasjeel.ae 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: infowars (1469)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //usr/lib/python3.9/site-packages/ipalib/__pycache__/misc.cpython-39.opt-1.pyc
a

}�f�
�@snddlZddlmZmZmZddlmZmZddlmZddl	m
Z
e
�ZGdd�de�ZGdd	�d	e�Z
dS)
�N)�
LocalOrRemote�_�ngettext)�Output�summary)�Flag)�Registryc	@s�eZdZed�Zed�ZdZeje	dded�dddgd	d
�fZe
deed�d
�e
deed�dgd�e
deed�dgd�e
fZdd�Zddd�ZdS)�envzShow environment variables.z%(count)d variables)z
variables*�all�Jretrieve and print all attributes from the server. Affects command output.�webui�	no_option�	no_outputT�Zcli_name�docZexclude�flags�default�resultz)Dictionary mapping variable name to value��typer�totalz(Total number of variables env (>= count)Z
no_display)rrr�countz'Number of variables returned (<= total)cCsht�}|D]X}d|vrNt�|�dd�d�}|jD]}|�|�r2|�|�q2q
||jvr
|�|�q
|S)N�*z.*�$)�set�re�compile�replacer	�match�add)�self�	variables�keys�query�pat�key�r&�//usr/lib/python3.9/site-packages/ipalib/misc.pyZ__find_keys=s


zenv.__find_keysNcsl|dur�j}n
��|�}tt�fdd�|D��t|�t�j�d�}t|�dkr`�j||d<nd|d<|S)Nc3s|]}|�j|fVqdS)N)r	)�.0r%�r r&r'�	<genexpr>Oszenv.execute.<locals>.<genexpr>)rrr�r)r	�_env__find_keys�dict�len�msg_summary)r r!�optionsr"�retr&r)r'�executeIs
��zenv.execute)N)�__name__�
__module__�__qualname__r�__doc__r/Z
takes_argsr�
takes_optionsrrr-�intr�
has_outputr,r2r&r&r&r'r	sD��
����r	c	@sleZdZed�Zeddd�Zeje	dded�ddd	gd
d�fZe
ded
�e
deed�d�e
fZdd�ZdS)�pluginszShow all loaded plugins.z%(count)d plugin loadedz%(count)d plugins loadedrr
rrr
rTrrz(Dictionary mapping plugin names to basesrzNumber of plugins loadedrcKs\i}|jD]@}|j|�D].}t|�}d�|j|j�}|�|g��|�qq
t|t|�d�S)Nz{}.{})rr)	Zapir�formatr4r3�
setdefault�appendr-r.)r r0r�	namespaceZplugin�clsr%r&r&r'r2ys
�zplugins.executeN)r3r4r5rr6rr/rr7rrr-r8rr9r2r&r&r&r'r:\s.���
��
r:)rZipalibrrrZ
ipalib.outputrrrZipalib.plugabler�registerr	r:r&r&r&r'�<module>sI