PHP WebShell

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

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

o

Uٵg��
@s2ddlmZddlmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZddlmZddlmZmZmZmZGdd	�d	e�ZGd
d�de�Z Gdd
�d
ee�Z!dede!fdd�Z"dedede!fdd�Z#edde#ed�Z$ddde!ee	gee
eeeeeeggddd�	Z%dS)�)�List)�APIEndpoint)�AdditionalInfo)�get_expected_overall_status)�AdditionalData�AptUpgradeData�
AttachData�
EnableData�FixPlanError�
FixPlanResult�FixPlanStep�FixPlanUSNResult�FixPlanWarning�NoOpAlreadyFixedData�NoOpData�PackageCannotBeInstalledData�SecurityIssueNotFixedData�USNAdditionalData�fix_plan_usn)�UAConfig)�
DataObject�Field�StringDataValue�	data_listc@s2eZdZedee�dd�gZdeefdd�Z	dS)�USNFixPlanOptions�usnsz'A list of USNs (i.e. USN-6119-1) titles��doccC�
||_dS�N)r)�selfr�r!�M/usr/lib/python3/dist-packages/uaclient/api/u/pro/security/fix/usn/plan/v1.py�__init__(�
zUSNFixPlanOptions.__init__N)
�__name__�
__module__�__qualname__rrr�fieldsr�strr#r!r!r!r"rs��rc@sBeZdZededd�edee�dd�gZdede	efdd�Z
dS)	�USNFixPlanResult�expected_statusz&The expected status of fixing the USNsrrz&A list of ``FixPlanUSNResult`` objectscCs||_||_dSr�r+r)r r+rr!r!r"r#:s
zUSNFixPlanResult.__init__N)r%r&r'rrrr
r(r)rr#r!r!r!r"r*,s���
r*c@s*eZdZededd�gZdefdd�ZdS)�USNSFixPlanResult�	usns_dataz&A list of ``USNFixPlanResult`` objectsrcCrr�r.)r r.r!r!r"r#Hr$zUSNSFixPlanResult.__init__N)r%r&r'rr*r(r#r!r!r!r"r-?s��r-�options�returncCst|t��Sr)�_planr)r0r!r!r"�planLsr3�cfgcCsJg}d}|jD]}t||d�}t||jj�}|�|�qtt||d�d�S)z~
    This endpoint shows the necessary steps required to fix USNs in the system
    without executing any of those steps.
    �)r4r,r/)rrr�target_usn_planr+�appendr-r*)r0r4rr+�usn�usn_planr!r!r"r2Ps
���r2�v1�
USNFixPlan)�version�name�fn�options_cls�29Tz�
from uaclient.api.u.pro.security.fix.usn.plan.v1 import plan, USNFixPlanOptions

options = USNFixPlanOptions(cves=["USN-1234-1", "USN-1235-1"])
result = plan(options)
zVpro api u.pro.security.fix.usn.plan.v1 --data '{"usns": ["USN-1234-1", "USN-1235-1"]}'a�
{
    "usns_data": {
        "expected_status": "fixed",
        "usns": [
            {
                "related_usns_plan": [],
                "target_usn_plan": {
                    "title": "USN-1234-5",
                    "expected_status": "fixed",
                    "plan": [
                        {
                            "operation": "apt-upgrade",
                            "order": 1,
                            "data": {
                                "binary_packages": ["pkg1"],
                                "source_packages": ["pkg1"],
                                "pocket": "standard-updates"
                            }
                        }
                    ],
                    "warnings": [],
                    "error": null,
                    "additional_data": {
                        "associated_cves": [
                            "CVE-1234-56789"
                        ],
                        "associated_launchpad_bus": [
                            "https://launchpad.net/bugs/BUG_ID"
                        ]
                    }
                },
            }
        ]
    }
}
)	�
introduced_in�requires_network�example_python�result_class�ignore_result_classes�extra_result_classes�
exceptions�example_cli�example_jsonN)&�typingr�uaclient.api.apir�uaclient.api.data_typesr�'uaclient.api.u.pro.security.fix._commonr�/uaclient.api.u.pro.security.fix._common.plan.v1rrrr	r
rrr
rrrrrrr�uaclient.configr�uaclient.data_typesrrrrrr*r-r3r2�endpoint�_docr!r!r!r"�<module>sHD

��

�

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


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