PHP WebShell

Текущая директория: /usr/lib/python3/dist-packages/uaclient/api/u/pro/security/status/livepatch_cves/__pycache__

Просмотр файла: v1.cpython-310.pyc

o

Uٵgd�@s�ddlmZddlmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZGdd�de
�ZGd	d
�d
e
e�Zdefdd
�Zdedefdd�Zeddedd�Zdddegddd�ZdS)�)�List)�APIEndpoint)�AdditionalInfo)�UAConfig)�
BoolDataValue�
DataObject�Field�StringDataValue�	data_list)�get_livepatch_fixed_cvesc@s:eZdZededd�ededd�gZdedefdd�Z	dS)	�LivepatchCVEObject�namezName (ID) of the CVE��doc�patchedzLivepatch has patched the CVEcCs||_||_dS�N�r
r)�selfr
r�r�V/usr/lib/python3/dist-packages/uaclient/api/u/pro/security/status/livepatch_cves/v1.py�__init__s
zLivepatchCVEObject.__init__N)
�__name__�
__module__�__qualname__rr	r�fields�str�boolrrrrrrs
�rc@s2eZdZedee�dd�gZdeefdd�ZdS)�LivepatchCVEsResult�
fixed_cvesz.List of Livepatch patches for the given systemrcCs
||_dSr�r)rrrrrr$s
zLivepatchCVEsResult.__init__N)	rrrrr
rrrrrrrrrs���r�returncCs
tt��Sr)�_livepatch_cvesrrrrr�livepatch_cves+s
r"�cfgcCstdd�t�D�d�S)zQ
    This endpoint lists Livepatch patches for the currently-running kernel.
    cSs g|]}t|d|dd��qS)r
rr)r)�.0�cverrr�
<listcomp>4s��z#_livepatch_cves.<locals>.<listcomp>r)rr)r#rrrr!/s
��r!�v1�
LivepatchCVEsN)�versionr
�fn�options_clsz27.12Fzl
from uaclient.api.u.pro.security.status.livepatch_cves.v1 import livepatch_cves

result = livepatch_cves()
z/pro api u.pro.security.status.livepatch_cves.v1z�
{
    "fixed_cves":[
        {
            "name": "<CVE Name>",
            "patched": true
        },
        {
            "name": "<Other CVE Name>",
            "patched": false
        },
    ]
}
)�
introduced_in�requires_network�example_python�result_class�
exceptions�example_cli�example_json)�typingr�uaclient.api.apir�uaclient.api.data_typesr�uaclient.configr�uaclient.data_typesrrrr	r
�uaclient.security_statusrrrr"r!�endpoint�_docrrrr�<module>s0�
�

Выполнить команду


Для локальной разработки. Не используйте в интернете!