ó oBú]c@sødZy&ddlmZmZmZeZWnek rEeZnXddddddd d d d d dddddddddddddddddgZ dZ d Z d!Z d(d"„Zd(d#„Zd(d$„Zd(d%„Zd&„Zd'„Zd(S()sCloud-init apport interfaceiÿÿÿÿ(t attach_filetattach_root_command_outputstroot_command_outputtAliYuntAltClouds Amazon - Ec2tAzuretBigstept Brightboxt CloudSigmat CloudStackt DigitalOceantE24CloudsGCE - Google Compute EnginetExoscales Hetzner Clouds IBM - (aka SoftLayer or BlueMix)tLXDtMAAStNoCloudt OpenNebulat OpenStacktOracletOVFs'RbxCloud - (HyperOne, Rootbox, Rubikon)tOpenTelekomCloudtScalewaytSmartOStVMwaretZStacktOthers/var/log/cloud-init.logs/var/log/cloud-init-output.logs%/var/lib/cloud/instance/user-data.txtcCsEt|idd6dd6ƒtddddgƒt|dd ƒd S( sBAttach cloud-init logs and tarfile from 'cloud-init collect-logs'.s-egrep -i "warn|error" /var/log/cloud-init.logscloud-init-log-warningss"cat /var/log/cloud-init-output.logscloud-init-output.log.txts cloud-inits collect-logss-ts/tmp/cloud-init-logs.tgzslogs.tgzN(RRR(treporttui((s4/usr/lib/python2.7/site-packages/cloudinit/apport.pytattach_cloud_init_logs4s   cCs6d}|r2|j|ƒr2t|idd6ƒndS(s*Optionally attach hardware info from lshw.s¡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?tlshwslshw.txtN(tyesnoR(RRtprompt((s4/usr/lib/python2.7/site-packages/cloudinit/apport.pyt attach_hwinfo?scCs}|ryd}|j|ƒ}|dkr0t‚n|ryd}|j|tƒ}|rit|d|dsT