def get_client(host, port=None, timeout=None, use_ssl=False, username=None, password=None, tenant=None, auth_url=None, auth_strategy=None, auth_token=None, region=None, is_silent_upload=False, insecure=False):
 if (auth_url or os.getenv('OS_AUTH_URL')):
  force_strategy = 'keystone'
 else:
  force_strategy = None
 creds = {'username': (username or os.getenv('OS_AUTH_USER', os.getenv('OS_USERNAME'))), 'password': (password or os.getenv('OS_AUTH_KEY', os.getenv('OS_PASSWORD'))), 'tenant': (tenant or os.getenv('OS_AUTH_TENANT', os.getenv('OS_TENANT_NAME'))), 'auth_url': (auth_url or os.getenv('OS_AUTH_URL')), 'strategy': (force_strategy or auth_strategy or os.getenv('OS_AUTH_STRATEGY', 'noauth')), 'region': (region or os.getenv('OS_REGION_NAME'))}
 if ((creds['strategy'] == 'keystone') and (not creds['auth_url'])):
  msg = '--os_auth_url option or OS_AUTH_URL environment variable required when keystone authentication strategy is enabled\n'
  raise exception.ClientConfigurationError(msg)
 return CacheClient(host=host, port=port, timeout=timeout, use_ssl=use_ssl, auth_tok=(auth_token or os.getenv('OS_TOKEN')), creds=creds, insecure=insecure)

def get_client ( host , port = None , timeout = None , use_ssl = False , username = None , password = None , tenant = None , auth_url = None , auth_strategy = None , auth_token = None , region = None , is_silent_upload = False , insecure = False ) : if ( auth_url or os . getenv ( 'OS_AUTH_URL' ) ) : force_strategy = 'keystone' else : force_strategy = None creds = { 'username' : ( username or os . getenv ( 'OS_AUTH_USER' , os . getenv ( 'OS_USERNAME' ) ) ) , 'password' : ( password or os . getenv ( 'OS_AUTH_KEY' , os . getenv ( 'OS_PASSWORD' ) ) ) , 'tenant' : ( tenant or os . getenv ( 'OS_AUTH_TENANT' , os . getenv ( 'OS_TENANT_NAME' ) ) ) , 'auth_url' : ( auth_url or os . getenv ( 'OS_AUTH_URL' ) ) , 'strategy' : ( force_strategy or auth_strategy or os . getenv ( 'OS_AUTH_STRATEGY' , 'noauth' ) ) , 'region' : ( region or os . getenv ( 'OS_REGION_NAME' ) ) } if ( ( creds [ 'strategy' ] == 'keystone' ) and ( not creds [ 'auth_url' ] ) ) : msg = '--os_auth_url option or OS_AUTH_URL environment variable required when keystone authentication strategy is enabled\n' raise exception . ClientConfigurationError ( msg ) return CacheClient ( host = host , port = port , timeout = timeout , use_ssl = use_ssl , auth_tok = ( auth_token or os . getenv ( 'OS_TOKEN' ) ) , creds = creds , insecure = insecure )
builds an http client authenticated with the service account credentials .