How to use the vaping.plugin.get_plugin_class function in vaping

To help you get started, we’ve selected a few vaping examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 20c / vaping / tests / test_graphite.py View on Github external
def test_init():
    data_timeseries_empty = dict(
        filename="file",
        field="field",
        )

    vaping.plugin.get_plugin_class("graphite")(data_timeseries_empty, None)
github 20c / vaping / tests / test_plugin_import.py View on Github external
def test_include():
    vaping.plugin.get_plugin_class('zeromq')
#    inst = cls()
github 20c / vaping / tests / test_plugin.py View on Github external
def test_plugin_default_config():
    cls = plugin.get_plugin_class("probe0")
    probe = cls({}, None)
    assert probe.pluginmgr_config == cls.default_config
github 20c / vaping / tests / test_fping_mtr.py View on Github external
def test_parse_traceroute(data_mtr_traceroute):
    mtr = vaping.plugin.get_plugin_class("fping_mtr")({}, None)
    print(data_mtr_traceroute.input)
    print(data_mtr_traceroute.expected)
    print("=======")
    hosts = mtr.parse_traceroute(data_mtr_traceroute.input.splitlines())
    print("HOSTS: {}".format(hosts))
    # XXX need to refactor to properly test if host and hosts not in host
    assert_parsed(data_mtr_traceroute, hosts)
github 20c / vaping / tests / test_plugin.py View on Github external
def test_plugin_registry():
    assert Plugin0 == plugin.get_plugin_class('plugin0')
    with pytest.raises(ValueError):
        plugin.get_plugin_class('nonexistant')

    with pytest.raises(ValueError):
        @plugin.register('plugin0')
        class p0(plugins.PluginBase):
            pass