#NEWLINE# def load_configs( version ) : #NEWLINE# #INDENT# if OBJ_CONFIGS . get ( version ) : #NEWLINE# #INDENT# return OBJ_CONFIGS [ version ] #NEWLINE# #UNINDENT# cfg_path = ( 'plugins/ambari/resources/configs-%s.json' % version ) #NEWLINE# vanilla_cfg = jsonutils . loads ( files . get_file_text ( cfg_path ) ) #NEWLINE# CONFIGS [ version ] = vanilla_cfg #NEWLINE# sahara_cfg = [ hdp_repo_cfg , hdp_utils_repo_cfg , use_base_repos_cfg ] #NEWLINE# for ( service , confs ) in vanilla_cfg . items ( ) : #NEWLINE# #INDENT# for ( k , v ) in confs . items ( ) : #NEWLINE# #INDENT# sahara_cfg . append ( provisioning . Config ( k , _get_service_name ( service ) , _get_param_scope ( k ) , default_value = v ) ) #NEWLINE# #UNINDENT# #UNINDENT# sahara_cfg . extend ( _get_ha_params ( ) ) #NEWLINE# OBJ_CONFIGS [ version ] = sahara_cfg #NEWLINE# return sahara_cfg