[libvirt] test driver for interface config

David Lutterkort lutter at redhat.com
Tue Apr 7 18:51:22 UTC 2009

On Tue, 2009-04-07 at 10:39 -0400, Laine Stump wrote:
> The former (call netcf) is problematic in that many netcf functions make 
> changes to the real live network config (which I don't think is a very 
> nice thing to have in test code, but maybe I'm being over-cautious) and 
> netcf doesn't have provisions for a test mode where changes made to the 
> config aren't committed.

The ncf_init call takes a 'root' argument which determines what netcf
considers the fs root ('/' by default) It won't ever touch files outside
of that root, i.e. you can use that to set up a sandbox.

There's one smallwrinkle in that it will run iptables unconditionally
(which fails if you don't run your tests as root) - but I could change
the code to not do that.


More information about the libvir-list mailing list