14 lines
322 B
Python
14 lines
322 B
Python
from .routeros_rest import RouterOSRestConnector
|
|
from .routeros_ssh import RouterOSSshConnector
|
|
|
|
REGISTRY = {
|
|
"rest": RouterOSRestConnector(),
|
|
"ssh": RouterOSSshConnector(),
|
|
}
|
|
|
|
def get_connector(name: str):
|
|
c = REGISTRY.get(name)
|
|
if not c:
|
|
raise KeyError(f"Unknown connector: {name}")
|
|
return c
|