#NEWLINE# def potential_utilization( self , flavors ) : #NEWLINE# #INDENT# '\n            This method returns percentage of ram, core usage in case\n            we gonna migrate provided flavors to the node\n        ' #NEWLINE# ( free_ram , free_core ) = flavors . free_resources #NEWLINE# for ( fl_obj , count ) in flavors . items ( ) : #NEWLINE# #INDENT# free_ram -= ( fl_obj . ram * count ) #NEWLINE# free_core -= ( fl_obj . core * count ) #NEWLINE# #UNINDENT# return ( ( ( ( self . ram - free_ram ) * 100.0 ) / self . ram ) , ( ( ( self . core - free_core ) * 100.0 ) / self . core ) )