%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/uaclient/api/u/pro/packages/summary/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/uaclient/api/u/pro/packages/summary/__pycache__/v1.cpython-312.pyc

�

�(�f����ddlmZddlmZddlmZddlmZmZm	Z	ddl
mZGd�de�ZGd�d	ee�Z
d
e
fd�Zded
e
fd
�Zedded��Zddde
gddd�Zy)�)�APIEndpoint)�AdditionalInfo)�UAConfig)�
DataObject�Field�IntDataValue)� get_installed_packages_by_originc���eZdZeded��eded��eded��eded	��ed
ed��eded
��eded��eded��eded��g	Zdedededed
ededededefd�Zy)�PackageSummary�num_installed_packagesz!Total count of installed packages��doc�num_esm_apps_packagesz-Count of packages installed from ``esm-apps``�num_esm_infra_packagesz.Count of packages installed from ``esm-infra``�num_main_packagesz)Count of packages installed from ``main``�num_multiverse_packagesz/Count of packages installed from ``multiverse``�num_restricted_packagesz/Count of packages installed from ``restricted``�num_third_party_packagesz4Count of packages installed from third party sources�num_universe_packagesz-Count of packages installed from ``universe``�num_unknown_packagesz0Count of packages installed from unknown sourcesc
��||_||_||_||_||_||_||_||_|	|_y�N�	rrrrrrrrr)
�selfrrrrrrrrrs
          �H/usr/lib/python3/dist-packages/uaclient/api/u/pro/packages/summary/v1.py�__init__zPackageSummary.__init__9sL��'=��#�%:��"�&<��#�!2���'>��$�'>��$�(@��%�%:��"�$8��!�N)�__name__�
__module__�__qualname__rr�fields�intr�rrrrs��
�$��3�	
�
	�#��?�	
�
	�$��@�	
�
	���;�	
�
	�%��A�	
�
	�%��A�	
�
	�&��F�	
�
	�#��?�	
�
	�"��B�	
�S.�F�`9� #�9� #�9�!$�	9�
�9�"%�
9�"%�9�#&�9� #�9�"�9rrc�*�eZdZeded��gZd�Zy)�PackageSummaryResult�summaryz!Summary of all installed packagesr
c��||_yr�r&)rr&s  rrzPackageSummaryResult.__init__Ys	����rN)rrr rrr!rr#rrr%r%Ps��
���4�	
��F�rr%�returnc�(�tt��Sr)�_summaryrr#rrr&r&]s���H�J��r�cfgc�.�t�}tt|d�t|d�t|d�t|d�t|d�t|d�t|d�t|d�t|d	��
�	}t|��S)zg
    This endpoint shows a summary of installed packages in the system,
    categorised by origin.
    �allzesm-appsz	esm-infra�main�
multiverse�
restrictedzthird-party�universe�unknownrr()r	r�lenr%)r,�packagesr&s   rr+r+as���
0�1�H��"�8�E�?�3�!�(�:�"6�7�"�8�K�#8�9��h�v�.�/� #�H�\�$:� ;� #�H�\�$:� ;�!$�X�m�%<�!=�!�(�:�"6�7� ��)�!4�5�
�G� ��0�0r�v1N)�version�name�fn�options_clsz27.12FzP
from uaclient.api.u.pro.packages.summary.v1 import summary

result = summary()
z!pro api u.pro.packages.summary.v1ad
{
    "summary":{
        "num_installed_packages": 1,
        "num_esm_apps_packages": 2,
        "num_esm_infra_packages": 3,
        "num_main_packages": 4,
        "num_multiverse_packages": 5,
        "num_restricted_packages": 6,
        "num_third_party_packages": 7,
        "num_universe_packages": 8,
        "num_unknown_packages": 9,
    },
}
)�
introduced_in�requires_network�example_python�result_class�
exceptions�example_cli�example_json)�uaclient.api.apir�uaclient.api.data_typesr�uaclient.configr�uaclient.data_typesrrr�uaclient.security_statusr	rr%r&r+�endpoint�_docr#rr�<module>rIs���(�2�$�?�?�E�E9�Z�E9�P
�:�~�
� �%� �1�(�1�3�1�(��	���	�����
)��6���r

Zerion Mini Shell 1.0