Skip to content

Commit

Permalink
We no longer need our custom engines
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed Feb 26, 2020
1 parent d71e56a commit 47fbae1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 216 deletions.
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ disable=R,
un-indexed-curly-braces-error,
un-indexed-curly-braces-warning,
import-outside-toplevel,
wrong-import-position
wrong-import-position,
missing-whitespace-after-comma

# Disabled:
# R* [refactoring suggestions & reports]
Expand Down
11 changes: 0 additions & 11 deletions saltfactories/factories/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ def get_running_username():
def get_salt_log_handlers_path():
return os.path.join(CODE_ROOT_DIR, "utils", "salt", "log_handlers")

@staticmethod
def get_salt_engines_path():
return os.path.join(CODE_ROOT_DIR, "utils", "salt", "engines")

@staticmethod
def get_salt_returner_paths():
return os.path.join(CODE_ROOT_DIR, "utils", "salt", "returner")
Expand All @@ -111,13 +107,6 @@ def final_proxy_minion_config_tweaks(self, config):
self.final_common_config_tweaks(config, "minion")

def final_common_config_tweaks(self, config, role):
config.setdefault("engines", [])
if "pytest" not in config["engines"]:
config["engines"].append("pytest")

if "engines_dirs" not in config:
config["engines_dirs"] = []
config["engines_dirs"].insert(0, SaltFactoriesManager.get_salt_engines_path())
config["user"] = SaltFactoriesManager.get_running_username()
if "log_forwarding_consumer" not in config:
# Still using old logging, let's add our custom log handler
Expand Down
8 changes: 1 addition & 7 deletions saltfactories/factories/master.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,7 @@ def default_config(
"transport": "zeromq",
"order_masters": order_masters,
"max_open_files": 10240,
"pytest-master": {
"log": {"prefix": "salt-master({})".format(master_id)},
"engine": {
"port": ports.get_unused_localhost_port(),
"stop_sending_events_file": stop_sending_events_file,
},
},
"pytest-master": {"log": {"prefix": "salt-master({})".format(master_id)},},
}
# Merge in the initial default options with the internal _default_options
dictupdate.update(default_options, _default_options, merge_lists=True)
Expand Down
8 changes: 1 addition & 7 deletions saltfactories/factories/minion.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,7 @@ def default_config(
"log_fmt_logfile": "[%(asctime)s,%(msecs)03.0f][%(name)-5s:%(lineno)-4d][%(levelname)-8s] %(message)s",
"hash_type": "sha256",
"transport": "zeromq",
"pytest-minion": {
"log": {"prefix": "salt-minion({})".format(minion_id)},
"engine": {
"port": ports.get_unused_localhost_port(),
"stop_sending_events_file": stop_sending_events_file,
},
},
"pytest-minion": {"log": {"prefix": "salt-minion({})".format(minion_id)},},
}
# Merge in the initial default options with the internal _default_options
dictupdate.update(default_options, _default_options, merge_lists=True)
Expand Down
8 changes: 1 addition & 7 deletions saltfactories/factories/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,7 @@ def default_config(
"transport": "zeromq",
"add_proxymodule_to_opts": False,
"proxy": {"proxytype": "dummy"},
"pytest-minion": {
"log": {"prefix": "salt-proxy({})".format(proxy_minion_id)},
"engine": {
"port": ports.get_unused_localhost_port(),
"stop_sending_events_file": stop_sending_events_file,
},
},
"pytest-minion": {"log": {"prefix": "salt-proxy({})".format(proxy_minion_id)},},
}
# Merge in the initial default options with the internal _default_options
dictupdate.update(default_options, _default_options, merge_lists=True)
Expand Down
24 changes: 3 additions & 21 deletions saltfactories/factories/syndic.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,7 @@ def default_config(
"syndic_log_file": "logs/syndic.log",
"syndic_log_level_logfile": "debug",
"syndic_dir": "cache/syndics",
"pytest-syndic": {
"log": {"prefix": "salt-syndic({})".format(syndic_id)},
"engine": {
"port": ports.get_unused_localhost_port(),
"stop_sending_events_file": stop_sending_events_file,
},
},
"pytest-syndic": {"log": {"prefix": "salt-syndic({})".format(syndic_id)},},
}
# Merge in the initial default options with the internal _default_options
dictupdate.update(default_options.get("syndic"), _default_options, merge_lists=True)
Expand Down Expand Up @@ -147,13 +141,7 @@ def default_minion_config(
"log_fmt_logfile": "[%(asctime)s,%(msecs)03.0f][%(name)-5s:%(lineno)-4d][%(levelname)-8s] %(message)s",
"hash_type": "sha256",
"transport": "zeromq",
"pytest-minion": {
"log": {"prefix": "salt-minion({})".format(minion_id)},
"engine": {
"port": ports.get_unused_localhost_port(),
"stop_sending_events_file": stop_sending_events_file,
},
},
"pytest-minion": {"log": {"prefix": "salt-minion({})".format(minion_id)},},
}
# Merge in the initial default options with the internal _default_options
dictupdate.update(default_options, _default_options, merge_lists=True)
Expand Down Expand Up @@ -223,13 +211,7 @@ def default_master_config(
"transport": "zeromq",
"order_masters": False,
"max_open_files": 10240,
"pytest-master": {
"log": {"prefix": "salt-master({})".format(master_id)},
"engine": {
"port": ports.get_unused_localhost_port(),
"stop_sending_events_file": stop_sending_events_file,
},
},
"pytest-master": {"log": {"prefix": "salt-master({})".format(master_id)},},
}
# Merge in the initial default options with the internal _default_options
dictupdate.update(default_options, _default_options, merge_lists=True)
Expand Down
162 changes: 0 additions & 162 deletions saltfactories/utils/salt/engines/pytest_engine.py

This file was deleted.

0 comments on commit 47fbae1

Please sign in to comment.