'Return bandwidth usage counters for each interface on each
running VM.'

def get_all_bw_counters(self, instances):

    imap = {inst['name']: inst['uuid'] for inst in instances}
    bwcounters = []
    all_counters = self._vmops.get_all_bw_counters()
    for (instance_name, counters) in all_counters.items():
        if (instance_name in imap):
            for vif_counter in counters.values():
                vif_counter['uuid'] = imap[instance_name]
                bwcounters.append(vif_counter)
    return bwcounters
