How to use the nornir.core.connections.Connections.register function in nornir

To help you get started, we’ve selected a few nornir 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 nornir-automation / nornir / tests / core / test_connections.py View on Github external
def setup_class(cls):
        Connections.deregister_all()
        Connections.register("dummy", DummyConnectionPlugin)
        Connections.register("dummy2", DummyConnectionPlugin)
        Connections.register("dummy_no_overrides", DummyConnectionPlugin)
github nornir-automation / nornir / tests / core / test_connections.py View on Github external
def test_register_already_registered_new(self):
        with pytest.raises(ConnectionPluginAlreadyRegistered):
            Connections.register("dummy", AnotherDummyConnectionPlugin)
github nornir-automation / nornir / tests / core / test_connections.py View on Github external
def setup_method(self, method):
        Connections.deregister_all()
        Connections.register("dummy", DummyConnectionPlugin)
        Connections.register("another_dummy", AnotherDummyConnectionPlugin)
github nornir-automation / nornir / tests / core / test_connections.py View on Github external
def test_register_already_registered_same(self):
        Connections.register("dummy", DummyConnectionPlugin)
        assert Connections.available["dummy"] == DummyConnectionPlugin
github nornir-automation / nornir / nornir / init_nornir.py View on Github external
def register_default_connection_plugins() -> None:
    Connections.register("napalm", Napalm)
    Connections.register("netconf", Netconf)
    Connections.register("netmiko", Netmiko)
    Connections.register("paramiko", Paramiko)