o
    K&bL                     @   s  d dl mZmZ G dd dZG dd deZG dd dZejd ej Zej	d	 ej Z
d
ZdZdZdZdZdZdZdZdZdZdZed Ze
d Zed ZdZdZdZdZdZdZdZdZ d Z!d!e d" Z"d#e Z#d$e Z$d%Z%d&Z&d'Z'd(Z(d)Z)d*Z*d+Z+d,Z,d-Z-d.Z.d/Z/d0Z0d1Z1d2Z2d3Z3d4Z4d5Z5d6Z6d7Z7d8Z8d9Z9d:Z:d;Z;d<Z<d=Z=d>Z>d?Z?d@Z@dAZAdBZBdCZCdDZDdEeD ZEdFZFdGZGdHZHdIZIdJZJdKZKdLjLedMZMedNdOe d" ZNedPdQe ZOedRdSe ZPedTdUZQedVdWZRedXdYZSedZd[ZTed\d]ZUed^d_ZVed`daZWedbdcZXedddeZYedfdgZZedhdiZ[edjdkZ\edldme d" Z]edndoZ^edpdqZ_edrdsZ`edtduZaedvdwZbedxdyZcedzd{Zded|d}Zeed~de ZfeddZgeddZheddZieddZjeddZkeddZleddeljm ZneddZoeddeljm ZpeddZqeddZreddZseddZteddZuedddZveddZweddZxeddZyeddZzeddZ{eddZ|eddZ}eddZ~eddjLedZedde ZeddZedde d" Zedde ZeddZeddZeddZeddZeddej ZeddŃZeddǃZeddɃZedd˃Zedd̓ZeddσZedd(Zedd҃ZeddԃZeddփZedd؃ZeddڃZedd܃Zexjmd Zexjmd ZdS )    )BASE_UA_URLDOCUMENTATION_URLc                   @   s   e Zd ZdedefddZdS )NamedMessagenamemsgc                 C      || _ || _d S Nr   r   selfr   r    r   3/usr/lib/python3/dist-packages/uaclient/messages.py__init__      
zNamedMessage.__init__N)__name__
__module____qualname__strr   r   r   r   r   r      s    r   c                   @   s&   e Zd ZdedefddZdd ZdS )FormattedNamedMessager   r   c                 C   r   r   )r   tmpl_msgr
   r   r   r   r      r   zFormattedNamedMessage.__init__c                 K   s   t | j| jjdi |dS )Nr	   r   )r   r   r   format)r   Z
msg_paramsr   r   r   r      s   zFormattedNamedMessage.formatN)r   r   r   r   r   r   r   r   r   r   r   
   s    r   c                   @   s   e Zd ZdZdZdZdZdS )TxtColorz[92mz[37mz[91mz[0mN)r   r   r   OKGREENZDISABLEGREYFAILENDCr   r   r   r   r      s
    r   u   ✔u   ✘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}zError: {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.z7{issue}: {title}
https://ubuntu.com/security/{url_path}zRError: UA service: {service} is not enabled.
Without it, we cannot fix the system.zgError: The current UA subscription is not entitled to: {service}.
Without it, we cannot fix the system.zUpdating package listszCould not disable {title}.z{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: z*No Ubuntu Advantage operations are runningzEFailed running reboot_cmds script. See: /var/log/ubuntu-advantage.logz>Livepatch support requires a system reboot across LTS upgrade.zReboot to FIPS kernel requiredzsnapd 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 ua 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'
zEnabling default service {name}z-A reboot is required to complete {operation}.zDService {name} is recommended by default. Run: sudo ua enable {name}zThis 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 ua configuration.zUnable to process uaclient.confz{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 * Introducing Extended Security Maintenance for Applications.
   Receive updates to over 30,000 software packages with your
   Ubuntu Advantage subscription. Free for personal use.

     {url}
zCAUTION: Your {title} service will expire in {remaining_days} days.
Renew UA subscription at {url} to ensure
continued security coverage for your applications.
zCAUTION: Your {title} service expired on {expired_date}.
Renew UA subscription at {url} to ensure
continued security coverage for your applications.
Your grace period will expire in {remaining_days} days.
z*Your {title} subscription has EXPIRED*

{pkg_num} additional security update(s) could have been applied via {title}.

Renew your UA services at {url}
z*Your {title} subscription has EXPIRED*
Enabling {title} service would provide security updates for following packages:
  {pkg_names}
{pkg_num} {name} security update(s) NOT APPLIED. Renew your UA services at
{url}
z_Enable {title} to receive additional future security updates.
See {url} or run: sudo ua status
z(*Your {title} subscription has EXPIRED*
z*The following packages could receive security updates with {title} service enabled:
  {pkg_names}
Learn more about {title} service {eol_release}at {url}
zUUbuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
a;  /*
 * Autogenerated by ubuntu-advantage-tools
 * Do not edit this file directly
 *
 * To change what ubuntu-advantage-tools sets, run one of the following:
 * Substitute "apt_https_proxy" for "apt_http_proxy" as necessary.
 *   sudo ua config set apt_http_proxy=<value>
 *   sudo ua config unset apt_http_proxy
 */
z# Ubuntu-Advantage client config file.
# If you modify this file, run "ua refresh config" to ensure changes are
# picked up by Ubuntu-Advantage client.

zSetting {service} proxyzEError trying to use "{proxy}" as proxy to reach "{test_url}": {error}zNo proxy set in config; however, proxy is configured for: {{services}}.
See {docs_url} for more information on ua proxy configuration.
)Zdocs_urlzcloud-non-optimized-fips-kernelzMUbuntu {series} does not provide {cloud} optimized FIPS kernel
For help see: Z
unattachedz7This machine is not attached to a UA subscription.
See zenable-failure-unattachedz~To use '{name}' you need an Ubuntu Advantage subscription
Personal and community subscriptions are available at no charge
See z"failed-disabling-dependent-servicez;Cannot disable dependent service: {required_service}{error}zdependent-service-not-foundz&Dependent service {service} not found.zdepedent-service-stops-disablezMCannot disable {service_being_disabled} when {dependent_service} is enabled.
zerror-enabling-required-servicez0Cannot enable required service: {service}{error}zrequired-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.zservice-not-configuredz{title} is not configuredzservice-is-activez{title} is activezno-apt-url-for-servicez){title} does not have an aptURL directivezservice-already-disabledz4{title} is not currently enabled
See: sudo ua statuszservice-already-enabledz/{title} is already enabled.
See: sudo ua statuszenable-faileszCould not enable {title}.z$subscription-not-entitled-to-servicezGThis subscription is not entitled to {title}
For more information see: zservice-not-entitledz{title} is not entitledzinapplicable-kernel-versionz\{title} is not available for kernel {kernel}.
Minimum kernel version required: {min_kernel}.zinapplicable-kernelzY{title} is not available for kernel {kernel}.
Supported flavors are: {supported_kernels}.zinapplicable-seriesz-{title} is not available for Ubuntu {series}.zinapplicable-archzZ{title} is not available for platform {arch}.
Supported platforms are: {supported_arches}.z"no-entitlement-affordances-checkedz"no entitlement affordances checkedzproxy-invalid-urlz3"{proxy}" is not a valid url. Not setting as proxy.zproxy-not-workingz/"{proxy}" is not working. Not setting as proxy.zattach-invalid-tokenzInvalid token. See zrequired-service-not-foundz%Required service {service} not found.z,unexpeced-contract-token-on-attached-machinez<Got unexpected contract_token on an already attached machinezapt-update-invalid-repozAPT update failed.
{repo_msg}zapt-install-faileszAPT install failed.zapt-update-invalid-url-configzSAPT update failed to read APT config for the following URL{plural}:
{failed_repos}.zapt-process-conflictzAnother process is running APT.z"apt-update-failed-process-conflictzAPT update failed. zapt-update-failedzAPT Update failedz#apt-install-failed-process-conflictz {header_msg}APT install failed. zapt-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}z%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.zmissing-apt-url-directivezKUbuntu Advantage server provided no aptURL directive for {entitlement_name}zalready-attachedzoThis machine is already attached to '{account_name}'
To use a different subscription first run: sudo ua detach.r	   zalready-attached-on-proz>Skipping attach: Instance '{instance_id}' is already attached.zconnectivity-errorzXFailed to connect to authentication server
Check your Internet connection and try again.znonroot-userz2This command must be run as root (try using sudo).zerror-installing-livepatchz/Unable to install Livepatch client: {error_msg}zapt-policy-failedzFailure checking APT policy.zattach-forbidden-expiredz*Contract "{contract_id}" expired on {date}zattach-forbidden-not-yetz6Contract "{contract_id}" is not effective until {date}zattach-forbidden-neverz1Contract "{contract_id}" has never been effectivezattach-forbiddenz@Attach denied:
{{reason}}
Visit {url} to manage contract tokens.)Zurlzattach-experied-tokenz8Expired token or contract. To obtain a new token visit: zattach-token-xor-configzuDo not pass the TOKEN arg if you are using --attach-config.
Include the token in the attach-config file instead.
    zattach-requires-tokenzPAttach requires a token: sudo ua attach <TOKEN>
To obtain a token please visit: zattach-failurezFailed to attach machine. See zattach-failure-default-servicez8Failed to enable default services, check: sudo ua statusz$invalid-contract-deltas-service-typez<Could not determine contract delta service type {orig} {new}zinvalid-service-or-failurez:Cannot {operation} unknown service '{name}'.
{service_msg}z	lock-heldz0Operation in progress: {lock_holder} (pid:{pid})zlock-held-errorz#Unable to perform: {lock_request}.
zunexpected-errorzUnexpected error(s) occurred.
For more details, see the log: /var/log/ubuntu-advantage.log
To file a bug run: ubuntu-bug ubuntu-advantage-toolszattach-config-read-errorz*Error while reading {config_name}: {error}zjson-format-require-assume-yesz3json formatted response requires --assume-yes flag.zlivepatch-not-enabledz*canonical-livepatch snap is not installed.z$livepatch-error-install-on-containerz(Cannot install Livepatch on a container.z!livepatch-error-when-fips-enabledz-Cannot enable Livepatch when FIPS is enabled.zfips-reboot-requiredzfips-system-reboot-requiredz>FIPS support requires system reboot to complete configuration.z%fips-enable-when-fips-updates-enabledz4Cannot enable {fips} when {fips_updates} is enabled.zfips-proc-file-errorz{file_name} is not set to 1z*fips-enable-when-fips-updates-once-enabledz=Cannot enable {fips} because {fips_updates} was once enabled.zfips-updates-invalidates-fipszFIPS cannot be enabled if FIPS Updates has ever been enabled because FIPS Updates installs security patches that aren't officially certified.zlivepatch-invalidates-fipszLivepatch cannot be enabled while running the official FIPS certified kernel. If you would like a FIPS compliant kernel with additional bug fixes and security updates, you can use the FIPS Updates service with Livepatch.z {error}z% Failed to access URL: {url}. {error}N)Zuaclient.defaultsr   r   r   r   r   r   r   ZOKGREEN_CHECKr   ZFAIL_XZERROR_INVALID_CONFIG_VALUEZ&INVALID_PATH_FOR_MACHINE_TOKEN_OVERLAYZERROR_JSON_DECODING_IN_FILEZSECURITY_FIX_NOT_FOUND_ISSUEZSECURITY_FIX_RELEASE_STREAMZSECURITY_UPDATE_NOT_INSTALLEDZ*SECURITY_UPDATE_NOT_INSTALLED_SUBSCRIPTIONZ%SECURITY_UPDATE_NOT_INSTALLED_EXPIREDZSECURITY_SERVICE_DISABLEDZSECURITY_UPDATE_INSTALLEDZSECURITY_USE_PRO_TMPLZSECURITY_ISSUE_RESOLVEDZSECURITY_ISSUE_NOT_RESOLVEDZSECURITY_ISSUE_UNAFFECTEDZSECURITY_AFFECTED_PKGSZ	USN_FIXEDZ	CVE_FIXEDZSECURITY_URLZSECURITY_UA_SERVICE_NOT_ENABLEDZ SECURITY_UA_SERVICE_NOT_ENTITLEDZAPT_UPDATING_LISTSZDISABLE_FAILED_TMPLZENABLED_TMPLZUNABLE_TO_DETERMINE_CLOUD_TYPEZ"UNSUPPORTED_AUTO_ATTACH_CLOUD_TYPEZUNSUPPORTED_AUTO_ATTACHZNO_ACTIVE_OPERATIONSZREBOOT_SCRIPT_FAILEDZLIVEPATCH_LTS_REBOOT_REQUIREDZFIPS_REBOOT_REQUIRED_MSGZSNAPD_DOES_NOT_HAVE_WAIT_CMDZFIPS_INSTALL_OUT_OF_DATEZFIPS_DISABLE_REBOOT_REQUIREDZFIPS_PACKAGE_NOT_AVAILABLEZFIPS_RUN_APT_UPGRADEZATTACH_SUCCESS_TMPLZATTACH_SUCCESS_NO_CONTRACT_NAMEZENABLE_BY_DEFAULT_TMPLZENABLE_REBOOT_REQUIRED_TMPLZENABLE_BY_DEFAULT_MANUAL_TMPLZDETACH_SUCCESSZDETACH_AUTOMATION_FAILUREZREFRESH_CONTRACT_ENABLEZREFRESH_CONTRACT_SUCCESSZREFRESH_CONTRACT_FAILUREZREFRESH_CONFIG_SUCCESSZREFRESH_CONFIG_FAILUREZINCOMPATIBLE_SERVICEZREQUIRED_SERVICEZDEPENDENT_SERVICEZDISABLING_DEPENDENT_SERVICEZSECURITY_APT_NON_ROOTZANNOUNCE_ESM_TMPLZCONTRACT_EXPIRED_SOON_TMPLZ"CONTRACT_EXPIRED_GRACE_PERIOD_TMPLZCONTRACT_EXPIRED_MOTD_PKGS_TMPLZCONTRACT_EXPIRED_APT_PKGS_TMPLZDISABLED_MOTD_NO_PKGS_TMPLZ!CONTRACT_EXPIRED_APT_NO_PKGS_TMPLZDISABLED_APT_PKGS_TMPLZUBUNTU_NO_WARRANTYZAPT_PROXY_CONFIG_HEADERZUACLIENT_CONF_HEADERZSETTING_SERVICE_PROXYZERROR_USING_PROXYr   Z!PROXY_DETECTED_BUT_NOT_CONFIGUREDZFIPS_BLOCK_ON_CLOUDZ
UNATTACHEDZENABLE_FAILURE_UNATTACHEDZ"FAILED_DISABLING_DEPENDENT_SERVICEZDEPENDENT_SERVICE_NOT_FOUNDZDEPENDENT_SERVICE_STOPS_DISABLEZERROR_ENABLING_REQUIRED_SERVICEZREQUIRED_SERVICE_STOPS_ENABLEZ!INCOMPATIBLE_SERVICE_STOPS_ENABLEZSERVICE_NOT_CONFIGUREDZSERVICE_IS_ACTIVEZNO_APT_URL_FOR_SERVICEZALREADY_DISABLEDZALREADY_ENABLEDZENABLED_FAILEDZ
UNENTITLEDZSERVICE_NOT_ENTITLEDZINAPPLICABLE_KERNEL_VERZINAPPLICABLE_KERNELZINAPPLICABLE_SERIESZINAPPLICABLE_ARCHZ"NO_ENTITLEMENT_AFFORDANCES_CHECKEDZNOT_SETTING_PROXY_INVALID_URLZNOT_SETTING_PROXY_NOT_WORKINGZATTACH_INVALID_TOKENZREQUIRED_SERVICE_NOT_FOUNDZ-UNEXPECTED_CONTRACT_TOKEN_ON_ATTACHED_MACHINEZAPT_UPDATE_INVALID_REPOZAPT_INSTALL_FAILEDZAPT_UPDATE_INVALID_URL_CONFIGZAPT_PROCESS_CONFLICTr   ZAPT_UPDATE_PROCESS_CONFLICTZAPT_UPDATE_FAILEDZAPT_INSTALL_PROCESS_CONFLICTZAPT_INSTALL_INVALID_REPOZSNAPD_NOT_PROPERLY_INSTALLEDZ&SSL_VERIFICATION_ERROR_CA_CERTIFICATESZ%SSL_VERIFICATION_ERROR_OPENSSL_CONFIGZMISSING_APT_URL_DIRECTIVEZALREADY_ATTACHEDZALREADY_ATTACHED_ON_PROZCONNECTIVITY_ERRORZNONROOT_USERZERROR_INSTALLING_LIVEPATCHZAPT_POLICY_FAILEDZATTACH_FORBIDDEN_EXPIREDZATTACH_FORBIDDEN_NOT_YETZATTACH_FORBIDDEN_NEVERZATTACH_FORBIDDENZATTACH_EXPIRED_TOKENZATTACH_TOKEN_ARG_XOR_CONFIGZATTACH_REQUIRES_TOKENZATTACH_FAILUREZATTACH_FAILURE_DEFAULT_SERVICESZ$INVALID_CONTRACT_DELTAS_SERVICE_TYPEZINVALID_SERVICE_OP_FAILUREZ	LOCK_HELDr   ZLOCK_HELD_ERRORZUNEXPECTED_ERRORZATTACH_CONFIG_READ_ERRORZJSON_FORMAT_REQUIRE_ASSUME_YESZLIVEPATCH_NOT_ENABLEDZ$LIVEPATCH_ERROR_INSTALL_ON_CONTAINERZ!LIVEPATCH_ERROR_WHEN_FIPS_ENABLEDZFIPS_REBOOT_REQUIREDZFIPS_SYSTEM_REBOOT_REQUIREDZ$FIPS_ERROR_WHEN_FIPS_UPDATES_ENABLEDZFIPS_PROC_FILE_ERRORZ)FIPS_ERROR_WHEN_FIPS_UPDATES_ONCE_ENABLEDZFIPS_UPDATES_INVALIDATES_FIPSZLIVEPATCH_INVALIDATES_FIPSZLOG_CONNECTIVITY_ERROR_TMPLZ$LOG_CONNECTIVITY_ERROR_WITH_URL_TMPLr   r   r   r   <module>   s   			


	
