CasperSecurity

Current Path : /lib/python3/dist-packages/cloudinit/config/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/cloudinit/config/__pycache__/cc_landscape.cpython-310.pyc

o

쑛h;�
@s�UdZddlZddlmZddlmZddlmZmZm	Z	ddl
mZddlm
Z
ddlmZdd	lmZd
Zddd
ddd�iZddgedgd�Zeed<e�e�Zdede
dededdf
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)�	log_level�url�ping_url�	data_path�cc_landscape�ubuntu�	landscape)�id�distros�	frequency�activate_by_schema_keys�meta�name�cfg�cloud�args�returnc	
Cs�|�di�}t|t�stdjt�|�d���|sdS|j�dg�t	t
|g}ttdd�t
t|�d���D���}ztjgd	�d
gd�t�dd
g|�WdStjy~}z"|jdkrct�d�nd|��}t�t|�t|�|�WYd}~dSd}~ww)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
    rzR'landscape' key existed in config, but not a dictionary type, is a {_type} instead)�_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>r)�landscape-config�--silentz--is-registered�)�rcsr(r)rz&Client already registered to LandscapezFailure registering client:
)�get�
isinstance�dict�RuntimeError�formatr�obj_name�distro�install_packages�LSC_BUILTIN_CFG�LSC_CLIENT_CFG_FILE�listr�sorted�merge_together�itemsr�ProcessExecutionError�	exit_code�LOG�warningr�logexc)	rrrr�ls_cloudcfg�
merge_data�
cmd_params�e�msgr%r%r&�handle,sH
�������



���rDcCs@ti�}|D]}|sqt|t�r|�|�q|�t|��q|S)zu
    merge together ConfigObj objects or things that ConfigObj() will take in
    later entries override earlier
    )rr-�merge)�objsr�objr%r%r&r8]s
r8)�__doc__�logging�	itertoolsr�	configobjr�	cloudinitrrr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemar	�cloudinit.settingsr
r5r4r�__annotations__�	getLogger�__name__r<�strr6rDr8r%r%r%r&�<module>s2��
�
1
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY