def set_builddefaults_facts(facts):
 if ('builddefaults' in facts):
  builddefaults = facts['builddefaults']
  common = facts['common']
  if (('http_proxy' not in builddefaults) and ('http_proxy' in common)):
   builddefaults['http_proxy'] = common['http_proxy']
  if (('https_proxy' not in builddefaults) and ('https_proxy' in common)):
   builddefaults['https_proxy'] = common['https_proxy']
  if (('no_proxy' not in builddefaults) and ('no_proxy' in common)):
   builddefaults['no_proxy'] = common['no_proxy']
  if (('git_http_proxy' not in builddefaults) and ('http_proxy' in builddefaults)):
   builddefaults['git_http_proxy'] = builddefaults['http_proxy']
  if (('git_https_proxy' not in builddefaults) and ('https_proxy' in builddefaults)):
   builddefaults['git_https_proxy'] = builddefaults['https_proxy']
  if (('git_no_proxy' not in builddefaults) and ('no_proxy' in builddefaults)):
   builddefaults['git_no_proxy'] = builddefaults['no_proxy']
  if ('config' in builddefaults):
   if ('admission_plugin_config' not in facts['master']):
    facts['master']['admission_plugin_config'] = dict()
   facts['master']['admission_plugin_config'].update(builddefaults['config'])
   delete_empty_keys(facts['master']['admission_plugin_config']['BuildDefaults']['configuration']['env'])
 return facts

def set_builddefaults_facts ( facts ) : if ( 'builddefaults' in facts ) : builddefaults = facts [ 'builddefaults' ] common = facts [ 'common' ] if ( ( 'http_proxy' not in builddefaults ) and ( 'http_proxy' in common ) ) : builddefaults [ 'http_proxy' ] = common [ 'http_proxy' ] if ( ( 'https_proxy' not in builddefaults ) and ( 'https_proxy' in common ) ) : builddefaults [ 'https_proxy' ] = common [ 'https_proxy' ] if ( ( 'no_proxy' not in builddefaults ) and ( 'no_proxy' in common ) ) : builddefaults [ 'no_proxy' ] = common [ 'no_proxy' ] if ( ( 'git_http_proxy' not in builddefaults ) and ( 'http_proxy' in builddefaults ) ) : builddefaults [ 'git_http_proxy' ] = builddefaults [ 'http_proxy' ] if ( ( 'git_https_proxy' not in builddefaults ) and ( 'https_proxy' in builddefaults ) ) : builddefaults [ 'git_https_proxy' ] = builddefaults [ 'https_proxy' ] if ( ( 'git_no_proxy' not in builddefaults ) and ( 'no_proxy' in builddefaults ) ) : builddefaults [ 'git_no_proxy' ] = builddefaults [ 'no_proxy' ] if ( 'config' in builddefaults ) : if ( 'admission_plugin_config' not in facts [ 'master' ] ) : facts [ 'master' ] [ 'admission_plugin_config' ] = dict ( ) facts [ 'master' ] [ 'admission_plugin_config' ] . update ( builddefaults [ 'config' ] ) delete_empty_keys ( facts [ 'master' ] [ 'admission_plugin_config' ] [ 'BuildDefaults' ] [ 'configuration' ] [ 'env' ] ) return facts
set build defaults including setting proxy values from http_proxy .