%PDF- %PDF-
Direktori : /lib/python3/dist-packages/uaclient/entitlements/__pycache__/ |
Current File : //lib/python3/dist-packages/uaclient/entitlements/__pycache__/__init__.cpython-312.pyc |
� �Hcfk# � �� � d dl Z d dlZd dlmZ d dlmZmZmZmZm Z m Z d dlmZ d dl mZ d dlmZ d dlmZ d dlmZ d d lmZ d d lmZ d dlmZ d dlmZmZ d d lmZ d dl m!Z! d dl"m#Z# d dl$m%Z% d dl&m'Z'm(Z( d dl)m*Z* d dl+m,Z, eeeeeejZ ej\ ej^ ee!e#e'e(g Z0d/dede1de1fd�Z2 d0dede3de3dee1 fd�Z4dedee1 dee1 fd�Z5e jl G d� de jn � � Z8dedee1 fd �Z9dedee1 fd!�Z:ded"e e d#e8d$ee1e3f d%ee1 f d&�Z;ded#e8dee1 fd'�Z<d(ee1 defd)�Z=dede3dej| fd*�Z?d+� Z@dede3fd,�ZAd/ded-e1fd.�ZBy)1� N)�defaultdict)�Dict�List� NamedTuple�Optional�Tuple�Type)� exceptions)�UAConfig)�fips)�AnboxEntitlement)� UAEntitlement)�CommonCriteriaEntitlement)�CISEntitlement)�ApplicabilityStatus)�ESMAppsEntitlement�ESMInfraEntitlement)�LandscapeEntitlement)�LivepatchEntitlement)�RealtimeKernelEntitlement)�RepoEntitlement)�ROSEntitlement�ROSUpdatesEntitlement)�EntitlementNotFoundError)�is_config_value_true�cfg�name�variantc � � t D ]J } || �� }||j v s�|s|c S ||j v r|j | c S t |�� � t |�� �)a Returns a UAEntitlement class based on the provided name. The return type is Optional[Type[UAEntitlement]]. It cannot be explicit because of the Python version on Xenial (3.5.2). :param cfg: UAConfig instance :param name: The name of the entitlement to return :param not_found_okay: If True and no entitlement with the given name is found, then returns None. :raise EntitlementNotFoundError: If not_found_okay is False and no entitlement with the given name is found, then raises this error. �r )�entitlement_name)�ENTITLEMENT_CLASSES�valid_names�variantsr )r r r �entitlement�ents �@/usr/lib/python3/dist-packages/uaclient/entitlements/__init__.py�entitlement_factoryr( ( sg � � +� I���c�"���3�?�?�"��"�"��C�L�L�(��|�|�G�,�,�.��H�H�I� #�D� 9�9� � allow_beta� all_names�returnc �V � t | j d� }||z }t }|s|D �cg c] }|j s|�� }}|r6g }|D ]$ }|j || �� j � �& t |� S t |D �cg c] } || �� j �� c}� S c c}w c c}w )a Return a list of valid (non-beta) services. :param cfg: UAConfig instance :param allow_beta: if we should allow beta services to be marked as valid :param all_names: if we should return all the names for a service instead of just the presentation_name zfeatures.allow_betar )r r r"