HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/certbot/_internal/__pycache__/updater.cpython-310.pyc
o

6��a��@srdZddlZddlmZddlmZddlmZddlm	Z	e�
e�Zdd�Z
d	d
�Zdd�Zd
d�Zdd�ZdS)zUpdaters run at renewal�N)�errors)�
interfaces)�	selection)�enhancementsc
Cs~|jr
t�d�dSzt�||�}Wntjy,}z
t�d|�WYd}~dSd}~ww|r=t|||�t	|||�dSdS)asRun updaters that the plugin supports

    :param config: Configuration object
    :type config: certbot.configuration.NamespaceConfig

    :param lineage: Certificate lineage object
    :type lineage: storage.RenewableCert

    :param plugins: List of plugins
    :type plugins: certbot._internal.plugins.disco.PluginsRegistry

    :returns: `None`
    :rtype: None
    z"Skipping updaters in dry-run mode.Nz4Could not choose appropriate plugin for updaters: %s)
�dry_run�logger�debug�plug_sel�get_unprepared_installerr�Error�error�
_run_updaters�_run_enhancement_updaters)�config�lineage�plugins�	installer�e�r�;/usr/lib/python3/dist-packages/certbot/_internal/updater.py�run_generic_updaterss
���rcCs@|jr
t�d�dS|jst|tj�r|�|�t|||�dS)a�Helper function to run deployer interface method if supported by the used
    installer plugin.

    :param config: Configuration object
    :type config: certbot.configuration.NamespaceConfig

    :param lineage: Certificate lineage object
    :type lineage: storage.RenewableCert

    :param installer: Installer object
    :type installer: interfaces.Installer

    :returns: `None`
    :rtype: None
    z*Skipping renewal deployer in dry-run mode.N)	rrr�disable_renew_updates�
isinstancer�
RenewDeployer�renew_deploy�_run_enhancement_deployers)rrrrrr�run_renewal_deployer&s

�
rcCs(|jst|tj�r|�|�dSdSdS)a:Helper function to run the updater interface methods if supported by the
    used installer plugin.

    :param lineage: Certificate lineage object
    :type lineage: storage.RenewableCert

    :param installer: Installer object
    :type installer: interfaces.Installer

    :returns: `None`
    :rtype: None
    N)rrr�GenericUpdater�generic_updates)rrrrrrr
?s

�r
cC�B|jrdStjD]}t||d�r|drt||d�|�qdS)a�Iterates through known enhancement interfaces. If the installer implements
    an enhancement interface and the enhance interface has an updater method, the
    updater method gets run.

    :param lineage: Certificate lineage object
    :type lineage: storage.RenewableCert

    :param installer: Installer object
    :type installer: interfaces.Installer

    :param config: Configuration object
    :type config: certbot.configuration.NamespaceConfig
    N�class�updater_function�rr�_INDEXr�getattr�rrr�enhrrrrP�
��rcCr)a�Iterates through known enhancement interfaces. If the installer implements
    an enhancement interface and the enhance interface has an deployer method, the
    deployer method gets run.

    :param lineage: Certificate lineage object
    :type lineage: storage.RenewableCert

    :param installer: Installer object
    :type installer: interfaces.Installer

    :param config: Configuration object
    :type config: certbot.configuration.NamespaceConfig
    Nr �deployer_functionr"r%rrrrfr'r)�__doc__�logging�certbotrr�certbot._internal.pluginsrr	�certbot.pluginsr�	getLogger�__name__rrrr
rrrrrr�<module>s