def _get_http_proxy_url():
 http_proxy_url = ''
 host = __salt__['config.option']('proxy_host')
 port = __salt__['config.option']('proxy_port')
 username = __salt__['config.option']('proxy_username')
 password = __salt__['config.option']('proxy_password')
 if (host and port):
  if (username and password):
   http_proxy_url = 'http://{0}:{1}@{2}:{3}'.format(username, password, host, port)
  else:
   http_proxy_url = 'http://{0}:{1}'.format(host, port)
 return http_proxy_url

def _get_http_proxy_url ( ) : http_proxy_url = '' host = __salt__ [ 'config.option' ] ( 'proxy_host' ) port = __salt__ [ 'config.option' ] ( 'proxy_port' ) username = __salt__ [ 'config.option' ] ( 'proxy_username' ) password = __salt__ [ 'config.option' ] ( 'proxy_password' ) if ( host and port ) : if ( username and password ) : http_proxy_url = 'http://{0}:{1}@{2}:{3}' . format ( username , password , host , port ) else : http_proxy_url = 'http://{0}:{1}' . format ( host , port ) return http_proxy_url
returns the http_proxy_url if proxy_username .