I'm curious why this function is needed.  It seems it would be more beneficial to use existing ``virsh detach-disk`` and ``virsh attach-disk`` functions.  This way, test automatically exercises those code-paths instead of code you've written.  Though if there is some reason I don't see, to do it with custom code, that reason would be good to put into the docstring or a comment :)