#NEWLINE# def set_set_statements( self , name , action , seqno , statements ) : #NEWLINE# #INDENT# 'Configures the set statements within the routemap clause.\n        The final configuration of set statements will reflect the list\n        of statements passed into the statements attribute. This implies\n        set statements found in the routemap that are not specified in the\n        statements attribute will be removed.\n\n        Args:\n            name (string): The full name of the routemap.\n            action (string): The action to take for this routemap clause.\n            seqno (integer): The sequence number for the routemap clause.\n            statements (list): A list of the set-related statements. Note that\n                               the statements should omit the leading set.\n\n        Returns:\n            True if the operation succeeds otherwise False\n        ' #NEWLINE# try : #NEWLINE# #INDENT# current_statements = self . get ( name ) [ action ] [ seqno ] [ 'set' ] #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# current_statements = [ ] #NEWLINE# #UNINDENT# commands = list ( ) #NEWLINE# for entry in set ( current_statements ) . difference ( statements ) : #NEWLINE# #INDENT# commands . append ( ( 'route-map %s %s %s' % ( name , action , seqno ) ) ) #NEWLINE# commands . append ( ( 'no set %s' % entry ) ) #NEWLINE# #UNINDENT# for entry in set ( statements ) . difference ( current_statements ) : #NEWLINE# #INDENT# commands . append ( ( 'route-map %s %s %s' % ( name , action , seqno ) ) ) #NEWLINE# commands . append ( ( 'set %s' % entry ) ) #NEWLINE# #UNINDENT# return ( self . configure ( commands ) if commands else True )