HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/uaclient/api/u/pro/packages/summary/__pycache__/v1.cpython-310.pyc
o

��Jh��@s�ddlmZddlmZddlmZddlmZmZm	Z	ddl
mZGdd�de�ZGdd	�d	ee�Z
d
e
fdd�Zd
ed
e
fdd�Zeddedd�Zddde
gddd�ZdS)�)�APIEndpoint)�AdditionalInfo)�UAConfig)�
DataObject�Field�IntDataValue)� get_installed_packages_by_originc@s�eZdZededd�ededd�ededd�eded	d�ed
edd�eded
d�ededd�ededd�ededd�g	Zdedededed
ededededefdd�ZdS)�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

Cs:||_||_||_||_||_||_||_||_|	|_dS�N�	r
r
rrrrrrr)
�selfr
r
rrrrrrr�r�H/usr/lib/python3/dist-packages/uaclient/api/u/pro/packages/summary/v1.py�__init__9s
zPackageSummary.__init__N)�__name__�
__module__�__qualname__rr�fields�intrrrrrr	s�����������0�������	�
�r	c@s$eZdZededd�gZdd�ZdS)�PackageSummaryResult�summaryz!Summary of all installed packagesrcCs
||_dSr�r!)rr!rrrrY�
zPackageSummaryResult.__init__N)rrrrr	rrrrrrr Ps��r �returncCs
tt��Sr)�_summaryrrrrrr!]r#r!�cfgcCsrt�}tt|d�t|d�t|d�t|d�t|d�t|d�t|d�t|d�t|d	�d
�	}t|d�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")rr	�lenr )r&�packagesr!rrrr%as








�
r%�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_statusrr	r r!r%�endpoint�_docrrrr�<module>s.H
�
�