Since we have known the connection URI types which libvirt would need.
How about defining a dict to store them:
{'xen': xen:///,
 'qemu': qemu:///system,
 'test': test:///,
 ....}

Then we can be easy to get a legality uri.
Even when we need to test an illegal uri, just adding a pair of key-value will be ok.

Because I am afraid of wrong origin_uri will break this function.