#NEWLINE# def get_roles_list( self , node_processes ) : #NEWLINE# #INDENT# current = set ( node_processes ) #NEWLINE# extra_roles = { #NEWLINE# #INDENT# 'YARN_GATEWAY' : [ 'YARN_NODEMANAGER' ] , #NEWLINE# 'HDFS_GATEWAY' : [ 'HDFS_NAMENODE' , 'HDFS_DATANODE' , 'HDFS_SECONDARYNAMENODE' ] , #NEWLINE# #UNINDENT# } #NEWLINE# for extra_role in six . iterkeys ( extra_roles ) : #NEWLINE# #INDENT# valid_processes = extra_roles [ extra_role ] #NEWLINE# for valid in valid_processes : #NEWLINE# #INDENT# if ( valid in current ) : #NEWLINE# #INDENT# current . add ( node_processes ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return list ( current )