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/api/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

��pf��
@s4ddlZddlmZddlmZmZmZmZmZm	Z	ddl
mZmZddl
mZmZmZddlmZddlmZddlmZmZdd	lmZgd
�Zdeedeed
e	eeefeeffdd�Zdedeed
e	eeefeeffdd�Z	ddedeedededeed
efdd�ZGdd�d�ZdS)�N)�
import_module)�Any�Callable�Dict�List�Optional�Tuple)�AbstractProgress�errors)�APIData�APIResponse�ErrorWarningObject)�UAConfig)�IncorrectFieldTypeError)�API_UNKNOWN_ARG�WARN_NEW_VERSION_AVAILABLE)�check_for_new_version)z,u.pro.attach.auto.configure_retry_service.v1z%u.pro.attach.auto.full_auto_attach.v1z'u.pro.attach.auto.should_auto_attach.v1zu.pro.attach.magic.initiate.v1zu.pro.attach.magic.revoke.v1zu.pro.attach.magic.wait.v1z'u.pro.attach.token.full_token_attach.v1zu.pro.detach.v1zu.pro.packages.summary.v1zu.pro.packages.updates.v1z!u.pro.security.fix.cve.execute.v1zu.pro.security.fix.cve.plan.v1z!u.pro.security.fix.usn.execute.v1zu.pro.security.fix.usn.plan.v1z'u.pro.security.status.livepatch_cves.v1z(u.pro.security.status.reboot_required.v1zu.pro.services.dependencies.v1zu.pro.services.disable.v1zu.pro.services.enable.v1z u.pro.status.enabled_services.v1zu.pro.status.is_attached.v1zu.pro.version.v1zu.security.package_manifest.v1zu.unattended_upgrades.status.v1zu.apt_news.current_news.v1�options�fields�returnc	Cs�i}g}|D];}z	|�d�\}}Wn
tytj|d��w|r#|s)tj|d��||vr=|�ttj|d�jtj	id��|||<q||fS)N�=��arg��title�code�meta)
�split�
ValueErrorr
�APIBadArgsFormat�appendr
r�format�msg�name)rr�kwargs�warnings�option�k�v�r)�2/usr/lib/python3/dist-packages/uaclient/api/api.py�_process_options)s(���
r+�datacCs�i}g}zt�|�}Wntjjytj|d��w|��D]\}}||vr7|�tt	j
|d�jt	jid��|||<q||fS)N)r,rr)
�json�loads�decoder�JSONDecodeErrorr
�APIJSONDataFormatError�itemsr r
rr!r"r#)r,rr$r%�	json_datar'r(r)r)r*�
_process_dataFs$���
r4�
endpoint_path�cfg�progress_objectc
Cs|tvr
t�tj|d��Std|�}|j}g}|jr�dd�|jjD�}z |r/t||�\}	}
n|r9t	||�\}	}
nig}	}
|�
|
�Wntjy\}zt�|�WYd}~Sd}~wwz|j�|	�}Wnt
y�}zt�tj|j|d��WYd}~Sd}~wwz|jr�|j|||d�}n|�||�}WnNty�}zt�|�WYd}~Sd}~ww|s�|r�t�tj|d��Sz|jr�|j||d�}n|�|�}Wnty�}zt�|�WYd}~Sd}~wwt�}
|
r�|�ttj|
d�jtjid��t|j|j|t|j||jd	�d
�S)N)�endpointz
uaclient.api.cSsg|]}|j�qSr))�key)�.0�fr)r)r*�
<listcomp>sszcall_api.<locals>.<listcomp>)rr8)r7)�versionr)�type�
attributesr)�_schema_versionr%r,) �VALID_ENDPOINTSr
�	error_out�APIInvalidEndpointrr8�options_clsrr+r4�extend�APIError�	from_dictr�
APIMissingArgr9�supports_progress�fn�	Exception�APINoArgsForEndpointrr r
rr!r"r#rr=r%rr)r5rr,r6r7�moduler8�option_warningsrr$r%�e�result�new_versionr)r)r*�call_api`s�
�
���������
�
������
��rRc	@s*eZdZ	d	dedededefdd�ZdS)
�APIEndpointFr=r#rJrIcCs"||_||_||_||_||_dS�N)r=r#rJrDrI)�selfr=r#rJrDrIr)r)r*�__init__�s

zAPIEndpoint.__init__N)F)�__name__�
__module__�__qualname__�strr�boolrVr)r)r)r*rS�s�����rSrT) r-�	importlibr�typingrrrrrr�uaclient.apir	r
�uaclient.api.data_typesrrr
�uaclient.configr�uaclient.data_typesr�uaclient.messagesrr�uaclient.versionrrArZr+r4rRrSr)r)r)r*�<module>sN ��
���
�������
�T

Spamworldpro Mini