def get_plugins_with_user_data(user_params, user_data): """Get the reactor config map and derive an osbs instance from it""" from osbs.api import OSBS from osbs.conf import Configuration reactor_config_override = user_data.get('reactor_config_override') if reactor_config_override: read_yaml(json.dumps(reactor_config_override), 'schemas/config.json') osbs_conf = Configuration(build_json_dir=user_data.get('build_json_dir')) osbs = OSBS(osbs_conf, osbs_conf) return osbs.render_plugins_configuration(user_params)
def get_plugins_with_user_data(self, user_params, user_data): # get the reactor config map and derive an osbs instance from it from osbs.api import OSBS from osbs.conf import Configuration reactor_config_override = user_data.get('reactor_config_override') if reactor_config_override: read_yaml(json.dumps(reactor_config_override), 'schemas/config.json') osbs_conf = Configuration(build_json_dir=user_data.get('build_json_dir')) osbs = OSBS(osbs_conf, osbs_conf) return osbs.render_plugins_configuration(user_params)
def get_plugins_with_user_params(self, build_json, user_params): # get the reactor config map and derive an osbs instance from it from osbs.api import OSBS from osbs.conf import Configuration # make sure the input json is valid read_yaml(user_params, 'schemas/user_params.json') user_data = json.loads(user_params) reactor_config_override = user_data.get('reactor_config_override') if reactor_config_override: read_yaml(json.dumps(reactor_config_override), 'schemas/config.json') osbs_conf = Configuration(build_json_dir=user_data.get('build_json_dir')) osbs = OSBS(osbs_conf, osbs_conf) return osbs.render_plugins_configuration(user_params)