#NEWLINE# def node_distribution( self , cloud ) : #NEWLINE# #INDENT# '\n        This method returns dict of nodes that contains this flavor\n        with number of vms with flavor as value\n        ' #NEWLINE# result = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for vm_obj in self . vms : #NEWLINE# #INDENT# if ( ( not vm_obj . node . is_full ) and ( vm_obj . node . cloud == cloud ) ) : #NEWLINE# #INDENT# if ( vm_obj . node not in result ) : #NEWLINE# #INDENT# result [ vm_obj . node ] = 0 #NEWLINE# #UNINDENT# result [ vm_obj . node ] += 1 #NEWLINE# #UNINDENT# #UNINDENT# return result