- Timestamp:
- 10/09/13 02:56:17 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
etherws/trunk/etherws.py
r251 r252 392 392 return not self._sock 393 393 394 @property 395 def address(self): 396 if self.closed: 397 raise ValueError('I/O operation on closed netdev') 398 return '' 399 400 @property 401 def netmask(self): 402 if self.closed: 403 raise ValueError('I/O operation on closed netdev') 404 return '' 405 406 @property 407 def mtu(self): 408 if self.closed: 409 raise ValueError('I/O operation on closed netdev') 410 return '' 411 412 @address.setter 413 def address(self, address): 414 if self.closed: 415 raise ValueError('I/O operation on closed netdev') 416 raise NotImplementedError('unsupported') 417 418 @netmask.setter 419 def netmask(self, netmask): 420 if self.closed: 421 raise ValueError('I/O operation on closed netdev') 422 raise NotImplementedError('unsupported') 423 424 @mtu.setter 425 def mtu(self, mtu): 426 if self.closed: 427 raise ValueError('I/O operation on closed netdev') 428 raise NotImplementedError('unsupported') 429 394 430 def open(self): 395 431 if not self.closed: … … 726 762 netmask = params.get('netmask') 727 763 mtu = params.get('mtu') 728 if not isinstance(port.interface, TapHandler):764 if isinstance(port.interface, EtherWebSocketClient): 729 765 raise ValueError('Port %d has unsupported interface: %s' % 730 766 (portnum, port.interface.IFTYPE)) … … 739 775 def handle_listInterface(self, params): 740 776 return {'entries': [self._ifstat(p) for p in self._switch.portlist 741 if isinstance(p.interface, TapHandler)]} 777 if not isinstance(p.interface, 778 EtherWebSocketClient)]} 742 779 743 780 def _optparse_netdev(self, opt):
Note: See TracChangeset
for help on using the changeset viewer.