#NEWLINE# def ToYaml( self ) : #NEWLINE# #INDENT# 'Convert the backend specification into a list of YAML lines.' #NEWLINE# statements = [ ( '- name: %s' % self . name ) ] #NEWLINE# for ( entry , field ) in [ ( 'instances' , self . instances ) , ( 'class' , self . instance_class ) , ( 'max_concurrent_requests' , self . max_concurrent_requests ) ] : #NEWLINE# #INDENT# if ( field is not None ) : #NEWLINE# #INDENT# statements += [ ( '  %s: %s' % ( entry , str ( field ) ) ) ] #NEWLINE# #UNINDENT# #UNINDENT# if self . options : #NEWLINE# #INDENT# options_str = ', ' . join ( sorted ( list ( self . options ) ) ) #NEWLINE# statements += [ ( '  options: %s' % self ) ] #NEWLINE# #UNINDENT# return statements