3 \�mee� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z ddl mZ ddlm Z ddlmZ ddlmZ ddlmZ dd lmZmZmZmZmZmZmZmZ ddlZdd lmZm Z ddl!m"Z" ddl#m$Z$m%Z% dd l&m'Z' ddl(m)Z)m*Z*m+Z+ yddl,m-Z. e.Z-W n e/k �r. e0Z-Y nX ej1e2�Z3dZ4dZ5dZ6de5ide6id�Z7dddd�Z8dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@eAd d!� e$jB� D ��ZCe�r�ddlZdd"lDmEZEmFZF G d#d$� d$eF�ZGneHZGG d%d&� d&e-�ZIG d'd(� d(e�ZJeeJ ZKG d)d*� d*e�ZLdd+d,�eKeeM eMeMd-�d.d/�ZNG d0d1� d1eO�ZPd2d3� ZQd�eHeMd5�d6d7�ZRee- d8�d9d:�ZSeIfeTeHeMee0 d;�d<d=�ZUeeUdd>�ZVeeUd?d>�ZWeIfee0 d@�dAdB�ZXeIfee0 d@�dCdD�ZYdEdF� ZZd�eHdH�dIdJ�Z[d�eHeeH eMeTeTeTeTdL�dMdN�Z\G dOdP� dP�Z]dddQ�eHeMeHeeK eeK eeMe^f dR�dSdT�Z_eMeeJ dU�dVdW�Z`d�eMeMeMeLdX�dYdZ�Zad�eMeHeMeTeMeTd[�d\d]�Zbd^d_� Zcd`da� ZdeHeMeeM db�dcdd�ZeeHeHeMde�dfdg�ZfeMd8�dhdi�ZgeHeHdj�dkdl�ZheHdm�dndo�ZieHeMdp�dqdr�Zjd�eHeHeMdt�dudv�ZkeGeMdw�dxdy�ZleGeMdw�dzd{�Zmd�eGeeH eMd|�d}d~�ZneHd8�dd��ZoepeMd��d�d��ZqeMd8�d�d��Zrd�eMeHd��d�d��Zsd�d�d��Ztd�d�� Zud�d�� Zve2d�k�r�ejwev� � dS )�zFschema.py: Set of module functions for processing cloud-config schema.� N)�defaultdict)�Iterable)�deepcopy)�EACCES)�partial)�chain)� TYPE_CHECKING�DefaultDict�List� NamedTuple�Optional�Type�Union�cast)�importer�safeyaml)�read_cfg_paths)�INCLUSION_TYPES_MAP�type_from_starts_with)�DataSourceNotFoundException)�error�get_modules_from_dir� load_file)�ValidationErrorz!versions.schema.cloud-config.jsonzschema-cloud-config-v1.jsonzschema-network-config-v1.json�latest)zcloud-configznetwork-config�trueZfalseZnull)TFNap {name} {title_underbar} {title} .. tab-set:: {prefix3}.. tab-item:: Summary {description} {prefix6}**Internal name:** ``{id}`` {prefix6}**Module frequency:** {frequency} {prefix6}**Supported distros:** {distros} {prefix6}{activate_by_schema_keys} {prefix3}.. tab-item:: Config schema {property_doc} {prefix3}.. tab-item:: Examples {prefix6}:: {examples} � z5{prefix}* **{prop_name}:** ({prop_type}){description}zJ{prefix}* Each object in **{prop_name}** list supports the following keys:z& # --- Example{example_count} --- � deprecatedzDEPRECATED: c C s g | ]}|d dkr|�qS )r �#� )�.0�tr r �/usr/lib/python3.6/schema.py� <listcomp>p s r# )�NotRequired� TypedDictc @ sB e Zd ZU eeeeej e ej e ee e e dS )� MetaSchemaN)�__name__� __module__�__qualname__�str�name�id�title�description�typingr �distros�examples� frequencyr$ �activate_by_schema_keysr r r r"