#NEWLINE# def get_all_bw_counters( self , instances ) : #NEWLINE# #INDENT# 'Return bandwidth usage counters for each interface on each\n           running VM.\n        ' #NEWLINE# imap = { inst [ 'name' ] : inst [ 'uuid' ] for inst in instances } #NEWLINE# bwcounters = [ ] #NEWLINE# all_counters = self . _vmops . get_all_bw_counters ( ) #NEWLINE# for ( instance_name , counters ) in six . iteritems ( all_counters ) : #NEWLINE# #INDENT# if ( instance_name in imap ) : #NEWLINE# #INDENT# for vif_counter in counters . values ( ) : #NEWLINE# #INDENT# vif_counter [ 'uuid' ] = inst [ instance_name ] #NEWLINE# bwcounters . append ( vif_counter ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return bwcounters