#NEWLINE# def _check_context( self , context , require_tenant = False ) : #NEWLINE# #INDENT# user_overriden = is_user_overriden ( self . conf ) #NEWLINE# if ( user_overriden and ( not require_tenant ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( context is None ) : #NEWLINE# #INDENT# reason = _ ( 'Cinder storage requires a context.' ) #NEWLINE# raise exceptions . BadStoreConfiguration ( store_name = 'cinder' , reason = reason ) #NEWLINE# #UNINDENT# if ( ( not user_overriden ) and ( context . service_catalog is None ) ) : #NEWLINE# #INDENT# reason = _ ( 'Cinder storage requires a service catalog.' ) #NEWLINE# raise exceptions . BadStoreConfiguration ( store_name = 'cinder' , reason = reason )