/usr/lib/python3/dist-packages/uaclient/entitlements/__pycache__
NameSizeModeActions
anbox.cpython-310.pyc31070644editdlrm
base.cpython-310.pyc341920644editdlrm
cc.cpython-310.pyc12530644editdlrm
cis.cpython-310.pyc15430644editdlrm
entitlement_status.cpython-310.pyc45490644editdlrm
esm.cpython-310.pyc40880644editdlrm
esm_legacy.cpython-310.pyc10120644editdlrm
fips.cpython-310.pyc183970644editdlrm
landscape.cpython-310.pyc42270644editdlrm
livepatch.cpython-310.pyc108090644editdlrm
realtime.cpython-310.pyc72260644editdlrm
repo.cpython-310.pyc180570644editdlrm
ros.cpython-310.pyc21270644editdlrm
__init__.cpython-310.pyc81560644editdlrm
Edit: /usr/lib/python3/dist-packages/uaclient/entitlements/__pycache__/realtime.cpython-310.pyc (7226B)
o Kin@sddlZddlmZmZmZmZmZddlmZm Z m Z m Z m Z ddl mZddlmZmZddlmZmZmZe Zee eZddiZGd d d ejZGd d d eZGd ddeZ GdddeZ!GdddeZ"GdddeZ#dS)N)AnyDictOptionalTupleType)apt event_loggermessagessystemutil)repo)EntitlementWithMessage UAEntitlement)MessagingOperationsMessagingOperationsDictStaticAffordance GenuineIntelintelc@seZdZdZejZejZej Z ej j Z dZdZdZdZdZdefddZdeeeeffd d Zed d Zedeed ffddZedeed ffddZ ede!fddZ"dddZ#dS)RealtimeKernelEntitlementzrealtime-kernelzubuntu-pro-realtime-kernel.gpgTFUbuntuRealtimeKernelreturncCs(tjt|jtdgd}t||S)z%Check if system needs to be rebooted.zlinux-.*-realtime)installed_pkgsinstalled_pkgs_regex)r should_rebootsetpackagesevent needs_reboot)selfreboot_requiredr @/usr/lib/python3/dist-packages/uaclient/entitlements/realtime.py_check_for_reboots  z+RealtimeKernelEntitlement._check_for_rebootcCstjttjttjttjtiSN)GenericRealtime variant_nameNvidiaTegraRealtimeRaspberryPiRealtimeIntelIotgRealtimerr r r! _get_variants(s z'RealtimeKernelEntitlement._get_variantscCs|jrdStSr#) access_onlyr$r)r r r!default_variant0sz)RealtimeKernelEntitlement.default_variant.cCs>ddlm}m}ddlm}t|tjt|tjt|tj fS)Nr)FIPSEntitlementFIPSUpdatesEntitlement)LivepatchEntitlement) uaclient.entitlements.fipsr-r.uaclient.entitlements.livepatchr/r r REALTIME_FIPS_INCOMPATIBLE"REALTIME_FIPS_UPDATES_INCOMPATIBLEREALTIME_LIVEPATCH_INCOMPATIBLE)rr-r.r/r r r!incompatible_services6s z/RealtimeKernelEntitlement.incompatible_servicescCstjdddffS)NcSstSr#)r is_containerr r r r!Psz>RealtimeKernelEntitlement.static_affordances..F)r #REALTIME_ERROR_INSTALL_ON_CONTAINERr)r r r!static_affordancesKs z,RealtimeKernelEntitlement.static_affordancescCsDd}|jstjtjddfg}d}|jstjdtjifg}||dS)NT)msgdefaultr:) pre_enable pre_disable)r+r prompt_for_confirmationr REALTIME_PROMPTpurgeREALTIME_PRE_DISABLE_PROMPT)rr<r=r r r! messagingUs$  z#RealtimeKernelEntitlement.messagingNcCs@t|jtt}|rtt|tjj |j ddSdS)N)title) rr intersectionrget_installed_packages_namesremove_packageslistr DISABLE_FAILED_TMPLformatrC)rrr r r!rFus  z)RealtimeKernelEntitlement.remove_packages)rN)$__name__ __module__ __qualname__namer REALTIME_TITLErCREALTIME_DESCRIPTION descriptionREALTIME_HELP_TEXT help_texturlsREALTIME_HOME_PAGE help_doc_url repo_key_fileapt_noninteractivesupports_access_onlysupports_purgeoriginboolr"rstrrrr*propertyr,rr r5rr9rrBrFr r r r!rs0    rcs.eZdZedeedfffdd ZZS)RealtimeVariantr.cs(tfddjD}tj|S)Ncs*g|]\}}t|tjjj|jdqS))servicevariant)r r REALTIME_VARIANT_INCOMPATIBLErIrC).0rMclsr)r r! sz9RealtimeVariant.incompatible_services..)tupleother_variantsitemssuperr5)rincompatible_variants __class__r)r!r5s   z%RealtimeVariant.incompatible_services)rJrKrLr]rr r5 __classcell__r r rjr!r^s$r^cs>eZdZdZejZejZdZ dZ e de ffdd Z ZS)r$genericTrcsdtj}tj}|dkr0|dpg}tjj|j |j d|pdd}| t j d|if||d<|S)Nrmr<unknown)r`r_ base_flavorcurrent_flavorr:)rhrBr get_kernel_infoflavorgetr #KERNEL_FLAVOR_CHANGE_WARNING_PROMPTrIr%rMappendr r>)rrBrpr<r:rjr r!rBs" zGenericRealtime.messaging)rJrKrLr%r REALTIME_GENERIC_TITLErCREALTIME_GENERIC_DESCRIPTIONrP is_variantcheck_packages_are_installedr]rrBrlr r rjr!r$sr$c@s$eZdZdZejZejZdZ dZ dS)r&z nvidia-tegraTN) rJrKrLr%r REALTIME_NVIDIA_TITLErCREALTIME_NVIDIA_DESCRIPTIONrPrxryr r r r!r&s r&c@s2eZdZdZejZejZdZ dZ de fddZ dS)r'raspiTrc Cs\d}zt|}d|vpd|vWSty-}z td|WYd}~dSd}~ww)Nz/proc/device-tree/modelzraspberry pi 4zraspberry pi 5z)Error while detecting if raspberry pi: %rF)r load_filestriplower ExceptionLOGinfo)rproc_file_pathmodeler r r!variant_auto_selects z'RaspberryPiRealtime.variant_auto_selectN) rJrKrLr%r REALTIME_RASPI_TITLErCREALTIME_RASPI_DESCRIPTIONrPrxryr[rr r r r!r'sr'c@sLeZdZdZejZejZdZ dZ de e e fdeeeejffddZdS)r(z intel-iotgTplatform_checksrcCsPtjpd}t||}|dg}||vrdSdtjj|j|d |dfS)Ncpu_vendor_ids)TNF,)rCvendorsupported_vendors) r get_cpu_infocpuinfo_vendor_idCPU_VENDOR_MAPrsr INAPPLICABLE_VENDOR_NAMErIrCjoin)rr vendor_idrr r r!verify_platform_checkss  z(IntelIotgRealtime.verify_platform_checksN)rJrKrLr%r REALTIME_INTEL_TITLErCREALTIME_INTEL_DESCRIPTIONrPrxryrr\rrr[r NamedMessagerr r r r!r(s r()$loggingtypingrrrrruaclientrrr r r uaclient.entitlementsr uaclient.entitlements.baser ruaclient.typesrrrget_event_loggerr getLoggerreplace_top_level_logger_namerJrrRepoEntitlementrr^r$r&r'r(r r r r!s m