Viewing File: /usr/lib/python2.7/site-packages/cloudinit/cmd/devel/logs.pyo
ó
oBú]c @ s d Z d d l Z d d l m Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l
m Z m Z m
Z
m Z m Z m Z d d g Z d Z d
Z d d „ Z d „ Z d
„ Z d „ Z d „ Z d d „ Z d „ Z d „ Z e d k re j e ƒ ƒ n d S( sG Define 'collect-logs' utility and handler to include in cloud-init cmd.iÿÿÿÿN( t datetime( t INSTANCE_JSON_SENSITIVE_FILE( t tempdir( t ProcessExecutionErrort chdirt copyt
ensure_dirt subpt
write_files /var/log/cloud-init.logs /var/log/cloud-init-output.logs /run/cloud-inits% /var/lib/cloud/instance/user-data.txtc C sš | s! t j d d d d ƒ } n | j d d d d d d
d d d
d ƒ| j d d d d d
d ƒ| j d d d t d d d d d
d j t ƒ ƒ| S( s2 Build or extend and arg parser for collect-logs utility.
@param parser: Optional existing ArgumentParser instance representing the
collect-logs subcommand which will be extended to support the args of
this utility.
@returns: ArgumentParser with proper argument configuration.
t progs collect-logst descriptions) Collect and tar all cloud-init debug infos --verboses -vt actiont countt defaulti t destt verbosityt helps Be more verbose.s --tarfiles -ts cloud-init.tar.gzsO The tarfile to create containing all collected logs. Default: cloud-init.tar.gzs --include-userdatas -ut
store_truet userdatasP Optionally include user-data from {0} which could contain sensitive information.( t argparset ArgumentParsert add_argumentt Falset formatt USER_DATA_FILE( t parser( ( s<