U
    M[‚^Ý  ã                   @   st   d dl mZ d dlmZ zd dlmZ W n ek
r<   Y nX G dd„ dejƒZG dd„ deƒZ	G dd	„ d	eƒZ
d
S )é    )Úrepo)Úutil)ÚOptionalc                   @   s   e Zd ZdZdS )ÚESMBaseEntitlementzhttps://ubuntu.com/esmN)Ú__name__Ú
__module__Ú__qualname__Zhelp_doc_url© r	   r	   ú;/usr/lib/python3/dist-packages/uaclient/entitlements/esm.pyr      s   r   c                   @   s    e Zd ZdZdZdZdZdZdS )ÚESMAppsEntitlementZUbuntuESMAppszesm-appszESM Appsz&UA Apps: Extended Security Maintenancezubuntu-advantage-esm-apps.gpgN)r   r   r   ÚoriginÚnameÚtitleÚdescriptionÚrepo_key_filer	   r	   r	   r
   r      s
   r   c                   @   sD   e Zd ZdZdZdZdZdZeddœdd	„ƒZ	ee
dœd
d„ƒZdS )ÚESMInfraEntitlementz	esm-infraZ	UbuntuESMz	ESM Infraz'UA Infra: Extended Security Maintenancez%ubuntu-advantage-esm-infra-trusty.gpgzOptional[str])Úreturnc                 C   s   dt  ¡ d krdS dS )z0Only trusty esm-infra should peform repo pinningÚtrustyÚseriesÚneverN)r   Úget_platform_info©Úselfr	   r	   r
   Úrepo_pin_priority   s    z%ESMInfraEntitlement.repo_pin_priorityc                 C   s   t dt ¡ d kƒS )z?Only trusty esm-infra should remove apt auth files upon disabler   r   )Úboolr   r   r   r	   r	   r
   Údisable_apt_auth_only%   s    z)ESMInfraEntitlement.disable_apt_auth_onlyN)r   r   r   r   r   r   r   r   Úpropertyr   r   r   r	   r	   r	   r
   r      s   r   N)Zuaclient.entitlementsr   Zuaclientr   Útypingr   ÚImportErrorZRepoEntitlementr   r   r   r	   r	   r	   r
   Ú<module>   s   