KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
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-38.pyc
U

ZS�c��@s�ddlmZddlmZmZddlmZmZmZddl	m
Z
mZddlm
Z
ddlmZddlmZmZmZmZmZmZddlmZd	d
ddd
dddddddgZeeee
ed�dd�ZGdd�d�ZdS)�)�
import_module)�Callable�List)�APIData�APIResponse�ErrorWarningObject)�APIError�	error_out)�UAConfig)�IncorrectFieldTypeError)�API_BAD_ARGS_FORMAT�API_INVALID_ENDPOINT�API_MISSING_ARG�API_NO_ARG_FOR_ENDPOINT�API_UNKNOWN_ARG�WARN_NEW_VERSION_AVAILABLE)�check_for_new_versionz,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.v1zu.pro.packages.summary.v1zu.pro.packages.updates.v1z'u.pro.security.status.livepatch_cves.v1z(u.pro.security.status.reboot_required.v1zu.pro.version.v1zu.security.package_manifest.v1)�
endpoint_path�options�cfg�returnc
CsR|tkr$tttj|d�jtjd��Std|�}|j}g}|j	�r�i}dd�|j	j
D�}|D]�}z|�d�\}	}
Wn4tk
r�ttt
j|d�jt
jd��YSX|	r�|
s�ttt
j|d�jt
jd��S|	|kr�|�ttj|	d�jtjid��|
||	<q\z|j	�|�}WnHtk
�rZ}z(tttj|j|d	�jtjd��WY�Sd}~XYnXz|�||�}Wn0tk
�r�}zt|�WY�Sd}~XYnXnb|�r�tttj|d�jtjd��Sz|�|�}Wn0tk
�r}zt|�WY�Sd}~XYnXt�}
|
�r.|�ttj|
d
�jtjid��t|j|j|t|j||jd�d�S)
N)�endpoint)�msgZmsg_codez
uaclient.api.cSsg|]
}|j�qS�)�key)�.0�frr�2/usr/lib/python3/dist-packages/uaclient/api/api.py�
<listcomp>4szcall_api.<locals>.<listcomp>�=)�arg)�title�code�meta)r r)�version)�typeZ
attributesr#)Z_schema_version�warnings�data)�VALID_ENDPOINTSr	rr
�formatr�namerr�options_cls�fields�split�
ValueErrorr�appendrrZ	from_dictrrr�fn�	Exceptionrrrrr$r&rr#)rrr�modulerZoption_warnings�kwargsr,Zoption�k�v�e�resultZnew_versionrrr�call_api"s���������
���	 ������
��r8c@seZdZeeed�dd�ZdS)�APIEndpoint)r$r*r0cCs||_||_||_||_dS)N)r$r*r0r+)�selfr$r*r0r+rrr�__init__�szAPIEndpoint.__init__N)�__name__�
__module__�__qualname__�strrr;rrrrr9�s�r9N)�	importlibr�typingrrZuaclient.api.data_typesrrrZuaclient.api.errorsrr	Zuaclient.configr
Zuaclient.data_typesrZuaclient.messagesrr
rrrrZuaclient.versionrr(r?r8r9rrrr�<module>s4 ��i

Anon7 - 2021