From e0d2fb0de1027fdab1a4474818189314cf317732 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Thu, 5 Oct 2017 17:27:45 -0700 Subject: [PATCH] Ensuring that we have default options for source plugins. (#961) --- lemur/plugins/bases/destination.py | 2 +- lemur/plugins/bases/notification.py | 2 +- lemur/plugins/bases/source.py | 2 +- lemur/plugins/lemur_digicert/plugin.py | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lemur/plugins/bases/destination.py b/lemur/plugins/bases/destination.py index 486a656d..53c63e86 100644 --- a/lemur/plugins/bases/destination.py +++ b/lemur/plugins/bases/destination.py @@ -29,7 +29,7 @@ class ExportDestinationPlugin(DestinationPlugin): @property def options(self): - return list(self.default_options) + self.additional_options + return self.default_options + self.additional_options def export(self, body, private_key, cert_chain, options): export_plugin = self.get_option('exportPlugin', options) diff --git a/lemur/plugins/bases/notification.py b/lemur/plugins/bases/notification.py index 08e90e6f..054bdff5 100644 --- a/lemur/plugins/bases/notification.py +++ b/lemur/plugins/bases/notification.py @@ -46,7 +46,7 @@ class ExpirationNotificationPlugin(NotificationPlugin): @property def options(self): - return list(self.default_options) + self.additional_options + return self.default_options + self.additional_options def send(self, notification_type, message, targets, options, **kwargs): raise NotImplementedError diff --git a/lemur/plugins/bases/source.py b/lemur/plugins/bases/source.py index e2283fe9..f7fe655b 100644 --- a/lemur/plugins/bases/source.py +++ b/lemur/plugins/bases/source.py @@ -33,4 +33,4 @@ class SourcePlugin(Plugin): @property def options(self): - return list(self.default_options) + self.additional_options + return self.default_options + self.additional_options diff --git a/lemur/plugins/lemur_digicert/plugin.py b/lemur/plugins/lemur_digicert/plugin.py index 07ff9f4d..fe9f2198 100644 --- a/lemur/plugins/lemur_digicert/plugin.py +++ b/lemur/plugins/lemur_digicert/plugin.py @@ -349,6 +349,8 @@ class DigiCertCISSourcePlugin(SourcePlugin): author = 'Kevin Glisson' author_url = 'https://github.com/netflix/lemur.git' + additional_options = [] + def __init__(self, *args, **kwargs): """Initialize source with appropriate details.""" required_vars = [