Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/uaclient/entitlements/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/uaclient/entitlements/__pycache__/realtime.cpython-310.pyc
o

���f��@s�ddlZddlmZmZmZmZmZddlmZm	Z	m
Z
mZmZddl
mZddlmZmZddlmZmZmZe	��Ze�e�e��ZGdd�dej�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�Z Gdd�de�Z!Gdd�de�Z"dS)�N)�Any�Dict�Optional�Tuple�Type)�apt�event_logger�messages�system�util)�repo)�EntitlementWithMessage�
UAEntitlement)�MessagingOperations�MessagingOperationsDict�StaticAffordancec@s�eZdZdZejZejZej	Z
ejjZ
dZdZdZdZdZdefdd�Zdeeeeffd	d
�Zedd��Zedeed
ffdd��Zedeed
ffdd��Z ede!fdd��Z"ddd�Z#dS)�RealtimeKernelEntitlementzrealtime-kernelzubuntu-pro-realtime-kernel.gpgTF�UbuntuRealtimeKernel�returncCs(tjt|j�tdg�d�}t�|�|S)z%Check if system needs to be rebooted.zlinux-.*-realtime)�installed_pkgs�installed_pkgs_regex)r
�
should_reboot�set�packages�event�needs_reboot)�self�reboot_required�r�@/usr/lib/python3/dist-packages/uaclient/entitlements/realtime.py�_check_for_reboots�
z+RealtimeKernelEntitlement._check_for_rebootcCstjttjttjttjtiS�N)�GenericRealtime�variant_name�NvidiaTegraRealtime�RaspberryPiRealtime�IntelIotgRealtime�rrrr�
_get_variants&s
�z'RealtimeKernelEntitlement._get_variantscCs|jrdStSr!)�access_onlyr"r'rrr�default_variant.sz)RealtimeKernelEntitlement.default_variant.cCs>ddlm}m}ddlm}t|tj�t|tj�t|tj	�fS)Nr)�FIPSEntitlement�FIPSUpdatesEntitlement)�LivepatchEntitlement)
�uaclient.entitlements.fipsr+r,�uaclient.entitlements.livepatchr-r
r	�REALTIME_FIPS_INCOMPATIBLE�"REALTIME_FIPS_UPDATES_INCOMPATIBLE�REALTIME_LIVEPATCH_INCOMPATIBLE)rr+r,r-rrr�incompatible_services4s����z/RealtimeKernelEntitlement.incompatible_servicescCstjdd�dffS)NcSst��Sr!)r
�is_containerrrrr�<lambda>Nsz>RealtimeKernelEntitlement.static_affordances.<locals>.<lambda>F)r	�#REALTIME_ERROR_INSTALL_ON_CONTAINERr'rrr�static_affordancesIs
��z,RealtimeKernelEntitlement.static_affordancescCsDd}|jstjtjdd�fg}d}|jstjdtjifg}||d�S)NT)�msg�defaultr8)�
pre_enable�pre_disable)r)r�prompt_for_confirmationr	�REALTIME_PROMPT�purge�REALTIME_PRE_DISABLE_PROMPT)rr:r;rrr�	messagingSs$���
���
�z#RealtimeKernelEntitlement.messagingNcCs@t|j��tt����}|rt�t|�tjj	|j
d��dSdS)N)�title)rr�intersectionr�get_installed_packages_names�remove_packages�listr	�DISABLE_FAILED_TMPL�formatrA)rrrrrrDss

���z)RealtimeKernelEntitlement.remove_packages)rN)$�__name__�
__module__�__qualname__�namer	�REALTIME_TITLErA�REALTIME_DESCRIPTION�description�REALTIME_HELP_TEXT�	help_text�urls�REALTIME_HOME_PAGE�help_doc_url�
repo_key_file�apt_noninteractive�supports_access_only�supports_purge�origin�boolr r�strrrr(�propertyr*rr
r3rr7rr@rDrrrrrs0	
	�rcs.eZdZedeedff�fdd��Z�ZS)�RealtimeVariantr.cs(t�fdd��j��D��}t�j|S)Ncs*g|]\}}t|tjj�j|jd���qS))�service�variant)r
r	�REALTIME_VARIANT_INCOMPATIBLErGrA)�.0rK�clsr'rr�
<listcomp>�s����z9RealtimeVariant.incompatible_services.<locals>.<listcomp>)�tuple�other_variants�items�superr3)r�incompatible_variants��	__class__r'rr3s
��z%RealtimeVariant.incompatible_services)rHrIrJr[rr
r3�
__classcell__rrrhrr\~s$r\c@�$eZdZdZejZejZdZ	dZ
dS)r"�genericTN)rHrIrJr#r	�REALTIME_GENERIC_TITLErA�REALTIME_GENERIC_DESCRIPTIONrN�
is_variant�check_packages_are_installedrrrrr"��r"c@rk)r$znvidia-tegraTN)rHrIrJr#r	�REALTIME_NVIDIA_TITLErA�REALTIME_NVIDIA_DESCRIPTIONrNrorprrrrr$�rqr$c@s2eZdZdZejZejZdZ	dZ
defdd�ZdS)r%�raspiTrc
Cs\d}zt�|�����}d|vpd|vWSty-}z
t�d|�WYd}~dSd}~ww)Nz/proc/device-tree/modelzraspberry pi 4zraspberry pi 5z)Error while detecting if raspberry pi: %rF)r
�	load_file�strip�lower�	Exception�LOG�info)r�proc_file_path�model�errr�variant_auto_select�s��z'RaspberryPiRealtime.variant_auto_selectN)
rHrIrJr#r	�REALTIME_RASPI_TITLErA�REALTIME_RASPI_DESCRIPTIONrNrorprYr~rrrrr%�sr%c@sLeZdZdZejZejZdZ	dZ
deee
fdeeeejffdd�ZdS)r&z
intel-iotgT�platform_checksrcCs@t��j}|�dg�}||vrdSdtjj|j|d�|�d�fS)N�cpu_vendor_ids)TNF�,)rA�vendor�supported_vendors)	r
�get_cpu_info�	vendor_id�getr	�INAPPLICABLE_VENDOR_NAMErGrA�join)rr�r�r�rrr�verify_platform_checks�s
�z(IntelIotgRealtime.verify_platform_checksN)rHrIrJr#r	�REALTIME_INTEL_TITLErA�REALTIME_INTEL_DESCRIPTIONrNrorprrZrrrYr�NamedMessager�rrrrr&�s
��r&)#�logging�typingrrrrr�uaclientrrr	r
r�uaclient.entitlementsr�uaclient.entitlements.baser
r�uaclient.typesrrr�get_event_loggerr�	getLogger�replace_top_level_logger_namerHry�RepoEntitlementrr\r"r$r%r&rrrr�<module>sm

Spamworldpro Mini