I think maybe this URI parsing code may be more generally useful outside this test module (i.e. other code could use it too).  Would you consider adding it into <code>libvirt_vm</code> or some other more-central place?