HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/cloudinit/config/__pycache__/cc_landscape.cpython-38.pyc
U

Ӈg;�@s�UdZddlZddlmZddlmZddlmZmZm	Z	ddl
mZddlm
Z
ddlmZdd	lmZd
Zddd
ddd�iZddgedgd�Zeed<e�e�Zee
eedd�dd�Zdd�ZdS)z&install and configure landscape client�N)�chain)�	ConfigObj)�subp�
type_utils�util)�Cloud)�Config)�
MetaSchema)�PER_INSTANCEz/etc/landscape/client.conf�client�infoz.https://landscape.canonical.com/message-systemz#http://landscape.canonical.com/pingz/var/lib/landscape/client)Z	log_levelZurlZping_urlZ	data_pathZcc_landscapeZubuntu�	landscape)�idZdistrosZ	frequencyZactivate_by_schema_keys�meta)�name�cfg�cloud�args�returnc	
Cs�|�di�}t|t�s,tdjt�|�d���|s4dS|j�dg�t	t
|g}ttdd�t
t|�d���D���}z,tjd	d
dgdgd
�t�d	d
g|�WnZtjk
r�}z:|jdkr�t�d�n d|��}t�t|�t|�|�W5d}~XYnXdS)z�
    Basically turn a top level 'landscape' entry with a 'client' dict
    and render it to ConfigObj format under '[client]' section in
    /etc/landscape/client.conf
    r
zR'landscape' key existed in config, but not a dictionary type, is a {_type} instead)Z_typeNzlandscape-clientcSs&g|]\}}d|�dd���|g�qS)z--�_�-)�replace)�.0�k�v�r�?/usr/lib/python3/dist-packages/cloudinit/config/cc_landscape.py�
<listcomp>Is�zhandle.<locals>.<listcomp>rzlandscape-configz--silentz--is-registered�)Zrcsrz&Client already registered to LandscapezFailure registering client:
)�get�
isinstance�dict�RuntimeError�formatrZobj_nameZdistroZinstall_packages�LSC_BUILTIN_CFG�LSC_CLIENT_CFG_FILE�listr�sorted�merge_together�itemsrZProcessExecutionErrorZ	exit_code�LOGZwarningrZlogexc)	rrrrZls_cloudcfgZ
merge_dataZ
cmd_params�e�msgrrr�handle,s@
�������


r-cCs@ti�}|D].}|sqt|t�r,|�|�q|�t|��q|S)zu
    merge together ConfigObj objects or things that ConfigObj() will take in
    later entries override earlier
    )rr �merge)Zobjsr�objrrrr(]s
r()�__doc__Zlogging�	itertoolsrZ	configobjrZ	cloudinitrrrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemar	Zcloudinit.settingsr
r%r$r�__annotations__Z	getLogger�__name__r*�strr&r-r(rrrr�<module>	s0��
�
1