Allows using different ways to retrieve hosts IP address
This commit is contained in:
parent
97cf1a8f5c
commit
84558826fb
15 changed files with 861 additions and 710 deletions
10
transip_client/utils.py
Normal file
10
transip_client/utils.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from importlib import import_module
|
||||
from typing import Type
|
||||
|
||||
from transip_client.adapters import Adapter
|
||||
|
||||
|
||||
def import_string(path: str) -> Type[Adapter]:
|
||||
module_path, class_name = path.rsplit(".", 1)
|
||||
module = import_module(module_path)
|
||||
return getattr(module, class_name)
|
||||
Loading…
Add table
Add a link
Reference in a new issue