HcfddlZddlZddlZddlZddlmZddlmZmZmZm Z m Z m Z m Z m Z ddlmZmZmZmZmZmZmZmZmZmZmZddlmZddlmZmZmZm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(m)Z)dd l*m+Z+ejXZ-ej\ej^e0Z1Gd d Z2Gd d ejfZ4y)N)datetime)AnyDictListOptionalSetTupleTypeUnion) apiaptconfigcontract event_logger exceptionshttpmessagessnapsystemutil) _is_attached)ApplicabilityStatusApplicationStatusCanDisableFailureCanDisableFailureReasonCanEnableFailureCanEnableFailureReasonContractStatusUserFacingStatus)status_cache_file)MessagingOperationsDictStaticAffordance)is_config_value_truec6eZdZdeddej fdZy)EntitlementWithMessage entitlement UAEntitlement named_msgc ||_||_yN)r&r()selfr&r(s de;fd)Z?deee e@ffd*ZAd+eBjdeeeDde@fffd,ZEd+eBjdefd-ZFdefd.ZGd+eBjdefd/ZHdefd0ZIej0d+eBjdefd1ZJdee'fd2ZKdefd3ZLd+eBjdeee e!jDffd4ZMd5ZNd6ZOd+eBjdeee e!jDffd7ZP dTd8edeee eQffd9ZRd+eBjdeee eQffd:ZSej0d+eBjdefd;ZTdefd<ZUdee*dfd=ZVd+eBjdeee e!jDffd>ZWdefd?ZX dTd@edAeddfdBZYdeeZe e!jDffdCZ[de\fdDZ]dee^e e!jDffdEZ_ej0dee`e e!jDffdFZadeee e!jDffdGZbde efdHZcdefdIZdde`fdJZedKeeefdLe edefdMZf dTdNeeefdOeeefdPedefdQZgd+eBjfdRZhy)Ur'NFr3Treturncy)z?The lowercase name of this entitlement, in case it is a variantr5r3r+s r, variant_namezUAEntitlement.variant_nameYsr.c|jg}|j|jk7r|j|j|S)z1The list of names this entitlement may be called.)namepresentation_nameappend)r+ valid_namess r,r>zUAEntitlement.valid_names^s;yyk  ! !TYY .   t55 6r.cy)z,The human readable title of this entitlementNr3r8s r,titlezUAEntitlement.titlef r.cy)z&A sentence describing this entitlementNr3r8s r, descriptionzUAEntitlement.descriptionlrAr.c|jr |jS|jjjrF|j j dij dij d|jS|jS)z/The user-facing name shown for this entitlementr& affordances presentedAs) is_variantr9cfgmachine_token_file is_presententitlement_cfggetr;r8s r,r<zUAEntitlement.presentation_namersm ??$$ $ XX ( ( 3 3$$((;]B']DII.  99 r.platform_checkcy)zVerify specific platform checks for a service. This should only be used if the service requires custom platform checks to check if it is available or not in the machine. TNr3)r+rMs r,verify_platform_checksz$UAEntitlement.verify_platform_checkssr.c*|j}|jrt|jjDcgc]!\}}dj||j#}}}dj dt jzdzg|z}||z }|Scc}}w)z$Help information for the entitlementz * {}: {} z ) help_textvariantsitemsformatrCjoinrCLI_HELP_VARIANTS_HEADER)r+rSr9 variant_cls variant_items variant_texts r, help_infozUAEntitlement.help_infosNN ==261D1D1F-L+##L+2I2IJM  99(;;;dBC L  %Is&B.cy)Nr3r3r8s r,static_affordancesz UAEntitlement.static_affordancessr.c|jS)a  Return a list of packages that aren't compatible with the entitlement. When we are enabling the entitlement we can directly ask the user if those entitlements can be disabled before proceding. Overridden in livepatch and fips )_incompatible_servicesr8s r,incompatible_servicesz#UAEntitlement.incompatible_servicess***r.c|jS)a Return a list of packages that must be active before enabling this service. When we are enabling the entitlement we can directly ask the user if those entitlements can be enabled before proceding. Overridden in ros and ros-updates. )_required_servicesr8s r,required_serviceszUAEntitlement.required_servicess&&&r.c|jS)a Return a list of packages that depend on this service. We will use that list during disable operations, where a disable operation will also disable all of the services required by the original service Overriden in esm-apps and esm-infra )_dependent_servicesr8s r,dependent_servicesz UAEntitlement.dependent_servicess'''r.ciSr*r3r8s r, _get_variantszUAEntitlement._get_variantss r.ct}|j}|jdijdg}|D]7}|jdijd}|s'|j|9|S)zV Fetch all available variants defined in the Contract Server response r& overridesselectorvariant)set_base_entitlement_cfgrLadd)r+valid_variantsrKrkoverriderms r,_get_contract_variantsz$UAEntitlement._get_contract_variantss{446#'' r:>>{BO ! ,Hll:r266yAG""7+ , r.c|j}|j}d|vrd|di}ni}t|D]}||vs||||<t|dkDr|SiS)Ngeneric)rirssortedlen)r+service_variantscontract_variantsrqrms r,_get_valid_variantsz!UAEntitlement._get_valid_variantss--/ 779 ( (')9))DENN/0 DG***:7*Cw' D"%^!4q!8~@b@r.c>|jriS|jS)zf Return a list of services that are considered a variant of the main service. )rGr{r8s r,rTzUAEntitlement.variantss ??I''))r.c|jsiS|jjDcic]\}}||jk7r||c}}Scc}}w)zw On a variant, return the other variants of the main service. On a non-variant, returns empty. )rGr{rUr9)r+r;clss r,other_variantszUAEntitlement.other_variantssZ I"557==? ct((( #I   sAc4|jjD]{}|jdk(r||j|j|j |j |j}|j\}}|tjk(sy|cSy)z On an enabled service class, return the variant that is enabled. Return None if no variants exist or none are enabled (e.g. access-only) ru)rH assume_yes allow_beta called_name access_onlyN) rTvaluesr9rHrr _called_namerapplication_statusrENABLED)r+rYrmstatus_s r,enabled_variantzUAEntitlement.enabled_variants  ==//1 K''94!HH???? -- ,, G 224IFA*222 r.ciSr*r3r8s r, messagingzUAEntitlement.messagings r.rHrrrrpurge extra_argsc|stj}||_||_||_||_||_|||_ng|_||_d|_ d|_ y)z]Setup UAEntitlement instance @param config: Parsed configuration dictionary NF) rUAConfigrHrrrrrr_valid_service_is_sources_list_updated)r+rHrrrrrrs r,r-zUAEntitlement.__init__sc//#C$$&  !(DO DO'"(-%r.c|jB|j xs.|jxs t|jjd|_|jS)z2Check if the service is marked as valid (non-beta)zfeatures.allow_beta)ris_betarr#rHr8s r, valid_servicezUAEntitlement.valid_service4sV    &LL M??M' 6KL   """r.ctj|jjjj |j iSr*)copydeepcopyrHrI entitlementsrLr;r8s r,roz#UAEntitlement._base_entitlement_cfg@s7}} HH ' ' 4 4 8 8B G  r.c|j}|jr|s|Stj||j|S)N) orig_accessrm)rorGrapply_contract_overridesr9r+rKs r,rKzUAEntitlement.entitlement_cfgEs@446o" "))'1B1B r.cy)z The number of steps that are reported as progress while enabling this specific entitlement that are not shared with other entitlements. Nr3r8s r, enable_stepszUAEntitlement.enable_stepsR r.cy)z The number of steps that are reported as progress while disabling this specific entitlement that are not shared with other entitlements. Nr3r8s r, disable_stepszUAEntitlement.disable_stepsZrr.cj|j}|jjdijdijd}|t|dkDr|dz }|jjdijdijd}|t|dkDr|dz }|j D].}||j |j jz }0|jD].}||j |j jz }0|S)Nr& directives requiredSnapsrrvrequiredPackages) rrKrLrxblocking_incompatible_servicesr&rHrblocking_required_services)r+ total_stepsrequired_snapsrequired_packagesincompatible_servicerequired_services r,calculate_total_enable_stepsz*UAEntitlement.calculate_total_enable_stepsbs8'')  $ $]B 7 Sr " S !   %#n*=*A 1 K  $ $]B 7 Sr " S# $   (S1B-Ca-G 1 K$($G$G$I  /;;mo K !% ? ? A   +77ln K r.c|j}|jD]%}|||jjz }'|Sr*)rblocking_dependent_servicesrH)r+rdependent_services r,calculate_total_disable_stepsz+UAEntitlement.calculate_total_disable_steps|sN((* !%!A!A!C G  ,TXX6DDF FK Gr.c|jr?tjd|jt j |j |jtjk(sEdttjtjj|j fS|j#\}}|t$j&k7rEdttj(tj(j|j fS|j*sdttj,fS|j/\}}|t0j2k(rdttj2|fS|j4r+|j7rdttj8fS|j:r+|j=sdttj>fS|j@sP|jBrDdttjDtjFj|j fSy)z Report whether or not enabling is possible for the entitlement. :return: (True, None) if can enable (False, CanEnableFailure) if can't enable z(Updating contract on service '%s' expiryFr@messagerO)$is_access_expiredLOGdebugr;rrefreshrHcontract_statusrENTITLEDrr NOT_ENTITLEDr UNENTITLEDrVr@rrDISABLEDALREADY_ENABLEDrIS_BETAapplicability_statusr INAPPLICABLEradetect_incompatible_servicesINCOMPATIBLE_SERVICErdcheck_required_services_activeINACTIVE_REQUIRED_SERVICESsupports_access_onlyrACCESS_ONLY_NOT_SUPPORTED ENABLE_ACCESS_ONLY_NOT_SUPPORTED)r+rrrdetailss r, can_enablezUAEntitlement.can_enables   ! ! # II@$)) L   TXX &##%)@)@@ *77$//66TZZ6H !% 7 7 9A !2!;!; ; *::$44;;$**;M !!+,B,J,JKL L(,(A(A(C%g #6#C#C C *77   % %002$.CC  ! !668$.II((T-=-= *DD==DD"jjE r.progressch|jd|jjd|j\}}|s|y|jt j k(r!|j|\}}|sM||_d|fS|jt jk(r!|j|\}}|s||_d|fSd|fS|jd|jjd|js$|j|sy|j|sy|j|}|syy)aNEnable specific entitlement. @return: tuple of (success, optional reason) (True, None) on success. (False, reason) otherwise. reason is only non-None if it is a populated CanEnableFailure reason. This may expand to include other types of reasons in the future. message_operationpre_can_enableFNF pre_enablerO)emitrrLrreasonrrhandle_incompatible_servicesrr_enable_required_servicesrhandle_required_snapshandle_required_packages_perform_enable)r+rrfail incompat_reterrorreq_retrets r,enablezUAEntitlement.enables4  !3!34D!E  ??, D|" 6 K KK&*&G&G'# e$#(DL $;& )DDE"&!?!?!I#(DL $;&d{" )4>>+=+=l+KL --h7"00:"""8,r.c|jjdijdijd}|ytjsD|j dt j jdtjtjsF|j dt j jd  tjdtj | tj"dt)j*d|j,j.t(j0}t)j*d|j,j2t(j4}tj6||tj8|r|j;t j<t?|dD]}|d} tj@|y#tj$rR}tjd | |j dt jjd Yd}~sd}~wwxYw#tj$rU}tjd| t$j't jjd Yd}~d}~wwxYw#tjB$ro|jdd}|jd} |j dt jDj|tj|| |YuwxYw)z. "install snaps necessary to enable a service.r&rrNTinfosnapdpackagesz snapd snapz!Failed to install snapd as a snap)exc_infozsnap install snapd)commandzFailed to refresh snapd snapzsnap refresh snapdrhttps) http_proxy https_proxy retry_sleepsc$|jdS)Nr;)rL)xs r,z5UAEntitlement.handle_required_snaps..JsQUU6]r.)keyr;classicConfinementSupportFchannel)r)rclassic_confinement_support)#rKrLris_snapd_installedrrINSTALLING_PACKAGESrV install_snapdis_snapd_installed_as_a_snap install_snaprProcessExecutionErrorrwarningEXECUTING_COMMAND_FAILEDrun_snapd_wait_cmd refresh_snapeventrrvalidate_proxyrHrPROXY_VALIDATION_SNAP_HTTP_URLrPROXY_VALIDATION_SNAP_HTTPS_URLconfigure_snap_proxySNAP_INSTALL_RETRIESrINSTALLING_REQUIRED_SNAPSrw get_snap_infoSnapNotInstalledError INSTALLING_REQUIRED_SNAP_PACKAGE) r+rrerrsnap_pkg snap_namerrs r,rz#UAEntitlement.handle_required_snaps s  $ $]B 7 Sr " S !   !&&( MM44;;W;M     002 MM,,33\3J  !!'* )    g &(( DHH'')L)L )) TXX))4+O+O  !!!#22    h@@ A~3JK H (I ""9-  .w33  ?! L 55<< 4= //  KK6K C JJ118809   833 .6ll//+#,,y1 ==DD&E !!#0K sEHI,,KI)AI$$I),K?A KKA>MMc|jjdijdijd}|sy|Dcgc]}|d }}tj}t |Dcgc]}||vc}Scc}wcc}w)/install packages necessary to enable a service.r&rrTr;)rKrLr get_installed_packages_namesall)r+rpackage package_namesinstalled_packagesrequireds r,are_required_packages_installedz-UAEntitlement.are_required_packages_installedcs  $ $]B 7 Sr " S# $ !8IJWJ J ==?>II?  H-ICTT\\<>EE#SYYFCx "r.ignore_dependent_servicesc|j\}}|tjk(rEdttj t j j|jfS|j\}}|jr|tjk(rEdttjt jj|jfS|jr-|s+|j!rdttj"fS|j$sP|j&rDdttj(t j*j|jfSy)zReport whether or not disabling is possible for the entitlement. :return: (True, None) if can disable (False, CanDisableFailure) if can't disable FrrrO)rrrrrALREADY_DISABLEDrrVr@rrKrrNOT_APPLICABLECANNOT_DISABLE_NOT_APPLICABLErgdetect_dependent_servicesACTIVE_DEPENDENT_SERVICESsupports_purgerPURGE_NOT_SUPPORTEDDISABLE_PURGE_NOT_SUPPORTED)r+r7rrrs r, can_disablezUAEntitlement.can_disable>s^!% 7 7 9A !2!;!; ;!+<<$55<<4::<N #'";";"=a$$#':'G'GG!+::$BBII"jjJ   " "+D--/%/II""tzz!+??88??"jj@ r.c|jd|jjd|j\}}|sE|y|jt j k(r!|j|\}}|s||_d|fSd|fS|j|sy|jsy|jd|jjdy)aDisable specific entitlement @param silent: Boolean set True to silence print/log of messages @return: tuple of (success, optional reason) (True, None) on success. (False, reason) otherwise. reason is only non-None if it is a populated CanDisableFailure reason. This may expand to include other types of reasons in the future. r pre_disablerF post_disablerO) rrrLrArrr=_disable_dependent_servicesr_perform_disabler)r+rrArrr4s r,r,zUAEntitlement.disable}s  )4>>+=+=m+LM ,,. T|" *DDE ;;HES#&DL $;&d{"$$X.557 )4>>+=+=n+MNr.cy)a\ Disable specific entitlement. This should be implemented by subclasses. This method does the actual disable, and does not check can_disable or handle pre_disable or post_disable messaging. @param silent: Boolean set True to silence print/log of messages @return: True on success, False otherwise. Nr3rs r,rFzUAEntitlement._perform_disables r.c:t|jdkDS)z Check for depedent services. :return: True if there are dependent services enabled False if there are no dependent services enabled r)rxrr8s r,r<z'UAEntitlement.detect_dependent_servicess43356::r.cg}|jD]J}||jj\}}|tjk(s:|j |L|S)zo Return list of depedent services that must be disabled before disabling this service. )rgrHrrrr=)r+blockingdependent_service_clsr$rs r,rz)UAEntitlement.blocking_dependent_servicesse %)%<%< 7 !1  " J.666 56  7r.c|jD]}||jd}|jdtjj |j |j|\}}|rhd}|r;|jr/|jjrd|jjz}tjj ||j }d|fcSy ) ay Disable dependent services When performing a disable operation, we might have other services that depend on the original services. If that is true, we will alert the user about this and prompt for confirmation to disable these services as well. @param silent: Boolean set True to silence print/log of messages T)rHrr)rr5rR)rrFrO) rrHrrDISABLING_DEPENDENT_SERVICErVr@r,rr4"FAILED_DISABLING_DEPENDENT_SERVICE)r+rrKr.rrr6r4s r,rEz)UAEntitlement._disable_dependent_servicess&*%E%E%G " !'DHHFC MM44;;%(YY<  H-IC DLLT\\-=-= $t||'7'7 7IAAHH#ciiIcz!' "*r.cy)z=Check if system needs to be rebooted because of this service.Fr3r8s r,_check_for_rebootzUAEntitlement._check_for_rebootsr. operationsilentc|jr7|s4tjtjj |yyy)zCheck if user should be alerted that a reboot must be performed. @param operation: The operation being executed. @param silent: Boolean set True to silence print/log of messages )rQN)rPrrrENABLE_REBOOT_REQUIRED_TMPLrV)r+rQrRs r,_check_for_reboot_msgz#UAEntitlement._check_for_reboot_msgsB  ! ! #F JJ44;;'< -3 #r.ct|j}|s tjtjfS|j D]$\}}}||k7stj |fcS|djdi}|jdd}|jr|tj|vrrtj|}tj tjj|jtjdj!|fS|jdd}|j"ry|wtj$j&|vrWtj tj(j|jtj$j*fStj,} |jd d} |jd d} |j.re| c| j0| vrUtj tj2j|j| j4dj!|  fS|j6r| r| j8| j:tj<j|j| j4| } | j?d \} }tA| }tA|}| j8|krtj | fS| j8|k(r!| j:|krtj | fS|jdi}|jI|\}}|stj |fStjdfS#tB$r+tDjGd| tj | fcYSwxYw)aCheck all contract affordances to vet current platform Affordances are a list of support constraints for the entitlement. Examples include a list of supported series, architectures for kernel revisions. :return: tuple of (ApplicabilityStatus, NamedMessage). APPLICABLE if platform passes all defined affordances, INAPPLICABLE if it doesn't meet all of the provided constraints. r&rE architecturesNz, )r@archsupported_archesseries)r@rZ kernelFlavorsminKernelVersion)r@kernelsupported_kernels)r@r] min_kernel.z$Could not parse minKernelVersion: %splatformChecks)%rKr APPLICABLEr"NO_ENTITLEMENT_AFFORDANCES_CHECKEDr^rrLaffordance_check_archr get_dpkg_archrdeduplicate_archesINAPPLICABLE_ARCHrVr@rWaffordance_check_seriesget_release_inforZINAPPLICABLE_SERIESpretty_versionget_kernel_infoaffordance_check_kernel_flavorflavorINAPPLICABLE_KERNEL uname_release#affordance_check_kernel_min_versionmajorminorINAPPLICABLE_KERNEL_VERsplitint ValueErrorrrrP)r+rK error_messagefunctorexpected_resultrEaffordance_archesdeduplicated_archesaffordance_series kernel_infoaffordance_kernelsaffordance_min_kernel invalid_msg kernel_major kernel_minormin_kern_majormin_kern_minoraffordances_platform_checkrrs r,rz"UAEntitlement.applicability_statuss..#..;; 8<7N7N G 3M7OyO+*77FF G&m488K 'OOOTB  & &!-$$&.??"&"9"9:K"L #00**11**--/%)YY/B%C2 (OOHd;  ( (!-'')008II$00,,33**!224CC4 ,,. (___dC +0BD I  / /".!!);;'440077"jj*88*.))4F*G8  4 4%!!-!!-"::AAjj"000BK G-B-H-H-M* l!$\!2!$\!2  >1*77DD!!^3%%6*77DD%0__5Er%J"112LM V'44f= ="--t33) G :),88+FF  Gs<*N1N76N7ct|jjstjS|j }|r$|dj drtjStjS)z=Return whether the user is entitled to the entitlement or notr&entitled)rrH is_attachedrrrKrLrrs r,rzUAEntitlement.contract_statusnsXDHH%11!,, ,.. }=AA*M!** *(((r.c|j\}}|tjk7rtj|fS|j }|s:tj tjj|jfS|djdddur:tj tjj|jfS|j\}}|tjk(rtj|fS|tj k(rtj |fS|j#\}}|rtj |fStj$|fS)z4Return (user-facing status, details) for entitlementrr&rF)rrrbrrrK UNAVAILABLErSERVICE_NOT_ENTITLEDrVr@rLrrrINACTIVEr!enabled_warning_statusACTIVE)r+ applicabilityrrKr explanationrwarn_msgs r,user_facing_statusz UAEntitlement.user_facing_statuswsK"&!:!:!< w /:: :#00'9 9.. ,,--444::4F ] + / / E Be K ,,--444::4F  +/*A*A*C'K !2!;!; ;#,,k9 9 #4#<#< <#++[8 8 779 #++X5 5&& 33r.cy)z The current status of application of this entitlement :return: A tuple of (ApplicationStatus, human-friendly reason) Nr3r8s r,rz UAEntitlement.application_statuss r.cy)z If the entitlment is enabled, are there any warnings? The message is displayed as a Warning Notice in status output :return: A tuple of (warning bool, human-friendly reason) rr3r8s r,rz$UAEntitlement.enabled_warning_statussr.cyr*r3r8s r,status_description_overridez)UAEntitlement.status_description_overridesr.c|jjd}|sytj|d}|tjk\ryy)zt|jdxr|S)NenableByDefault)boolrL)r+rrs r,_should_enable_by_defaultz'UAEntitlement._should_enable_by_defaultsKOO$56H=IIr.rdeltas allow_enablec|sy|jdi}|jdi}tj}t|tj k(}|s9|rt j||d}|rd|vr|ddtj fv}|rA|r|r|j}n|j\}} |tjk7r|j\} } | rtjd|j|j!t#j$t&jt(j*j-|jy| r | j.nd} tj1d |j| t&jt(j2j-|jy|jd } | s|jd } |jd i}|j5|| }|rd|_|j9\}} |r|r|rt(j:j-|j }t&j|t<j> |jAt#j$t&jt(jBj-|jDyt(jFj-|j }t&j|t<j> yy)auProcess any contract access deltas for this entitlement. :param orig_access: Dictionary containing the original resourceEntitlement access details. :param deltas: Dictionary which contains only the changed access keys and values. :param allow_enable: Boolean set True if allowed to perform the enable operation. When False, a message will be logged to inform the user about the recommended enabled service. :return: True when delta operations are processed; False when noop. :raise: UbuntuProError when auto-enable fails unexpectedly. Tr&rrFz3Disabling %s after refresh transition to unentitledr)r5zDCannot disable %s after refresh transition to unentitled. Reason: %srrr;) file_typer)$rLr rrr DROPPED_KEYrrrrrrrArrr;r,r ProgressWrapperrrDISABLE_DURING_CONTRACT_REFRESHrV message_valuer)UNABLE_TO_DISABLE_DURING_CONTRACT_REFRESHrrrENABLE_BY_DEFAULT_TMPLsysstderrr ENABLED_TMPLr@ENABLE_BY_DEFAULT_MANUAL_TMPL)r+rrrdelta_entitlementdelta_directivesrtransition_to_unentitledrrrArfail_msgrdelta_obligationsenable_by_defaultrr4s r,process_contract_deltasz%UAEntitlement.process_contract_deltass&"JJ}b9,00rB(--/ #'(9T=M=M(M#N ' 11&9$*=$9!z->>+(,%r.)NFFr5FFN)F)ir/r0r1r; help_doc_urlrrrr>rSr`rcrfrdrhrqrmrGpropertystrr9rr>abcabstractmethodr@rCr<rrr rrrr2rPr\r"r^r%rardr rgrirrsr{rTrrr!rrrr-rrorKrvrrrrrrr rr rrrrrrrrrrrrrrAr,rFr<rrErPrUrrrrrrrrrrrrrrrr3r.r,r'r'2s DLJG!NI  "*.'%)"J cT#Y s   S   3  "38n tXh3344 53*E*:C*?$@+u-CS-H'I++'5)?)D#E''(E$*?*D$E((tCo)>$>? C  AT#tO/D*D%E A*$sD$99:**  S$*?%? @    /!:,2 *.  !*.. foo &.. .  .  ..T#Y'. .: # #     c    s  c4s IE$1A(B"BCIZ;%%; tU4!1122 3;zUc.A.AUdUn  (1D1D4#4#J  (;(;    5K0L >d>,%%, tXh3344 5,\; %% tXh3344 5>16=)-= tX/00 1=~(++( tX/00 1(T   )<)<      ;4; T$2G-H #++# tXh3344 5#J4 .3  &*   g4 "HX-B-B$CC Dg4R))4 (*?*?!@@ A4B    (8+@+@"AA B      tXh3344 5  # 4 *4E*(JS>J:B3-J J# a#s(^aS#Xa a  aF-S-@-@-r.r') metaclass)5rrloggingrrtypingrrrrrr r r uaclientr r rrrrrrrrr(uaclient.api.u.pro.status.is_attached.v1r(uaclient.entitlements.entitlement_statusrrrrrrrruaclient.files.state_filesr uaclient.typesr!r" uaclient.utilr#get_event_loggerr getLoggerreplace_top_level_logger_namer/rr%ABCMetar'r3r.r,rs  EEE    B   9D.% %%'g:::8DE##Q-ckkQ-r.