certbot/certbot-compatibility-test/certbot_compatibility_test/interfaces.py

53 lines
1.6 KiB
Python
Raw Normal View History

"""Certbot compatibility test interfaces"""
2015-07-14 21:04:43 -04:00
import zope.interface
import certbot.interfaces
2015-07-14 21:04:43 -04:00
2015-07-22 21:31:26 -04:00
# pylint: disable=no-self-argument,no-method-argument
2015-07-14 21:04:43 -04:00
2015-07-16 02:00:18 -04:00
class IPluginProxy(zope.interface.Interface):
"""Wraps a Certbot plugin"""
2015-08-03 14:38:22 -04:00
http_port = zope.interface.Attribute(
"The port to connect to on localhost for HTTP traffic")
https_port = zope.interface.Attribute(
"The port to connect to on localhost for HTTPS traffic")
2015-07-22 21:31:26 -04:00
def add_parser_arguments(cls, parser):
2015-07-14 21:04:43 -04:00
"""Adds command line arguments needed by the parser"""
2015-07-22 21:31:26 -04:00
def __init__(args):
2015-07-14 21:04:43 -04:00
"""Initializes the plugin with the given command line args"""
def cleanup_from_tests(): # type: ignore
2015-07-14 21:04:43 -04:00
"""Performs any necessary cleanup from running plugin tests.
2015-09-05 22:35:34 -04:00
This is guaranteed to be called before the program exits.
2015-07-14 21:04:43 -04:00
"""
def has_more_configs(): # type: ignore
2015-07-14 21:04:43 -04:00
"""Returns True if there are more configs to test"""
def load_config(): # type: ignore
2015-07-17 19:21:17 -04:00
"""Loads the next config and returns its name"""
2015-07-14 21:04:43 -04:00
def get_testable_domain_names(): # type: ignore
2015-07-17 19:21:17 -04:00
"""Returns the domain names that can be used in testing"""
2015-07-14 21:04:43 -04:00
class IAuthenticatorProxy(IPluginProxy, certbot.interfaces.IAuthenticator):
"""Wraps a Certbot authenticator"""
2015-07-14 21:04:43 -04:00
class IInstallerProxy(IPluginProxy, certbot.interfaces.IInstaller):
"""Wraps a Certbot installer"""
2015-07-14 21:04:43 -04:00
def get_all_names_answer(): # type: ignore
2015-07-17 19:21:17 -04:00
"""Returns all names that should be found by the installer"""
2015-07-14 21:04:43 -04:00
2015-07-16 02:00:18 -04:00
class IConfiguratorProxy(IAuthenticatorProxy, IInstallerProxy):
"""Wraps a Certbot configurator"""