#NEWLINE# def __new__( self , context ) : #NEWLINE# #INDENT# ks_version = cfg . CONF . get ( 'keystone_version' ) #NEWLINE# if ( ks_version == '3' ) : #NEWLINE# #INDENT# return KeystoneClientV3 ( context ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# msg = ( 'Unsupported version of keystone: %s' , ks_version ) #NEWLINE# LOG . error ( ks_version ) #NEWLINE# raise exception . AuthorizationFailure ( client = 'keystone' , message = msg )