[et-mgmt-tools] [PATCH] virt-manager reorg common commands, add error reporting

Cole Robinson crobinso at redhat.com
Wed Nov 21 18:28:20 UTC 2007


The attached patch is the result of trying to add error reporting
to some common tasks in virt-manager: pause, unpause, shutdown, and run,
as well as save and destroy.

Since the first 4 commands can be called from 3 different locations
(console, details, manager), I consolidated their code into engine.py, as
had been done in the past with save and destroy. All these commands now
show an error dialog if an exception is thrown. I also fixed an associated
issue where the pause buttons in console and details can be put out of
sync if pause/unpause failed.

I tested all these by manually throwing exceptions in the libvirt
bindings. It's kind of a lot of churn, but I think it's more maintainable
this way.

- Cole

>  console.py |   71 +++++++++------------------------
>  details.py |  129 +++++++++++++++++++------------------------------------------
>  engine.py  |  114 +++++++++++++++++++++++++++++++++++++++++++++++++++--
>  manager.py |   32 +++++++++++----
>  4 files changed, 196 insertions(+), 150 deletions(-)

-- 
Cole Robinson
crobinso at redhat.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: virt-manager-comm-error-catch-patch
URL: <http://listman.redhat.com/archives/et-mgmt-tools/attachments/20071121/ad846027/attachment.ksh>


More information about the et-mgmt-tools mailing list