return a
return b
+def update_key(key_to_update, a: dict, b: dict):
+ """
+ Update key (`key_to_update`) of dict `a` on all levels
+ to the values of same key in `b` dict.
+ """
+ for key, value in b.items():
+ if key == key_to_update:
+ a[key] = value
+ elif isinstance(value, dict):
+ if key in a and isinstance(a[key], dict):
+ update_key(key_to_update, a[key], value)
def ssh_keyscan(hostnames, _raise=True):
"""
from teuthology.exceptions import (
BranchMismatchError, BranchNotFoundError, CommitNotFoundError,
)
-from teuthology.misc import deep_merge, get_results_url
+from teuthology.misc import deep_merge, get_results_url, update_key
from teuthology.orchestra.opsys import OS
from teuthology.repo_utils import build_git_url
log.info('Skipping due to excluded_os_type: %s facets %s',
exclude_os_type, description)
continue
+ update_key('sha1', parsed_yaml, self.base_config)
+ update_key('suite_sha1', parsed_yaml, self.base_config)
arg = copy.deepcopy(self.base_args)
arg.extend([