Current File : //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<