- call(self._render_config('route_flush', dict(dev=device.name)), shell=True)
- call(self._render_config('ip_flush', dict(dev=device.name)), shell=True)
+ log.debug(u'IpHandler._write_config: processing device %s', device)
+ try:
+ log.debug(u'IpHandler._write_config: flushing routes...')
+ call(self._render_config('route_flush', dict(dev=device.name)),
+ shell=True)
+ except ExecutionError, e:
+ log.debug(u'IpHandler._write_config: error flushing -> %r', e)
+ try:
+ log.debug(u'IpHandler._write_config: flushing addrs...')
+ call(self._render_config('ip_flush', dict(dev=device.name)),
+ shell=True)
+ except ExecutionError, e:
+ log.debug(u'IpHandler._write_config: error flushing -> %r', e)