def _get_credentials():
 ret = {'user': False, 'passwd': False}
 for item in ret:
  for struct in [__opts__, __grains__, __pillar__]:
   for config_key in __valid_configs[item]:
    value = salt.utils.traverse_dict_and_list(struct, config_key, None)
    if value:
     ret[item] = value
     break
 return (ret['user'], ret['passwd'])

def _get_credentials ( ) : ret = { 'user' : False , 'passwd' : False } for item in ret : for struct in [ __opts__ , __grains__ , __pillar__ ] : for config_key in __valid_configs [ item ] : value = salt . utils . traverse_dict_and_list ( struct , config_key , None ) if value : ret [ item ] = value break return ( ret [ 'user' ] , ret [ 'passwd' ] )
get the username and password from opts .