/usr/lib/python3/dist-packages/cloudinit/__pycache__
NameSizeModeActions
apport.cpython-310.pyc73170644editdlrm
atomic_helper.cpython-310.pyc28780644editdlrm
cloud.cpython-310.pyc31990644editdlrm
dmi.cpython-310.pyc63100644editdlrm
event.cpython-310.pyc20760644editdlrm
features.cpython-310.pyc16680644editdlrm
gpg.cpython-310.pyc69120644editdlrm
helpers.cpython-310.pyc136850644editdlrm
importer.cpython-310.pyc17760644editdlrm
lifecycle.cpython-310.pyc83840644editdlrm
netinfo.cpython-310.pyc140660644editdlrm
performance.cpython-310.pyc36670644editdlrm
persistence.cpython-310.pyc29310644editdlrm
registry.cpython-310.pyc14820644editdlrm
safeyaml.cpython-310.pyc79310644editdlrm
settings.cpython-310.pyc11850644editdlrm
signal_handler.cpython-310.pyc26890644editdlrm
simpletable.cpython-310.pyc26880644editdlrm
socket.cpython-310.pyc47440644editdlrm
ssh_util.cpython-310.pyc158150644editdlrm
stages.cpython-310.pyc275610644editdlrm
subp.cpython-310.pyc99720644editdlrm
templater.cpython-310.pyc63740644editdlrm
temp_utils.cpython-310.pyc28370644editdlrm
type_utils.cpython-310.pyc4710644editdlrm
url_helper.cpython-310.pyc291510644editdlrm
user_data.cpython-310.pyc85150644editdlrm
util.cpython-310.pyc708780644editdlrm
version.cpython-310.pyc4660644editdlrm
warnings.cpython-310.pyc33760644editdlrm
__init__.cpython-310.pyc1450644editdlrm
Edit: /usr/lib/python3/dist-packages/cloudinit/__pycache__/apport.cpython-310.pyc (7317B)
o th0!@s"dZddlZddlZddlZddlmZddlmZmZddl m Z zddl m Z m Z mZmZdZWn ey=dZYnwgd Zd#d d Zd$d d Zd#ddZd$ddZd$defddZddZddZdeeeffddZdeeeffddZeedZdeddfdd Zd%d!d"Z dS)&zCloud-init apport interfaceN)Dict)INSTALLER_APPORT_FILES INSTALLER_APPORT_SENSITIVE_FILES)is_cloud_init_enabled) attach_fileattach_file_if_existsattach_root_command_outputsroot_command_outputTF)&AliYunAltCloudAkamaiz Amazon - Ec2AzureBigstep BrightboxCloudCIX CloudSigma CloudStack DigitalOceanE24CloudzGCE - Google Compute Enginez Huawei CloudExoscalez Hetzner CloudNWCSz IBM - (aka SoftLayer or BlueMix)LXDMAASNoCloud OpenNebula OpenStackOracleOVFz'RbxCloud - (HyperOne, Rootbox, Rubikon)OpenTelekomCloudzSamsung Cloud PlatformzSAP Converged CloudScalewaySmartOSUpCloudVMwareVultrZStackOutscaleWSLOthercCs<t|ddigd}|s|dt|t|dddS)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-initz collect-logsz-t/tmp/cloud-init-logs.tgzz--redactr(zlogs.tgzN)rappendr r)reportuiinclude_sensitivecommandr.2/usr/lib/python3/dist-packages/cloudinit/apport.pyattach_cloud_init_logsIs r0cCs,d}|r||rt|ddidSdSdS)z*Optionally attach hardware info from lshw.zYour 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.txtlshwN)yesnor)r*r+promptr.r.r/ attach_hwinfo_s r4cCsXtD]}tj|j}t|||jq|r(tD]}tj|j}t|||jqdSdS)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)rospathrealpathrlabelr)r*r+r, apport_filer7r.r.r/attach_installer_filesjsr:cCs^tjd}t||tj|r-|dd|dr#|dd7<|dd7<dSdS)zregionimageId architecture instanceTypebillingProductscsi|] \}}|vr||qSr.r.).0keyvalue wanted_keysr.r/ sz!_get_ec2_data..ra)rcrjr.rsr/ _get_ec2_datas rv)azureec2platformcCsJt|}|s dS||}|D]\}}|sq||||<qdS)zAdd datasoure specific information from the ds dictionary. ds_data contains the "ds" entry from data from /run/cloud/instance-data.json. N)PLATFORM_SPECIFIC_INFOrKrb capitalize)r*ryrc platform_inforetrieved_datarqrrr.r.r/add_datasource_specific_infos r~cCsz"tsWdStdd }t|}Wdn1swYWnty3tdYdSw|d}|sItdt | dSddd d d d d  D]\}}||}|rc|||<qTt ||d|ddS)zEntry point for Apport. This hook runs for every apport report Add a subset of non-sensitive cloud-init data from /run/cloud/instance-data.json that will be helpful for debugging. Nz"/run/cloud-init/instance-data.jsonrzKcloud-init run data not found on system. Unable to add cloud-specific data.v1z8instance-data.json lacks 'v1' metadata. Present keys: %sCloudID CloudNameCloudArchitecture CloudPlatform CloudRegionCloudSubPlatform)cloud_id cloud_namemachineryrk subplatformryds) ropenjsonloadFileNotFoundErrorlogging getLoggerwarningrKsortedrLrbr~)r*_fopen instance_datarrq report_keyrrr.r.r/general_add_infosH      r)NF)N)rAN)!__doc__rrr5typingrcloudinit.cmd.devel.logsrrcloudinit.cmd.statusrapport.hookutilsrrrr rQ ImportErrorKNOWN_CLOUD_NAMESr0r4r:r@boolrDrPrSstrrhrvrzr~rr.r.r.r/s4    *