Example #1
0
def run_generic_updaters(config: configuration.NamespaceConfig,
                         lineage: storage.RenewableCert,
                         plugins: plugin_disco.PluginsRegistry) -> None:
    """Run 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
    """
    if config.dry_run:
        logger.debug("Skipping updaters in dry-run mode.")
        return
    try:
        installer = plug_sel.get_unprepared_installer(config, plugins)
    except errors.Error as e:
        logger.error("Could not choose appropriate plugin for updaters: %s", e)
        return
    if installer:
        _run_updaters(lineage, installer, config)
        _run_enhancement_updaters(lineage, installer, config)
Example #2
0
def run_generic_updaters(config, lineage, plugins):
    """Run updaters that the plugin supports

    :param config: Configuration object
    :type config: interfaces.IConfig

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

    :param plugins: List of plugins
    :type plugins: `list` of `str`

    :returns: `None`
    :rtype: None
    """
    if config.dry_run:
        logger.debug("Skipping updaters in dry-run mode.")
        return
    try:
        installer = plug_sel.get_unprepared_installer(config, plugins)
    except errors.Error as e:
        logger.warning("Could not choose appropriate plugin for updaters: %s",
                       e)
        return
    if installer:
        _run_updaters(lineage, installer, config)
        _run_enhancement_updaters(lineage, installer, config)
Example #3
0
 def _call(self):
     from certbot._internal.plugins.selection import get_unprepared_installer
     return get_unprepared_installer(self.config, self.plugins)