If you were looking to create testing for networking, i.e., simulating network dropouts for a client-server connections, is this something that you can use namespaces for, or would virtual machines be more fit for purpose?
You could possibly just use network namespaces.
While I am too familiar with it to suggest effort required, looking at the Openstack project and how they provision tenant networks may help.
It is just python with a three tier model with a message bus. But how they interface with libvirt may help if the namespace abstraction support for the 'ip' command is too clunky for you.
It doesn't give you independent stacks and openvswitch will let you build almost anything you would need.