commit b66c235f0aa73d186b0242b20674d2cefe7ddae6 Author: Jan Tluka jtluka@redhat.com Date: Wed Jul 25 20:28:50 2012 +0200
Do proper cleanup when requested.
NetConfig/NetConfig.py | 6 ++++++ NetTest/NetTestSlave.py | 1 + 2 files changed, 7 insertions(+), 0 deletions(-) --- diff --git a/NetConfig/NetConfig.py b/NetConfig/NetConfig.py index 3561205..57903cd 100644 --- a/NetConfig/NetConfig.py +++ b/NetConfig/NetConfig.py @@ -150,3 +150,9 @@ class NetConfig: device = NetConfigDevice(netdev, self._config) device.slave_del(slave_dev_id) return True + + def cleanup(self): + tmp = copy.deepcopy(self._config) + for dev_id in tmp: + del self._config[dev_id] + self._devnames.rescan_netdevs() diff --git a/NetTest/NetTestSlave.py b/NetTest/NetTestSlave.py index 1746452..12440f7 100644 --- a/NetTest/NetTestSlave.py +++ b/NetTest/NetTestSlave.py @@ -111,6 +111,7 @@ class NetTestSlaveXMLRPC:
def machine_cleanup(self): NetConfigDeviceAllCleanup() + self._netconfig.cleanup() return True
class MySimpleXMLRPCServer(Server):
lnst-developers@lists.fedorahosted.org