%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/uaclient/api/u/pro/security/fix/usn/plan/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/uaclient/api/u/pro/security/fix/usn/plan/__pycache__/v1.cpython-312.pyc

�

�(�f��
�H�ddlmZddlmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZddlmZddlmZmZmZmZGd�d	e�ZGd
�de�Z Gd�d
ee�Z!dede!fd�Z"dedede!fd�Z#edde#e��Z$ddde!ee	gee
eeeeeeggddd�	Z%y)�)�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�B�eZdZedee�d��gZdeefd�Z	y)�USNFixPlanOptions�usnsz'A list of USNs (i.e. USN-6119-1) titles��docc��||_y�N)r)�selfrs  �M/usr/lib/python3/dist-packages/uaclient/api/u/pro/security/fix/usn/plan/v1.py�__init__zUSNFixPlanOptions.__init__(s	����	�N)
�__name__�
__module__�__qualname__rrr�fieldsr�strr$�r%r#rrs/��
���o�&�9�	
��F��T�#�Y�r%rc�Z�eZdZeded��edee�d��gZdede	efd�Z
y)�USNFixPlanResult�expected_statusz&The expected status of fixing the USNsrrz&A list of ``FixPlanUSNResult`` objectsc� �||_||_yr!�r.r)r"r.rs   r#r$zUSNFixPlanResult.__init__:s��.�����	r%N)r&r'r(rrrrr)r*rr$r+r%r#r-r-,sL��
���8�	
�
	���&�'�8�	
�
�F��3��d�;K�6L�r%r-c�0�eZdZeded��gZdefd�Zy)�USNSFixPlanResult�	usns_dataz&A list of ``USNFixPlanResult`` objectsrc��||_yr!�r3)r"r3s  r#r$zUSNSFixPlanResult.__init__Hs	��"��r%N)r&r'r(rr-r)r$r+r%r#r2r2?s'��
���8�	
��F�#�%5�#r%r2�options�returnc�*�t|t��Sr!)�_planr)r6s r#�planr:Ls����(�*�%�%r%�cfgc���g}d}|jD]@}t||��}t||jj�}|j|��Bt
t||����S)z~
    This endpoint shows the necessary steps required to fix USNs in the system
    without executing any of those steps.
    �)r;r0r5)rrr�target_usn_planr.�appendr2r-)r6r;rr.�usn�usn_plans      r#r9r9Pss��
�D��O��|�|������-��5��X�5�5�E�E�
��	
���H����"�+��
��r%�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.v1rrr	r
rrr
rrrrrrrr�uaclient.configr�uaclient.data_typesrrrrrr-r2r:r9�endpoint�_docr+r%r#�<module>r[s����(�2�O�
�����"%�M�M�
�
�
��z��&
#�
�N�
#�&�#�&�(9�&��$��8��8I��,��	��!�	�����&�(�.�9�������$�!�	��o�$�/<�r%

Zerion Mini Shell 1.0