%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/cloudinit/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/cloudinit/__pycache__/apport.cpython-312.pyc |
� ���f! � � � d Z ddlZddlZddlZddlmZ ddlmZmZ ddl m Z ddlmZm Z mZmZ dZg d �Zdd �Zdd�Zdd�Zdd �Zddefd�Zd� Zd� Zdeeef fd�Zdeeef fd�Zeed�Zdeddfd�Zdd�Z y# e$ r dZY �Rw xY w)zCloud-init apport interface� N)�Dict)�INSTALLER_APPORT_FILES� INSTALLER_APPORT_SENSITIVE_FILES)�is_cloud_init_enabled)�attach_file�attach_file_if_exists�attach_root_command_outputs�root_command_outputTF)$�AliYun�AltCloud�AkamaizAmazon - Ec2�Azure�Bigstep� Brightbox� CloudSigma� CloudStack�DigitalOcean�E24CloudzGCE - Google Compute EnginezHuawei Cloud�Exoscalez Hetzner Cloud�NWCSz IBM - (aka SoftLayer or BlueMix)�LXD�MAAS�NoCloud� OpenNebula� OpenStack�Oracle�OVFz'RbxCloud - (HyperOne, Rootbox, Rubikon)�OpenTelekomCloudzSAP Converged Cloud�Scaleway�SmartOS�UpCloud�VMware�Vultr�ZStack�Outscale�WSL�Otherc �~ � t | ddi� g d�}|s|j d� t |� t | dd� y)zBAttach cloud-init logs and tarfile from 'cloud-init collect-logs'.zcloud-init-log-warningsz-egrep -i "warn|error" /var/log/cloud-init.log)z cloud-initzcollect-logsz-t�/tmp/cloud-init-logs.tgzz--redactr) zlogs.tgzN)r �appendr r )�report�ui�include_sensitive�commands �2/usr/lib/python3/dist-packages/cloudinit/apport.py�attach_cloud_init_logsr0 G sE � ���%�?� ���G� ����z�"��� ���2�J�?� c �N � d}|r!|j |� rt | ddi� yyy)z*Optionally attach hardware info from lshw.z�Your device details (lshw) may be useful to developers when addressing this bug, but gathering it requires admin privileges. Would you like to include this info?zlshw.txt�lshwN)�yesnor )r+ r, �prompts r/ � attach_hwinfor6 ] s2 � � 0� � �b�h�h�v��#�F�Z��,@�A� �rr1 c �6 � t D ]B }t j j |j � }t | ||j � �D |rLt D ]B }t j j |j � }t | ||j � �D yy)a Attach any subiquity installer logs config. To support decoupling apport integration from installer config/logs, we eventually want to either source this function or APPORT_FILES attribute from subiquity and/or ubuntu-desktop-installer package-hooks python modules. N)r �os�path�realpathr �labelr )r+ r, r- �apport_filer: s r/ �attach_installer_filesr= h s� � � .� C���7�7�#�#�K�$4�$4�5���f�h��0A�0A�B�C� �;� G�K��w�w�'�'��(8�(8�9�H�!�&�(�K�4E�4E�F� G� r1 c � � t j j d� }t | |� t j j |� r2| j dd� | d r | dxx dz cc<