#NEWLINE# def _validate_requirements( self ) : #NEWLINE# #INDENT# type_requires = self . type_definition . get_all_requirements ( ) #NEWLINE# allowed_reqs = [ 'template' ] #NEWLINE# if type_requires : #NEWLINE# #INDENT# for treq in type_requires : #NEWLINE# #INDENT# for ( key , value ) in treq . items ( ) : #NEWLINE# #INDENT# allowed_reqs . append ( key ) #NEWLINE# if isinstance ( value , dict ) : #NEWLINE# #INDENT# for key in value : #NEWLINE# #INDENT# allowed_reqs . append ( key ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# requires = self . type_definition . get_value ( self . REQUIREMENTS , self . entity_tpl ) #NEWLINE# if requires : #NEWLINE# #INDENT# if ( not isinstance ( requires , list ) ) : #NEWLINE# #INDENT# ExceptionCollector . appendException ( TypeMismatchError ( what = ( '"requirements" of template "%s"' % self . name ) , type = 'list' ) ) #NEWLINE# #UNINDENT# for req in requires : #NEWLINE# #INDENT# for ( r1 , value ) in req . items ( ) : #NEWLINE# #INDENT# if isinstance ( value , dict ) : #NEWLINE# #INDENT# self . _validate_requirements_keys ( value ) #NEWLINE# self . _validate_requirements_properties ( requires ) #NEWLINE# allowed_reqs . append ( r1 ) #NEWLINE# #UNINDENT# #UNINDENT# self . _common_validate_field ( req , allowed_reqs , 'requirements' )