File manager - Edit - /usr/lib/python3/dist-packages/uaclient/__pycache__/messages.cpython-310.pyc
Back
o Ezd�� � @ s: d dl mZmZ d dlmZmZmZ G dd� d�ZG dd� de�ZG dd� d�Z e j d e j Ze j d e j Ze jd e j ZdZd ZdZdZdZdZdZdZdZdZdZdZed Zed Zed Zedd�Z dZ!dZ"dZ#ed Z$d!Z%d"j&e j'e jd#�Z(d$j&e j'e jd#�Z)d%j&e j'e jd#�Z*d&j&e j'e jd#�Z+d'Z,d(Z-d)Z.d*Z/d+Z0d,Z1d-Z2d.Z3d/Z4d0Z5d1Z6d2Z7d3Z8d4Z9d5Z:d6Z;d7Z<d8Z=d9Z>d:Z?d;Z@d<ZAd=e d> ZBd?e ZCd@e ZDdAZEdBZFdCj&ee j'e jdD�ZGdEZHdFZIdGZJdHZKdIZLdJZMdKZNdLZOdMZPdNZQdOZRdPZSdQZTdRZUdSZVdTZWdUZXdVZYdWZZdXZ[dYZ\dZZ]d[Z^d\Z_d]Z`d^Zad_Zbd`ZcdaZddbZedcZfddZgdeZhdfZidgZjdhZkdiZldjZmdkZndlZodmZpdnj&edo�Zqedpdqe d> �Zredrdse �Zsedtdue �Ztedvdw�Zuedxeujvdy etjv �Zwedzd{�Zxed|d}�Zyed~d�Zzed�d��Z{ed�d��Z|ed�d��Z}ed�d��Z~ed�d��Zed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d�e d> �Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d�e �Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d�e�j� �Z�ed�dÃZ�ed�d�e�j� �Z�ed�dǃZ�ed�dɃZ�ed�d˃Z�ed�d̓Z�ed�dσZ�ed�dуZ�ed�d�dԍZ�ed�dփZ�ed�dZ�ed�dڃZ�ed�d܃Z�ed�dރZ�ed�d�Z�ed�d�Z�ed�d�j&ed��Z�ed�d�e �Z�ed�d�Z�ed�d�e d> �Z�ed�d�e �Z�ed�d�Z�ed�d�Z�ed�d�Z�ed�d�e�jv �Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�ed�d��Z�e�d �d�Z�e�ddI�Z�e�d�d�Z�e�d�d�Z�e�d�d�Z�e�d �d �Z�e�d�d�Z�e�d �d�Z�e�d�d�Z�e�d�d�Z�e�d�d�Z�e�d�d�Z�e�d�d�Z�e�d�d�ZȐdj&e j'e jd#�ZɐdZ�e�d�d�Z�e�d�d �Z�e�j��d! Z�e�j��d" Zΐd#Zϐd$ZАd%Zѐd&ZҐd'ZӐd(ZԐd)ZՐd*Zd+Zאd,Zؐd-e� Zِd.e� Zڐd/e� Zېd0e� Zܐd1�&e�Zݐd2Zސd3�&e�Zߐd4Z�e�d5�d6dԍZ�e�d7�d8dԍZ�e�d9�d:dԍZ�e�d;�d<dԍZ�e�d=�d>dԍZ�e�d?�d@dԍZ�dAZ�e�dB�dCdԍZ�e�dD�dEdԍZ�e�dF�dGdԍZ�dHZ�dIZ�dJZ�dKZ�dLZ�dMZ�dNZ�dOZ�dPZ�dQZ�dRe� Z��dSe� Z��dTZ��dUZ��dVZ��dWZ��dXZ��dYZ��dZZ��d[Z��d\Z��d]�Z �d^�Z�d_j&ed��Z�d`�Z�da�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z �dg�Z e�dh�di��Z�dj�Z�dk�Z e�dl�dm��Ze�dn�do��Z�dp�Z�dq�Z�e�dr �Z�e�ds �Z�dt�Z�du�Z�dv�Z�dw�Z�dx�Z�dy�Z�dz�Z�d{�Z�d|�Ze�d}�d~��Ze�d�d���Ze�d��d���Ze�d��d���Z e�d��d���Z!e�d��d���Z"e�d��d�dԍ�Z#e�d��d�dԍ�Z$e�d��d�dԍ�Z%�d��Z&�d��Z'e�d}�d~��Ze�d�d���Ze�d��d���Z(e�d��d���Z)e�d��d���Z*e�d��d���Z+e�d��d�dԍ�Z,e�d��d���Z-e�d��d���Z.e�d��d���Z/e�d��d���Z0�d��Z1�d��Z2�d��Z3�d��Z4e�d��d���Z5�d��Z6�d��Z7�d��Z8�d��Z9e�d��d���Z:e�d��d���Z;e�d��d���Z<�d��Z=�d�S (� � )�Dict�Optional)�BASE_UA_URL�DOCUMENTATION_URL�PRO_ATTACH_URLc @ �. e Zd Zdedefdd�Zdd� Zdd� Zd S ) �NamedMessage�name�msgc C s || _ || _d | _d S �N)r r �additional_info��selfr r � r �3/usr/lib/python3/dist-packages/uaclient/messages.py�__init__ s zNamedMessage.__init__c C s$ | j |j ko| j|jko| j|jkS r )r r r )r �otherr r r �__eq__ s � �zNamedMessage.__eq__c C s d� | j�� | j�� | j�� �S )NzNamedMessage({}, {}, {}))�formatr �__repr__r r �r r r r r s �zNamedMessage.__repr__N)�__name__� __module__�__qualname__�strr r r r r r r r s r c @ r ) �FormattedNamedMessager r c C s || _ || _d S r )r �tmpl_msgr r r r r s zFormattedNamedMessage.__init__c K s t | j| jjdi |��d�S )N�r r r )r r r r )r � msg_paramsr r r r # s �zFormattedNamedMessage.formatc C s d� | j�� | j�� �S )NzFormattedNamedMessage({}, {}))r r r r r r r r r ( s �zFormattedNamedMessage.__repr__N)r r r r r r r r r r r r s r c @ s( e Zd ZdZdZdZdZdZdZdZ dS ) �TxtColorz[92mz[37mz[94mz[93mz[91mz[1mz[0mN) r r r �OKGREEN�DISABLEGREY�INFOBLUE� WARNINGYELLOW�FAIL�BOLD�ENDCr r r r r / s r u ✔u ✘z[info]zsInvalid value for {path_to_value} in /etc/ubuntu-advantage/uaclient.conf. Expected {expected_value}, found {value}.z:Failed to find the machine token overlay file: {file_path}z8Found error: {error} when reading json file: {file_path}zBChoose: [S]ubscribe at ubuntu.com [A]ttach existing token [C]ancelzError: {issue_id} not found.z#A fix is available in {fix_stream}.z The update is not yet installed.zSThe update is not installed because this system is not attached to a subscription. zXThe update is not installed because this system is attached to an expired subscription. zQThe update is not installed because this system does not have {service} enabled. z The update is already installed.zPFor easiest security on {title}, use Ubuntu Pro. https://ubuntu.com/{cloud}/pro.z! {issue}{extra_info} is resolved.z% {issue}{extra_info} is not resolved.z1 {issue}{extra_info} does not affect your system.zsecurity-pkg-still-affectedz3{num_pkgs} package{s} {verb} still affected: {pkgs}z5{count} affected source package{plural_str} installedz{issue} is addressed.z{issue} is resolved.z; {issue} is resolved by livepatch patch version: {version}.z7{issue}: {title} https://ubuntu.com/security/{url_path}z�{bold}Ubuntu Pro service: {{service}} is not enabled. To proceed with the fix, a prompt would ask permission to automatically enable this service. {{{{ pro enable {{service}} }}}}{end_bold})�bold�end_boldz�{bold}The machine is not attached to an Ubuntu Pro subscription. To proceed with the fix, a prompt would ask for a valid Ubuntu Pro token. {{ pro attach TOKEN }}{end_bold}z�{bold}The machine has an expired subscription. To proceed with the fix, a prompt would ask for a new Ubuntu Pro token to renew the subscription. {{ pro detach --assume-yes }} {{ pro attach NEW_TOKEN }}{end_bold}zu{bold}WARNING: The option --dry-run is being used. No packages will be installed when running this command.{end_bold}zZError: Ubuntu Pro service: {service} is not enabled. Without it, we cannot fix the system.zoError: The current Ubuntu Pro subscription is not entitled to: {service}. Without it, we cannot fix the system.z"{service} is required for upgrade.zG{service} is required for upgrade, but current subscription is expired.z9{service} is required for upgrade, but it is not enabled.z#APT failed to install the package. zSorry, no fix is available yet.z7Ubuntu security engineers are investigating this issue.z)A fix is coming soon. Try again tomorrow.zSorry, no fix is available.z.Source package does not exist on this release.z/Source package is not affected on this release.zUNKNOWN: {status}zFixing requested {issue_id}zFixing related USNs:z$Found related USNs: - {related_usns}zSummary:a? Even though a related USN failed to be fixed, note that {issue_id} was fixed. Related USNs do not affect the original USN. Learn more about the related USNs, please refer to this page: https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/explanations/cves_and_usns_explained.html#what-are-related-usns zUpdating package listszCould not disable {title}.z{title} access enabledz{title} enabledzKUnable to determine auto-attach platform support For more information see: �.z@Auto-attach image support is not available on {cloud_type} See: z>Auto-attach image support is not available on this image See: zInitiating attach operation...zFailed to perform attach...z{Please sign in to your Ubuntu Pro account at this link: {url} And provide the following code: {bold}{{user_code}}{end_bold})�urlr'