Skip to content

Commit

Permalink
Merge branch 'main' into prs/adding-pickle-output-to-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
NotTheEvilOne committed Sep 17, 2024
2 parents 074ac03 + 77b7263 commit 013c9fb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ LABEL org.opencontainers.image.source="https://github.com/SovereignCloudStack/ro

ARG ROOKIFY_VERSION=0.0.0.dev1
ENV ROOKIFY_VERSION=$ROOKIFY_VERSION
ENV PYTHONPATH="${PYTHONPATH}:/app/rookify/src"

WORKDIR /app/rookify

Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
bcrypt==4.1.2
cachetools==5.3.2
certifi==2024.2.2
certifi==2024.7.4
cffi==1.16.0
charset-normalizer==3.3.2
cryptography==42.0.4
cryptography==43.0.1
dill==0.3.8
decorator==5.1.1
Deprecated==1.2.14
fabric==3.2.2
google-auth==2.28.1
idna==3.6
idna==3.7
invoke==2.2.0
Jinja2==3.1.3
Jinja2==3.1.4
kubernetes==29.0.0
MarkupSafe==2.1.5
oauthlib==3.2.2
Expand All @@ -22,13 +22,13 @@ pycparser==2.21
PyNaCl==1.5.0
python-dateutil==2.8.2
PyYAML==6.0.1
requests==2.31.0
requests==2.32.2
requests-oauthlib==1.3.1
rsa==4.9
six==1.16.0
structlog==24.1.0
transitions==0.9.0
urllib3==2.2.1
urllib3==2.2.2
yamale==5.1.0
websocket-client==1.7.0
wrapt==1.16.0
Expand Down
17 changes: 16 additions & 1 deletion src/rookify/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@ def _load_module(

global _modules_loaded

module = importlib.import_module("rookify.modules.{0}".format(module_name))
if "." in module_name:
absolute_module_name = module_name
else:
absolute_module_name = "rookify.modules.{0}".format(module_name)

try:
module = importlib.import_module(absolute_module_name)
except ModuleNotFoundError as e:
raise ModuleLoadException(module_name, str(e))

additional_module_names = []

if not hasattr(module, "ModuleHandler") or not callable(
Expand All @@ -61,6 +70,7 @@ def _load_module(

if module not in _modules_loaded:
_modules_loaded.append(module)

module.ModuleHandler.register_states(machine, config)


Expand All @@ -79,6 +89,11 @@ def load_modules(machine: Machine, config: Dict[str, Any]) -> None:
migration_modules.remove(entry.name)
_load_module(machine, config, entry.name)

for migration_module in migration_modules.copy():
if "." in migration_module:
migration_modules.remove(migration_module)
_load_module(machine, config, migration_module)

if len(migration_modules) > 0 or len(config["migration_modules"]) < 1:
logger = get_logger()

Expand Down

0 comments on commit 013c9fb

Please sign in to comment.