Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.11/site-packages/ansible/module_utils/common/__pycache__/ |
Upload File : |
� ���c�J � �$ � d dl mZmZmZ eZd dlZd dlZd dlm Z d dl mZ d dlm Z d dlmZ d dlmZ d dlmZ d d lmZ d d lmZmZmZmZ d� Zd"d �Zd#d�Zd#d�Zd#d�Zd#d�Z d#d�Z!d#d�Z"d#d�Z#d$d�Z$d� Z%d� Z&d� Z'd� Z(d� Z)d� Z*d� Z+d� Z,d � Z-d!� Z.dS )%� )�absolute_import�division�print_functionN)�literal_eval)� to_native)�json)�is_iterable)�jsonify)�human_to_bytes)�boolean)�binary_type� integer_types�string_types� text_typec � � t | � � s| g} t t | � � � |� � � � S )a Count the number of occurrences of a key in a given dictionary :arg terms: String or iterable of values to check :arg parameters: Dictionary of parameters :returns: An integer that is the number of occurrences of the terms values in the provided dictionary. )r �len�set�intersection)�terms� parameterss �K/usr/lib/python3.11/site-packages/ansible/module_utils/common/validation.py�count_termsr s= � � �u��� �����s�5�z�z�&�&�z�2�2�3�3�3� Fc �( � t | t � � s|r| d fS | S t j d| � � r|r| d fS | S t j d| � � r|r| d fS | S t | � � }|r|d fS |S # t $ r}|r | |fcY d }~S | cY d }~S d }~ww xY w)Nz \w\.\w+\(z import \w+)� isinstancer �re�searchr � Exception)�value�locals�include_exceptions�result�es r � safe_evalr$ * s� � ��e�\�*�*� �� !��4�=� ��� �y��u�%�%� �� !��4�=� ��� �y���&�&� �� !��4�=� ��� ��e�$�$��� ��D�>�!��M��� � � �� ��1�:���������������������s0 �A0 �.A0 �0 B�:B�?B�B�B�Bc �L � g }| �|S | D ]-}t ||� � }|dk r|� |� � �.|rkd� |D � � }dd� |� � z }|r)d� |d� |� � � � }t t |� � � � �|S )a� Check mutually exclusive terms against argument parameters Accepts a single list or list of lists that are groups of terms that should be mutually exclusive with one another :arg terms: List of mutually exclusive parameters :arg parameters: Dictionary of parameters :kwarg options_context: List of strings of parent key names if ``terms`` are in a sub spec. :returns: Empty list or raises :class:`TypeError` if the check fails. N� c �8 � g | ]}d � |� � ��S )�|)�join)�.0�checks r � <listcomp>z,check_mutually_exclusive.<locals>.<listcomp>^ s"