File: //snap/core18/current/usr/lib/python3/dist-packages/cloudinit/cmd/__pycache__/clean.cpython-36.pyc
3
�Ad� � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m
Z
ddlmZm
Z
mZ ddlmZmZmZmZmZmZ dZdd d
�Zddd
�Zdd� Zdd� Zedkr�e� dS )zEDefine 'clean' utility and handler as part of cloud-init commandline.� N)�settings)�uses_systemd)�Init)�ProcessExecutionError�runparts�subp)�del_dir�del_file�error�get_config_logfiles�is_link�
write_filez/etc/machine-idc C sh | st jddd�} | jdddddd d
� | jddddd
� | jdddddd
� | jddddddd
� | S )a# 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.
�cleanzARemove logs and artifacts so cloud-init re-runs on a clean system)�progZdescriptionz-lz--logs�
store_trueF�remove_logszRemove cloud-init logs.)�action�default�dest�helpz--machine-idz�Set /etc/machine-id to 'uninitialized
' for golden imagecreation. On next boot, systemd generates a new machine-id. Remove /etc/machine-id on non-systemd environments.)r r r z-rz--rebootz;Reboot system after logs are cleaned so cloud-init re-runs.z-sz--seed�remove_seedz5Remove cloud-init seed directory /var/lib/cloud/seed.)�argparse�ArgumentParser�add_argument)�parser� r �5/usr/lib/python3/dist-packages/cloudinit/cmd/clean.py�
get_parser s<