Thu, Aug 27, 2015 at 12:00:48PM CEST, jtluka(a)redhat.com wrote:
Thu, Aug 27, 2015 at 11:20:25AM CEST, jtluka(a)redhat.com wrote:
>We do not want to bring loopback device down in root namespace as
>this might have an unpredictable impact on further testing.
>In case of non-root namespace leaving loopback device up is not
>a problem since the namespace will get destroyed after recipe is
>Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
> lnst/Slave/NetConfigDevice.py | 8 ++++++++
> 1 file changed, 8 insertions(+)
>diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
>index 0fbc3f0..1422850 100644
>@@ -97,6 +97,14 @@ class NetConfigDeviceLoopback(NetConfigDeviceGeneric):
> def configure(self):
> config = self._dev_config
>+ def down(self):
>+ # We do not want to bring loopback device down in root namespace as
>+ # this might have an unpredictable impact on further testing.
>+ # In case of non-root namespace leaving loopback device up is not
>+ # a problem since the namespace will get destroyed after recipe is
>+ # finished
> class NetConfigDeviceBond(NetConfigDeviceGeneric):
> _modulename = "bonding"
> _moduleparams = "max_bonds=0"
>LNST-developers mailing list
Scratch this patch. I've realized that someone might still want to bring
device down during test execution. My idea here is to don't bring down
the device down upon deconfiguration. And this has to be done
Upon further examination, the recently added methods
link_up()/link_down() and their TaskAPI counterparts
set_link_up()/set_link_down() are available for such manipulation during
test execution. So the patch is valid and can be applied.