File: //lib/python3/dist-packages/uaclient/__pycache__/cli.cpython-310.pyc
o
S��cL �
@ s d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlm
Z
ddlmZmZmZ ddlZddlmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z! ddlm"Z# ddlm$Z$m%Z% ddl&m'Z' dd l(m)Z)m*Z* dd
l+m,Z, ddl-m.Z.m/Z/ ddl0m1Z1m2Z2 dd
l3m4Z4 ddl5m6Z6m7Z7 ddl8m9Z9m:Z: ddl;m<Z<m=Z= ddl>m?Z?m@Z@mAZA ddlBmCZCmDZDmEZEmFZF ddlGmHZH ddlImJZJmKZK dZLdZMdZNdZOdZPdZQg d�ZRdZSdejT d ZUe�V� ZWG dd � d ejX�ZYd�d!d"�ZZd#d$� Z[d%d&� Z\d�d'd(�Z]d)d*� Z^d+d,� Z_d-d.� Z`d/d0� Zad1d2� Zbd3d4� Zcd5d6� Zdd7d8� Zed9d:� Zfd;d<� Zgd=d>� Zhd?d@� ZidAdB� ZjdCdD� ZkdEdF� ZldGejmfdHdI�ZndGejmfdJdK�ZodGejmfdLdM�ZpdNdO� ZqdPdQ� ZrdRdS� ZsdGejmdTetdUetfdVdW�ZudXdY�dZd[�Zvd\d]� Zwd^d_� Zxe[d`da� �Zye[dbdc� �Zzddde� Z{e\e[e]e{�eZdf�dgdh� ����Z|e\e[e]e{�eZdi�djdk� ����Z}e\e[e]� eZdl�dme~fdndo�����ZdGejmdpe�dme~fdqdr�Z�dGejmdmdfdsdt�Z�dudv� Z�e[dGejmdme~fdwdx��Z�dydz� Z�e^e[eZd{�d|d}� ���Z�dGejmfd~d�Z�dGejmfd�d��Z�d�d�� Z�d�d�� Z�dGejmfd�d��Z�d�d�d��Z�dGejmfd�d��Z�e]� dGejmfd�d���Z�dGejmfd�d��Z�e[eZd��dGejmfd�d����Z�dGejmd�e6d�etd�eet dmdf
d�d��Z�d�d�� Z�d�d�d�d��Z�d�d�d��Z�d�d�� Z�d�d�� Z�e�d�d�d���Z�e�d�k�r�e��e�� � dS dS )�z2Client to manage Ubuntu Pro services on a machine.� N��wraps)�List�Optional�Tuple)�actions�apt�apt_news�config�contract�daemon�defaults�entitlements�event_logger�
exceptions�lock�messages�security�security_status)�status)�util�version)�call_api)�FullAutoAttachOptions�_full_auto_attach)� _initiate)�MagicAttachRevokeOptions�_revoke)�MagicAttachWaitOptions�_wait)�_reboot_required)�
AptProxyScope�setup_apt_proxy)�AttachActionsConfigFile�IncorrectTypeError)�DEFAULT_LOG_FORMAT�PRINT_WRAP_WIDTH)�,create_enable_entitlements_not_found_message�entitlements_disable_order�get_valid_entitlement_names)�ApplicationStatus�CanDisableFailure�CanEnableFailure�CanEnableFailureReason)�state_files)�refresh_motd�update_apt_and_motd_messages�proz{name} {command} [flags]zAUse {name} {command} --help for more information about a command.z&Try 'pro --help' for more information.z}Account: {account}
Subscription: {subscription}
Valid until: {contract_expiry}
Technical support level: {tech_support_level}
z$https://auth.contracts.canonical.com)�tabular�json�yamlzua_logs.tar.gz�
z� A new version is available: {version}
Please run:
sudo apt-get install ubuntu-advantage-tools
to get the latest version with new features and bug fixes.c sl e Zd Zdddejdfdee f� fdd�
Zdd� Zd
� fdd � Z e
d
eee ee f fdd��Z
� ZS )�UAArgumentParserN� base_descc s t � j||||d� || _d S )N)�prog�usage�epilog�formatter_class)�super�__init__r7 )�selfr8 r9 r: r; r7 �� __class__� �./usr/lib/python3/dist-packages/uaclient/cli.pyr= l s �
zUAArgumentParser.__init__c C s, | � tj� |dkrt}| �d|d � d S )Nz&the following arguments are required: � r5 )�print_usage�sys�stderr�TRY_HELP�exit)r>