PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  oB]c@sdZddlZddlZddlZddlZddlmZddlmZm Z m Z m Z m Z m Z dZddZedZdZd Zed krendS( sEDefine 'clean' utility and handler as part of cloud-init commandline.iN(tInit(tProcessExecutionErrortdel_dirtdel_filetget_config_logfilestis_linktsubpcCstjjd|ddS(NsERROR: s (tsyststderrtwrite(tmsg((s7/usr/lib/python2.7/site-packages/cloudinit/cmd/clean.pyterrorsc Cs|s!tjdddd}n|jddddd td d d d |jddddd td d|jddddd td dd d|S(s#Build or extend an arg parser for clean utility. @param parser: Optional existing ArgumentParser instance representing the clean subcommand which will be extended to support the args of this utility. @returns: ArgumentParser with proper argument configuration. tprogtcleant descriptionsARemove logs and artifacts so cloud-init re-runs on a clean systems-ls--logstactiont store_truetdefaulttdestt remove_logsthelpsRemove cloud-init logs.s-rs--reboots;Reboot system after logs are cleaned so cloud-init re-runs.s-ss--seedt remove_seeds5Remove cloud-init seed directory /var/lib/cloud/seed.(targparsetArgumentParsert add_argumenttFalse(tparser((s7/usr/lib/python2.7/site-packages/cloudinit/cmd/clean.pyt get_parsers   cCs+tdg}|j|rFx$t|jD]}t|q/Wntjj|jj sbdStjj |jj d}xt j d|jj D]}||kr| rqny:tjj|rt | rt |n t|Wqtk r"}tdj|t|dSXqWdS(s4Helper which removes artifacts dir and optionally log files. @param: remove_logs: Boolean. Set True to delete the cloud_dir path. False preserves them. @param: remove_seed: Boolean. Set True to also delete seed subdir in paths.cloud_dir. @returns: 0 on success, 1 otherwise. tds_depsitseeds%s/*sCould not remove {0}: {1}i(Rtread_cfgRtcfgRtostpathtisdirtpathst cloud_dirtjointglobRRtOSErrorR tformattstr(RRtinittlog_filet seed_pathR!te((s7/usr/lib/python2.7/site-packages/cloudinit/cmd/clean.pytremove_artifacts0s&     cCst|j|j}|dkr|jrdddg}yt|dtWqtk r}tdj|t |d}qXn|S(s3Handle calls to 'cloud-init clean' as a subcommand.itshutdowns-rtnowtcaptures-Could not reboot this system using "{0}": {1}i( R.RRtrebootRRRR R(R)(tnametargst exit_codetcmdR-((s7/usr/lib/python2.7/site-packages/cloudinit/cmd/clean.pythandle_clean_argsPs cCs)t}tjtd|jdS(s4Tool to collect and tar all cloud-init related logs.R N(RRtexitR7t parse_args(R((s7/usr/lib/python2.7/site-packages/cloudinit/cmd/clean.pytmain_s t__main__(t__doc__RR&R Rtcloudinit.stagesRtcloudinit.utilRRRRRRR tNoneRRR.R7R:t__name__(((s7/usr/lib/python2.7/site-packages/cloudinit/cmd/clean.pyts    .