%PDF- %PDF-
Direktori : /lib/python3/dist-packages/cloudinit/__pycache__/ |
Current File : //lib/python3/dist-packages/cloudinit/__pycache__/apport.cpython-312.pyc |
� �fk( � �2 � d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m Z ddlmZ ddl mZmZmZmZ dZg d �ZdZdZd efd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd� Zd� Z d eeef fd�Z!d eeef fd�Z"e!e"d�Z#ded dfd�Z$dd�Z%y# e$ r d ZY �]w xY w)zCloud-init apport interface� N)�Dict)�read_cfg_paths)�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�Otherz/var/log/cloud-init.logz/var/log/cloud-init-output.log�returnc �8 � t � } | j d� S )N�userdata_raw)r � get_ipath_cur)�pathss �2/usr/lib/python3/dist-packages/cloudinit/apport.py�_get_user_data_filer/ L s � ���E����~�.�.� c �V � t | ddd�� t g d�� t | dd� y)zBAttach cloud-init logs and tarfile from 'cloud-init collect-logs'.z-egrep -i "warn|error" /var/log/cloud-init.logz"cat /var/log/cloud-init-output.log)zcloud-init-log-warningszcloud-init-output.log.txt)z cloud-initzcollect-logsz-t�/tmp/cloud-init-logs.tgzr2 zlogs.tgzN)r r r ��report�uis r. �attach_cloud_init_logsr6 Q s: � ��� @�)M� �� �H�� ��*�J�r0 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 )r4 r5 �prompts r. � attach_hwinfor; d s2 � � 0� � �b�h�h�v��#�F�Z��,@�A� �rr0 c �� � |rjt � } t |j d� � 5 }t j |� }|j di � j d� sJ � ddd� yyyy# 1 sw Y nxY wn.# t t j j t f$ r Y nw xY wd}|j |� }|�t �|s�[d}|j |t � }|rt |d | d<