Changeset 208 for etherws/trunk
- Timestamp:
- 08/04/12 01:27:24 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
etherws/trunk/etherws.py
r207 r208 149 149 lambda: (entry.port.number, vid, mac.encode('hex'))) 150 150 151 def foreach(self):151 def each(self): 152 152 for vid in sorted(self._table.iterkeys()): 153 153 for mac in sorted(self._table[vid].iterkeys()): … … 170 170 171 171 def delete(self, port): 172 for vid, mac, entry in self. foreach():172 for vid, mac, entry in self.each(): 173 173 if entry.port.number == port.number: 174 174 self._del_entry(vid, mac) … … 576 576 def handle_listFdb(self, params): 577 577 list_ = [] 578 for vid, mac, entry in self._switch.fdb. foreach():578 for vid, mac, entry in self._switch.fdb.each(): 579 579 list_.append({ 580 580 'vid': vid,
Note: See TracChangeset
for help on using the changeset viewer.