%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core/17212/usr/lib/python3/dist-packages/cloudinit/__pycache__/
Upload File :
Create Path :
Current File : //snap/core/17212/usr/lib/python3/dist-packages/cloudinit/__pycache__/apport.cpython-35.pyc



"�T`Q�&@sdZy&ddlmZmZmZdZWnek
rFdZYnXddddd	d
ddd
ddddddddddddddddddd d!d"gZd#Zd$Z	d%Z
d&d'd(�Zd&d)d*�Zd&d+d,�Z
d&d-d.�Zd/d0�Zd1d2�Zd&S)3zCloud-init apport interface�)�attach_file�attach_root_command_outputs�root_command_outputTFZAliYunZAltCloudzAmazon - Ec2ZAzureZBigstepZ	BrightboxZ
CloudSigmaZ
CloudStackZDigitalOceanZE24CloudzGCE - Google Compute EngineZExoscalez
Hetzner Cloudz IBM - (aka SoftLayer or BlueMix)ZLXDZMAASZNoCloudZ
OpenNebulaZ	OpenStackZOracleZOVFz'RbxCloud - (HyperOne, Rootbox, Rubikon)ZOpenTelekomCloudzSAP Converged CloudZScalewayZSmartOSZUpCloudZVMwareZZStackZOtherz/var/log/cloud-init.logz/var/log/cloud-init-output.logz%/var/lib/cloud/instance/user-data.txtNcCsCt|ddddi�tddddg�t|dd	�d
S)zBAttach cloud-init logs and tarfile from 'cloud-init collect-logs'.zcloud-init-log-warningsz-egrep -i "warn|error" /var/log/cloud-init.logzcloud-init-output.log.txtz"cat /var/log/cloud-init-output.logz
cloud-initzcollect-logsz-tz/tmp/cloud-init-logs.tgzzlogs.tgzN)rrr)�report�ui�r�2/usr/lib/python3/dist-packages/cloudinit/apport.py�attach_cloud_init_logs6s
r	cCs2d}|r.|j|�r.t|ddi�dS)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.txtZlshwN)�yesnor)rr�promptrrr�
attach_hwinfoAsrcCst|rpd}|j|�}|dkr-t�|rpd}|j|t�}|rft|d|d<n
d|d<dS)z&Prompt for cloud details if available.z/Is this machine running in a cloud environment?NzOPlease select the cloud vendor or environment in which this instance is runningrZ	CloudName�None)r
�
StopIterationZchoice�KNOWN_CLOUD_NAMES)rrr�responserrr�attach_cloud_infoKsrcCsP|rLdjt�}|j|�}|dkr6t�|rLt|td�dS)z(Optionally provide user-data if desired.z�Your user-data or cloud-config file can optionally be provided from {0} and could be useful to developers when addressing this bug. Do you wish to attach user-data to this bug?Nz
user_data.txt)�format�USER_DATA_FILEr
rr)rrrrrrr�attach_user_data\s	rcCs6d|j�kr2|d}d|kr2d|d<dS)z$Add any appropriate tags to the bug.Z
JournalErrorszBreaking ordering cyclezsystemd-orderingZTagsN)�keys)r�errorsrrr�add_bug_tagsks
rcCsTtstd��t||�t||�t||�t||�t|�dS)a-This is an entry point to run cloud-init's apport functionality.

    Distros which want apport support will have a cloud-init package-hook at
    /usr/share/apport/package-hooks/cloud-init.py which defines an add_info
    function and returns the result of cloudinit.apport.add_info(report, ui).
    z;No apport imports discovered. Apport functionality disabledT)�
has_apport�RuntimeErrorr	rrrr)rrrrr�add_infoss	




r)�__doc__Zapport.hookutilsrrrr�ImportErrorrZ
CLOUDINIT_LOGZCLOUDINIT_OUTPUT_LOGrr	rrrrrrrrr�<module>sX

	


Zerion Mini Shell 1.0