%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/cloudinit/distros/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/cloudinit/distros/__pycache__/ug_util.cpython-312.pyc

�

�f�&��\�ddlZddlmZmZeje�Zd�Zdd�Zd�Z	dd�Z
y)	�N)�
type_utils�utilc�<�t|t�r|j�jd�}t|t�r�i}|D]�}t|t
�r�|j
�D]�\}}t|ttf�s!tdtj|�z��t|t�r"|j|g�j|��o|j|g�j|�����t|t�r||vs��g||<��tdtj|�z��|}i}t|t
�r2|j
�D]\}}tj|�||<�|Stdtj|�z��)N�,zBad group member type %szUnknown group name type %sz@Group config must be list, dict or string type only but found %s)�
isinstance�str�strip�split�list�dict�items�	TypeErrorr�obj_name�
setdefault�extend�appendr�uniq_merge_sorted)�grp_cfg�	c_grp_cfg�i�k�v�groups�grp_name�grp_memberss        �;/usr/lib/python3/dist-packages/cloudinit/distros/ug_util.py�_normalize_groupsrs����'�3���-�-�/�'�'��,���'�4� ��	��	�A��!�T�"��G�G�I�
>�D�A�q�%�a�$���5�'�6�)�2�2�1�5�7���
"�!�T�*�!�,�,�Q��3�:�:�1�=�!�,�,�Q��3�:�:�1�=�
>��A�s�#��I�%�#%�I�a�L��0�J�4G�4G��4J�K���#	�(��
�F��'�4� �%,�]�]�_�	C�!�H�k�#�5�5�k�B�F�8��	C��M�	�N��"�"�7�+�
-�
�	
�c���t|t�r�g}|j�D]�\}}t|ttt
tf�r1tj|�s�<|jt
|���Wt|t�r||d<|j|��~tdtj|��d|����|}n%t|t�rtj|�}i}|D]�}t|ttf�r(tj|�D]}|s�||vs�i||<��At|t�rB|j!dd�}|j#|�xsi}	tj$|	|g�||<��tdtj|�z��|rci}
|j�D]L\}}i}
|j�D]-\}}|j'dd�j)�}|s�)||
|<�/|
|
|<�N|
}d}|r�d|vr�|j!d�}|r�|j+�}|j!d�}|j!dg�}|j!|i�}|j#dg�}tj||�}d	j-|�|d<tj$|||g�||<|j�D]\}}|r||k(nd
|d<�|S)N�namezUnmappable user value type z	 for key �defaultzDUser config must be dictionary/list or string  types only and not %s�-�_rrF)rrr
�bool�int�floatrr�is_truerrrrrr�
uniq_merge�pop�get�
mergemanydict�replacer	�copy�join)�u_cfg�def_user_cfg�ad_ucfgrr�users�user_config�u�n�prev_config�c_users�uname�uconfig�	c_uconfig�def_user�
def_config�
def_groups�
parsed_config�
parsed_groups�users_groupss                    r�_normalize_usersrAIs����%������K�K�M�	�D�A�q��!�d�C���4�5��<�<��?��N�N�3�q�6�*��A�t�$���&�	����q�!��!�*�*�1�-�q�2���	���	�E�3�	��&�&�u�-���E��
���k�D�#�;�/��_�_�[�1�
"����%��!�E�!�H�
"���T�
*�����	�2�A��)�)�A�,�,�"�K��)�)�;��*D�E�E�!�H��)�,6�,?�,?��,L�N��
�
� 
���#�k�k�m�	'�N�E�7��I��
�
��
%���1��I�I�c�3�'�-�-�/���#$�I�a�L�
%�'�G�E�N�
	'����H���e�#��Y�Y�y�)�
��(�,�,�.�L�#�'�'��/�H�%�)�)�(�B�7�J�"�I�I�h��3�M�)�-�-�h��;�M��1�1�-��L�L�&)�h�h�|�&<�M�(�#�#�0�0��z�=�9��E�(�O� �+�+�-�F���w�2:�U�h�.���	��F��Lrc���|si}i}d|vrr|drm|d}t|t�rd|i}tjddd��n;t|t�s+t
j
dtj|��i}i}	|j�}tj||g�}|jd	g�}t|ttf�r%tjd
t|���dd��n;t|t�s+t
j
dtj|��g}|rht|t�r|jdd
i�nDt|t�rt	|�jd
d�|d
<nt|t�r|dz
}i}d|vrt!|d�}t#||�}||fS#t$rt
j
d�Y��NwxYw)N�userr z'user' of type stringz22.2zUse 'users' list instead.)�
deprecated�deprecated_version�
extra_messagez?Format for 'user' key must be a string or dictionary and not %sziDistro has not implemented default user access. No distribution provided default user will be normalized.r2z'users' of type zUse 'users' as a list.z^Format for 'users' key must be a comma-separated string or a dictionary or a list but found %sr!Tz,defaultr)rrr�	deprecater�LOG�warningrr�get_default_user�NotImplementedErrorr+r*�typerrrrA)�cfg�distro�old_user�distro_user_config�default_user_config�
base_usersrr2s        r�normalize_users_groupsrS�s������
�H�
��}��V���v�;���h��$���)�H��N�N�2�#)�9�
�
�H�d�+��K�K���#�#�H�-�
�
�H���
�#�4�4�6���,�,�h�8J�-K�L������"�%�J��*�t�S�k�*����)�$�z�*:�);�<�%�2�	
�
�
�T�
+����
6����
�+�	
�
�
���j�$�'����v�y�1�2�
�
�D�
)�$(��$4�$8�$8��D�$I�J�y�!�
�
�C�
(��*�$�J�
�F��3��"�3�x�=�1���Z�)<�=�E��6�?���Q�
����
E�	
�
�s�F=�=G�Gc��|s||fSd�}tt||j���}|s||fSt|�d}||}|j	dd�||fS)Nc�$�|d}|rd|vry|dS)N�r!F�)�entry�configs  r�	safe_findz"extract_default.<locals>.safe_find�s#���q�����&�0���i� � rrr!)r�filterr
rr))r2�default_name�default_configrZ�	tmp_usersr rYs       r�extract_defaultr_�sk����n�-�-�!��V�I�u�{�{�}�5�6�I���n�-�-��	�?�1��D�
�t�_�F�
�J�J�y�$���&�>�r)N)NN)�logging�	cloudinitrr�	getLogger�__name__rHrrArSr_rWrr�<module>rds8���&��g����!��%�bN�xI�\r

Zerion Mini Shell 1.0