2015-07-11 02:09:22 +02:00
|
|
|
"""
|
2016-12-14 18:29:04 +01:00
|
|
|
.. module: lemur.plugins.bases.source
|
2015-07-11 02:09:22 +02:00
|
|
|
:platform: Unix
|
2018-05-29 19:18:16 +02:00
|
|
|
:copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
|
2015-07-11 02:09:22 +02:00
|
|
|
:license: Apache, see LICENSE for more details.
|
|
|
|
|
|
|
|
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
|
|
|
"""
|
|
|
|
from lemur.plugins.base import Plugin
|
|
|
|
|
2015-07-21 22:06:13 +02:00
|
|
|
|
2015-07-11 02:09:22 +02:00
|
|
|
class SourcePlugin(Plugin):
|
2019-05-16 16:57:02 +02:00
|
|
|
type = "source"
|
2015-07-11 02:09:22 +02:00
|
|
|
|
2015-07-31 07:54:59 +02:00
|
|
|
default_options = [
|
|
|
|
{
|
2019-05-16 16:57:02 +02:00
|
|
|
"name": "pollRate",
|
|
|
|
"type": "int",
|
|
|
|
"required": False,
|
|
|
|
"helpMessage": "Rate in seconds to poll source for new information.",
|
|
|
|
"default": "60",
|
2015-07-31 07:54:59 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2016-12-14 22:42:29 +01:00
|
|
|
def get_certificates(self, options, **kwargs):
|
|
|
|
raise NotImplementedError
|
2015-07-11 02:09:22 +02:00
|
|
|
|
2016-12-14 22:42:29 +01:00
|
|
|
def get_endpoints(self, options, **kwargs):
|
|
|
|
raise NotImplementedError
|
2016-07-28 22:08:24 +02:00
|
|
|
|
2016-12-27 19:31:33 +01:00
|
|
|
def clean(self, certificate, options, **kwargs):
|
2016-12-14 22:42:29 +01:00
|
|
|
raise NotImplementedError
|
2016-07-28 22:08:24 +02:00
|
|
|
|
2015-07-31 07:54:59 +02:00
|
|
|
@property
|
|
|
|
def options(self):
|
2021-02-19 02:23:02 +01:00
|
|
|
"""
|
|
|
|
Gets/sets options for the plugin.
|
|
|
|
|
|
|
|
:return:
|
|
|
|
"""
|
2017-10-06 02:27:45 +02:00
|
|
|
return self.default_options + self.additional_options
|