saltstack/salt — pull request #1850 by borgstrom (2012-08-19 18:25:38+00:00)
Title: Improvements to the virt module

This adds two main improvements to the virt module.

1. We no longer blindly return success for calls such as undefine, create, shutdown, etc. Instead now we ensure that the actual libvirt call succeeded by ensure the return is 0. Libvirt's convention for success it to return 0 and all changes were verified against http://libvirt.org/html/libvirt-libvirt.html to ensure that 0 is indeed a successful return.

2. I've added three different reboot functions.

There were also two functions that were catching all Exceptions to determine success or failure. I've removed the try/catch statements as I think catching all Exceptions is too broad. If there was a special reason why they were wrapped in try/catch then I can amend to have a more narrow scope for the catch.