Ë
    x[h†  ã            
       óÀ   — U d Z ddlZddlmZmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ  ej                  e«      Zdd	d
œZdg d¢edgdœZe
ed<   d„ Zdededededdf
d„Zy)z"Resolv Conf: configure resolv.confé    N)Ú	templaterÚutil)ÚCloud)ÚConfig)Ú
MetaSchema)ÚPER_INSTANCEzresolv.confzsystemd.resolved.conf)z/etc/resolv.confz/etc/systemd/resolved.confÚcc_resolv_conf)ÚalpineÚ
azurelinuxÚfedoraÚmarinerÚopensusezopensuse-leapzopensuse-microoszopensuse-tumbleweedÚphotonÚrhelÚsle_hpcz	sle-microÚslesÚ	openeulerÚmanage_resolv_conf)ÚidÚdistrosÚ	frequencyÚactivate_by_schema_keysÚmetac                 óf  — g }g }d|v rQ|d   j                  «       D ];  \  }}t        |t        «      sŒ|r|j                  |«       Œ+|j                  |«       Œ= ||z   D ]  }|d   |= Œ
 |j	                  d«      si |d<   ||d<   t
        j                  d| «       t        j                  | ||«       y )NÚoptionsÚflagsz$Writing resolv.conf from template %s)	ÚitemsÚ
isinstanceÚboolÚappendÚgetÚLOGÚdebugr   Úrender_to_file)Útemplate_fnÚparamsÚtarget_fnamer   Úfalse_flagsÚkeyÚvalÚflags           úA/usr/lib/python3/dist-packages/cloudinit/config/cc_resolv_conf.pyÚgenerate_resolv_confr-   1   sÁ   € Ø€EØ€Kà�FÑØ˜yÑ)×/Ñ/Ó1ò 	,‰HˆC�Ü˜#œtÕ$ÙØ—L‘L Õ%à×&Ñ& sÕ+ð	,ð ˜Ñ#ò $ˆØ�9Ñ˜dÑ#ð$ð �:‰:�iÔ ØˆˆyÑà€Fˆ7�OÜ‡I�IÐ4°kÔBÜ×Ñ˜[¨,¸Õ?ó    ÚnameÚcfgÚcloudÚargsÚreturnc                 ó¶  — d|vrt         j                  d| «       yt        j                  |dd«      st         j                  d| «       yd|vrt         j	                  d«       y	 |j                  t        |j                  j                     «      }t        ||d   |j                  j                  ¬	«       y# t        $ r t         j	                  d«       Y yw xY w)
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
    r   zFSkipping module named %s, no 'manage_resolv_conf' key in configurationNFzGSkipping module named %s, 'manage_resolv_conf' present but set to FalseÚresolv_confz3manage_resolv_conf True but no parameters provided!z0No template found, not rendering resolve configs)r%   r&   r'   )r"   r#   r   Úget_cfg_option_boolÚwarningÚget_template_filenameÚRESOLVE_CONFIG_TEMPLATE_MAPÚdistroÚresolve_conf_fnÚKeyErrorr-   )r/   r0   r1   r2   r%   s        r,   Úhandler=   H   sØ   € ð  3Ñ&Ü�	‰	ð<àô	
ð
 	ä×#Ñ# CÐ)=¸uÔEÜ�	‰	ð=àô	
ð
 	à˜CÑÜ�‰ÐIÔJØðØ×1Ñ1Ü'¨¯©×(DÑ(DÑEó
ˆô ØØ�=Ñ!Ø—\‘\×1Ñ1õð
 øô ò Ü�‰ÐFÔGÙðús   Á%,B7 Â7CÃC)Ú__doc__ÚloggingÚ	cloudinitr   r   Úcloudinit.cloudr   Úcloudinit.configr   Úcloudinit.config.schemar   Úcloudinit.settingsr   Ú	getLoggerÚ__name__r"   r9   r   Ú__annotations__r-   ÚstrÚlistr=   © r.   r,   ú<module>rK      s�   ðò )ã ç %Ý !Ý #Ý .Ý +à€g×Ñ˜Ó!€ð &Ø"9ñÐ ð òð  Ø 4Ð5ñ'€€jó ò.@ð.+�ð +˜6ð +¨%ð +°tð +Àô +r.   