def _get_kwargs(profile=None, **connection_args):
 if profile:
  prefix = (profile + ':keystone.')
 else:
  prefix = 'keystone.'
 def get(key, default=None):
  '\n        look in connection_args first, then default to config file\n        '
  return connection_args.get(('connection_' + key), __salt__['config.get']((prefix + key), default))
 user = get('user', 'admin')
 password = get('password', 'ADMIN')
 tenant = get('tenant', 'admin')
 tenant_id = get('tenant_id')
 auth_url = get('auth_url', 'http://127.0.0.1:35357/v2.0/')
 insecure = get('insecure', False)
 token = get('token')
 endpoint = get('endpoint', 'http://127.0.0.1:35357/v2.0')
 if token:
  kwargs = {'token': token, 'endpoint': endpoint}
 else:
  kwargs = {'username': user, 'password': password, 'tenant_name': tenant, 'tenant_id': tenant_id, 'auth_url': auth_url}
  if insecure:
   kwargs['insecure'] = True
 return kwargs

def _get_kwargs ( profile = None , ** connection_args ) : if profile : prefix = ( profile + ':keystone.' ) else : prefix = 'keystone.' def get ( key , default = None ) : return connection_args . get ( ( 'connection_' + key ) , __salt__ [ 'config.get' ] ( ( prefix + key ) , default ) ) user = get ( 'user' , 'admin' ) password = get ( 'password' , 'ADMIN' ) tenant = get ( 'tenant' , 'admin' ) tenant_id = get ( 'tenant_id' ) auth_url = get ( 'auth_url' , 'http://127.0.0.1:35357/v2.0/' ) insecure = get ( 'insecure' , False ) token = get ( 'token' ) endpoint = get ( 'endpoint' , 'http://127.0.0.1:35357/v2.0' ) if token : kwargs = { 'token' : token , 'endpoint' : endpoint } else : kwargs = { 'username' : user , 'password' : password , 'tenant_name' : tenant , 'tenant_id' : tenant_id , 'auth_url' : auth_url } if insecure : kwargs [ 'insecure' ] = True return kwargs
get connection args .