Exemplo n.º 1
0
def register_connections():
    """
    register nornir connection plugins
    """
    from nornir.core.connections import Connections
    from netnir.core.connection.netmiko import Netmiko
    from netnir.core.connection.netconf import Netconf

    Connections.deregister_all()
    Connections.register(name="netconf", plugin=Netconf)
    Connections.register(name="netmiko", plugin=Netmiko)
Exemplo n.º 2
0
 def setup_class(cls):
     Connections.deregister_all()
     Connections.register("dummy", DummyConnectionPlugin)
     Connections.register("dummy2", DummyConnectionPlugin)
     Connections.register("dummy_no_overrides", DummyConnectionPlugin)
Exemplo n.º 3
0
 def teardown_method(self, method):
     Connections.deregister_all()
     register_default_connection_plugins()
Exemplo n.º 4
0
 def test_deregister_all(self):
     Connections.deregister_all()
     assert Connections.available == {}
Exemplo n.º 5
0
 def setup_method(self, method):
     Connections.deregister_all()
     Connections.register("dummy", DummyConnectionPlugin)
     Connections.register("another_dummy", AnotherDummyConnectionPlugin)