| Current Path : /usr/lib/python3/dist-packages/uaclient/__pycache__/ |
| Current File : //usr/lib/python3/dist-packages/uaclient/__pycache__/messages.cpython-38.pyc |
U
8�-d� � @ 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 ZdZ dZ!dZ"ed Z#dZ$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)Z/d*Z0d+e d, Z1d-e Z2d.e Z3d/Z4d0Z5d1j%ee j&e jd2�Z6d3Z7d4Z8d5Z9d6Z:d7Z;d8Z<d9Z=d:Z>d;Z?d<Z@d=ZAd>ZBd?ZCd@ZDdAZEdBZFdCZGdDZHdEZIdFZJdGZKdHZLdIZMdJZNdKZOdLZPdMZQdNZRdOZSdPZTdQZUdRZVdSZWdTZXdUZYdVZZdWZ[dXZ\dYZ]dZZ^d[Z_d\j%ed]�Z`ed^d_e d, �Zaed`dae �Zbedbdce �Zceddde�Zdedfedjedg ecje �Zfedhdi�Zgedjdk�Zhedldm�Ziedndo�Zjedpdq�Zkedrds�Zledtdu�Zmedvdw�Znedxdy�Zoedzd{�Zped|d}�Zqed~d�Zred�d�e d, �Zsed�d��Zted�d��Zued�d��Zved�d��Zwed�d��Zxed�d��Zyed�d��Zzed�d��Z{ed�d�e �Z|ed�d��Z}ed�d��Z~ed�d��Zed�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�dZ�ed�dăZ�ed�dƃZ�ed�dȃZ�ed�dʃZ�ed�d̃Z�ed�dZ�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�je �Z�ed�d�Z�ed�d�Z�ed�d�Z�ed�d�Z�ed�d�Z�ed�d�Z�ed�d7�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�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��dZ��dZ��dZ��dZ��dZ��dZdZÐdZĐdZŐde� ZƐde� Zǐde� ZȐde� Zɐd�%e�ZʐdZːd�%e�Z̐dZ�e�d�d d��Z�e�d!�d"d��Z�e�d#�d$d��Z�e�d%�d&d��Z�e�d'�d(d��Z�e�d)�d*d��ZӐd+Z�e�d,�d-d��Z�e�d.�d/d��Z�e�d0�d1d��Zאd2Zؐd3Zِd4Zڐd5Zېd6Zܐd7Zݐd8Zސd9Zߐd:Z�d;Z�d<Z�d=Z�d>Z�d?Z�d@Z�dAZ�dBZ�dCZ�dDZ�dEZ�dFj%edэZ�dGZ�dHZ�dIZ�dJZ�dKZ�dLj%e j&e jd!�Z�e�dM�dN�Z�dOZ�dPZ�e�dQ�dR�Z�e�dS�dT�Z��dUZ��dVZ�e��dW Z�e��dX Z��dYZ��dZZ��d[Z��d\Z��d]�Z �d^�Z�d_�Z�d`�Z�da�Ze�db�dc��Ze�dd�de��Ze�df�dg��Ze�dh�di��Ze�dj�dk��Z e�dl�dm��Z
e�dn�dod���Z�dp�Z�dq�Z
e�db�dc��Ze�dd�de��Ze�dr�ds��Ze�dt�du��Ze�dv�dw��Ze�dx�dy��Ze�dz�d{d���Ze�d|�d}��Ze�d~�d��Ze�d��d���Ze�d��d���Z�d��Z�d��Z�d��Z�d��Z�d�S (� � )�Dict�Optional)�BASE_UA_URL�DOCUMENTATION_URL�PRO_ATTACH_URLc @ s, e Zd Zeed�dd�Zdd� Zdd� ZdS ) �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 @ s, e Zd Zeed�dd�Zdd� Zdd� ZdS ) �FormattedNamedMessager c C s || _ || _d S r )r �tmpl_msgr
r r r r s zFormattedNamedMessage.__init__c K s t | j| jjf |�d�S )Nr )r r r r )r Z
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 �OKGREENZDISABLEGREY�INFOBLUEZ
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} is resolved.z {issue} is not resolved.z% {issue} does not affect your system.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.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# r$ zAttaching the machine...z$No Ubuntu Pro operations are runningzEFailed running reboot_cmds script. See: /var/log/ubuntu-advantage.logz>Livepatch support requires a system reboot across LTS upgrade.zReboot to FIPS kernel requiredz�snapd does not have wait command.
Enabling Livepatch can fail under this scenario
Please, upgrade snapd if Livepatch enable fails and try again.z;This FIPS install is out of date, run: sudo pro enable fipsz<Disabling FIPS requires system reboot to complete operation.z.{service} {pkg} package could not be installedzYPlease run `apt upgrade` to ensure all FIPS packages are updated to the correct
version.
z2This machine is now attached to '{contract_name}'
z+This machine is now successfully attached'
zEnabling default service {name}z-A reboot is required to complete {operation}.zEService {name} is recommended by default. Run: sudo pro enable {name}zThis machine is now detached.z&Unable to automatically detach machinez,One moment, checking your subscription firstz)Successfully refreshed your subscription.z#Unable to refresh your subscriptionz.Successfully processed your pro configuration.zUnable to process uaclient.confz>Successfully updated Ubuntu Pro related APT and MOTD messages.z:Unable to update Ubuntu Pro related APT and MOTD messages.z@Failed to check for change in machine contract. Reason: {reason}z:Required command to update MOTD messages not found: {cmd}.z�{service_being_enabled} cannot be enabled with {incompatible_service}.
Disable {incompatible_service} and proceed to enable {service_being_enabled}? (y/N) z�{service_being_enabled} cannot be enabled with {required_service} disabled.
Enable {required_service} and proceed to enable {service_being_enabled}? (y/N) z�{dependent_service} depends on {service_being_disabled}.
Disable {dependent_service} and proceed to disable {service_being_disabled}? (y/N) z/Disabling dependent service: {required_service}z]Package fixes cannot be installed.
To install them, run this command as root (try using sudo)z�CAUTION: Your Ubuntu Pro subscription will expire in {remaining_days} days.
Renew your subscription at https://ubuntu.com/pro to ensure continued security
coverage for your applications.
z�CAUTION: Your Ubuntu Pro subscription expired on {expired_date}.
Renew your subscription at https://ubuntu.com/pro to ensure continued security
coverage for your applications.
Your grace period will expire in {remaining_days} days.
z�*Your Ubuntu Pro subscription has EXPIRED*
{pkg_num} additional security update(s) require Ubuntu Pro with '{service}' enabled.
Renew your service at https://ubuntu.com/pro
zY*Your Ubuntu Pro subscription has EXPIRED*
Renew your service at https://ubuntu.com/pro
z�#
# CAUTION: Your Ubuntu Pro subscription will expire in {remaining_days} days.
# Renew your subscription at https://ubuntu.com/pro to ensure continued
# security coverage for your applications.
#
z�#
# CAUTION: Your Ubuntu Pro subscription expired on {expired_date}.
# Renew your subscription at https://ubuntu.com/pro to ensure continued
# security coverage for your applications.
# Your grace period will expire in {remaining_days} days.
#
z`#
# *Your Ubuntu Pro subscription has EXPIRED*
# Renew your service at https://ubuntu.com/pro
#
a� /*
* Autogenerated by ubuntu-advantage-tools
* Do not edit this file directly
*
* To change what ubuntu-advantage-tools sets, use the `pro config set`
* or the `pro config unset` commands to set/unset either:
* global_apt_http_proxy and global_apt_https_proxy
* for a global apt proxy
* or
* ua_apt_http_proxy and ua_apt_https_proxy
* for an apt proxy that only applies to Ubuntu Pro related repos.
*/
zSetting {service} proxyzEError trying to use "{proxy}" as proxy to reach "{test_url}": {error}z�No proxy set in config; however, proxy is configured for: {{services}}.
See {docs_url} for more information on pro proxy configuration.
)Zdocs_urlzcloud-non-optimized-fips-kernelzMUbuntu {series} does not provide {cloud} optimized FIPS kernel
For help see: Z
unattachedz@This machine is not attached to an Ubuntu Pro subscription.
See z valid-service-failure-unattachedz�To use '{valid_service}' you need an Ubuntu Pro subscription
Personal and community subscriptions are available at no charge
See zinvalid-service-or-failurezECannot {operation} unknown service '{invalid_service}'.
{service_msg}z!mixed-services-failure-unattached�
z"failed-disabling-dependent-servicez;Cannot disable dependent service: {required_service}{error}zdependent-service-not-foundz&Dependent service {service} not found.zdepedent-service-stops-disablezMCannot disable {service_being_disabled} when {dependent_service} is enabled.
zerror-enabling-required-servicez0Cannot enable required service: {service}{error}zrequired-service-stops-enablezKCannot enable {service_being_enabled} when {required_service} is disabled.
z!incompatible-service-stops-enablezMCannot enable {service_being_enabled} when {incompatible_service} is enabled.zservice-not-configuredz{title} is not configuredzservice-is-activez{title} is activezno-apt-url-for-servicez){title} does not have an aptURL directivezservice-already-disabledz5{title} is not currently enabled
See: sudo pro statuszservice-already-enabledz0{title} is already enabled.
See: sudo pro statusz
enable-faileszCould not enable {title}.z$subscription-not-entitled-to-servicezGThis subscription is not entitled to {title}
For more information see: zservice-not-entitledz{title} is not entitledzinapplicable-kernel-versionz\{title} is not available for kernel {kernel}.
Minimum kernel version required: {min_kernel}.zinapplicable-kernelzY{title} is not available for kernel {kernel}.
Supported flavors are: {supported_kernels}.zinapplicable-seriesz-{title} is not available for Ubuntu {series}.zinapplicable-archzZ{title} is not available for platform {arch}.
Supported platforms are: {supported_arches}.z"no-entitlement-affordances-checkedz"no entitlement affordances checkedzproxy-invalid-urlz3"{proxy}" is not a valid url. Not setting as proxy.zproxy-not-workingz/"{proxy}" is not working. Not setting as proxy.zattach-invalid-tokenzInvalid token. See z$magic-attach-token-already-activatedz,The magic attach token is already activated.zmagic-attach-token-expiredz4The magic attach token has expired or never existed.zmagic-attach-token-errorz?The magic attach token is invalid, has expired or never existedzmagic-attach-invalid-emailz{email} is not a valid email.z magic-attach-service-unavailablez,Service unavailable, please try again later.zmagic-attach-invalid-paramz=This attach flow does not support {param} with value: {value}zrequired-service-not-foundz%Required service {service} not found.z,unexpeced-contract-token-on-attached-machinez<Got unexpected contract_token on an already attached machinezapt-update-invalid-repozAPT update failed.
{repo_msg}zapt-install-failedzAPT install failed.zapt-update-invalid-url-configzSAPT update failed to read APT config for the following URL{plural}:
{failed_repos}.zapt-process-conflictzAnother process is running APT.z"apt-update-failed-process-conflictzAPT update failed. zapt-update-failedzAPT Update failedz#apt-install-failed-process-conflictz {header_msg}APT install failed. zapt-install-invalid-repoz){header_msg}APT install failed.{repo_msg}z*snapd-not-properly-installed-for-livepatchzI{snap_cmd} is present but snapd is not installed; cannot enable {service}zcannot-install-snapdz%Failed to install snapd on the systemz%ssl-verification-error-ca-certificatezoFailed to access URL: {url}
Cannot verify certificate of server
Please install "ca-certificates" and try again.z%ssl-verification-error-openssl-configzhFailed to access URL: {url}
Cannot verify certificate of server
Please check your openssl configuration.zmissing-apt-url-directivezEUbuntu Pro server provided no aptURL directive for {entitlement_name}zalready-attachedzpThis machine is already attached to '{account_name}'
To use a different subscription first run: sudo pro detach.r zconnectivity-errorzXFailed to connect to authentication server
Check your Internet connection and try again.znonroot-userz2This command must be run as root (try using sudo).zerror-installing-livepatchz/Unable to install Livepatch client: {error_msg}zapt-policy-failedzFailure checking APT policy.zattach-forbidden-expiredz*Contract "{contract_id}" expired on {date}zattach-forbidden-not-yetz6Contract "{contract_id}" is not effective until {date}zattach-forbidden-neverz1Contract "{contract_id}" has never been effectivezattach-forbiddenz@Attach denied:
{{reason}}
Visit {url} to manage contract tokens.)r&