Commit Graph
208 Commits
Author SHA1 Message Date
Cole Robinson 273b0a924d connection: Tidy some imports 2011-04-28 17:11:04 -04:00
Cole Robinson efde9cb863 Register all gobject signals through vmmGObject baseclass
Allows us to remove gobject imports in various places which will help when
merging code with TUI.
2011-04-28 16:06:57 -04:00
Cole Robinson f9f4210ec2 connection: Tweak lookup failure logging 2011-04-20 17:00:32 -04:00
Cole Robinson de8c901d7b Move idle wrappers to baseclass
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2011-04-18 11:13:33 -04:00
Cole Robinson 8b576f4b2a connection: Remove unneeded vm-started signal
We are already notified of vm state change by it's own state-changed signal
2011-04-15 14:13:05 -04:00
Cole Robinson 845e6aa57e connection: Better organize stats methods 2011-04-14 12:51:52 -04:00
Cole Robinson a3fd17575c conn: Remove debugging cruft that was disabling domain update! 2011-04-13 10:21:00 -04:00
Cole Robinson f2781ee62a Properly cleanup all dialogs
On app close, all dialogs are properly cleaned up so there are no
dangling references and python can garbage collect.

While this isn't that important when the app shuts down, it ensures that
lifecycle changes while the app is running (vm start/stop/remove, conn
start/stop/remove) have the infrastructure to properly release resources.
2011-04-13 10:20:47 -04:00
Cole Robinson 0c72663fa7 connection: Fix cleaning up removed iface + nodedevs 2011-04-12 12:05:36 -04:00
Cole Robinson b7730a96ab connection: Cleanup libvirt objects when they disappear
Call the new cleanup() function to ensure python actually reaps the objects
2011-04-11 16:19:47 -04:00
Cole Robinson d74066da21 baseclass: Simplify cleaning up gobject signals
Just add a custom connect/disconnect to keep track of the signals for us.
2011-04-11 16:16:07 -04:00
Cole Robinson 586f7b3274 domain: Fix ref count issues preventing proper cleanup
Make sure we unregister all callbacks so that the domain object
is properly reaped by python. Mediadev has somewhat similar issues,
so handle that.
2011-04-11 12:01:28 -04:00
Cole Robinson 743dddf1b9 connection: Refactor _update_vms to be more like other polling 2011-04-11 11:52:02 -04:00
Cole Robinson 86bf304248 domain: Use cached state for is_active
Rather than pull the latest ID. This way, we only find out about domain
state changes after a tick (or when the user manually performs one in
the GUI).
2011-04-10 17:51:36 -04:00
Cole Robinson 75c3d4dc1a util: Add a few duplicated functions 2011-04-10 17:08:23 -04:00
Cole Robinson 39fe2ed1f7 connection: Clean up domain polling
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2011-04-10 00:04:26 -04:00
Cole Robinson 5570851998 connection: Don't fetch domain XML for memory stats
Make sure we are returning mem values from info(), not from XML
2011-04-10 00:04:26 -04:00
Cole Robinson 3b0557012f Rename current_mem* -> stats_mem* for clarity 2011-04-09 23:03:01 -04:00
Cole Robinson b7a13af566 domain: Cache ID and name lookups
Also try to minimize use of get_id call
2011-04-09 22:53:10 -04:00
Cole Robinson aa15d2d4a0 Fix some pylint 2011-04-09 21:58:02 -04:00
Cole Robinson dc054e05a9 connection: Factor out common polling logic
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2011-04-09 21:55:41 -04:00
Cole Robinson 6ba13a641d Add class wrapper for nodedev objects 2011-04-09 20:15:39 -04:00
Cole Robinson 2d5fc88cda connection: One missed s/get_devices/get_nodedevs/g 2011-04-09 19:31:55 -04:00
Cole Robinson 86f4bdaf1d connection: get_devices -> get_nodedevs for consistency 2011-04-07 18:16:28 -04:00
Cole Robinson 16e43da0ae connection: Cache 'storage supported' check
Otherwise we were hitting libvirt more than necc.
2011-04-07 18:10:22 -04:00
Cole Robinson 83145f28c3 domain: We can't always release handle if undefining, fix another way 2011-03-24 13:00:36 -04:00
Cole Robinson 148229375a details: Allow renaming offline VMs
Since libvirt doesn't have an easy way to do this, we need to actually
undefine the VM and redefine it with the new name. Hopefully this doesn't
go wrong :)

Add listeners in console.py and manager.py to change the VM name accordingly
in the UI.
2011-03-23 17:18:22 -04:00
Cole Robinson fe703839b9 connection: Clear all cached objects when connection closes
For example, we didn't clear the iface list. So if a libvirtd was
restarted, the active connection is closed, but the old ifaces
which reference the closed connection hang around. Trying to launch the
addhw dialog for example doesn't work after reopening a new connection.
2011-03-23 10:07:23 -04:00
Cole Robinson 16ab9b9edc manager: If 2 URI names collide, make the names more verbose 2010-12-11 23:51:20 -05:00
Cole Robinson 43a4220206 Use ~/VirtualMachines as default pool for qemu:///session 2010-12-10 18:03:51 -05:00
Cole Robinson 677f73fca7 Run pep8 with check-pylint, fix the fallout 2010-12-10 11:47:07 -05:00
Cole Robinson 5c45358adc Remove 'config' passing from remaining classes/functions 2010-12-09 14:06:00 -05:00
Cole Robinson e78e2da3f5 Use the a base class for all libvirt object classes 2010-12-09 12:37:48 -05:00
Cole Robinson 0fd57daca1 pylint: Check for unused variables, fix fallout 2010-12-09 11:22:35 -05:00
Cole Robinson 8b371b6e22 Domain: Pass pre-parsed capabilities to virtinst objects
Saves us from continually refetching caps and parsing. Also, only refresh
connection caps when we launch the create wizard: changing caps shouldn't
be common, and are really only important when creating guests.
2010-12-08 12:17:14 -05:00
Cole Robinson fe14b5e200 Use URI hacking from virtinst to facilitate testing 2010-12-07 14:26:51 -05:00
Cole Robinson 8b8974970a host: Show running interface IP address 2010-12-02 15:19:17 -05:00
Cole Robinson 779dcdd824 Don't use old style __gobject_init__() 2010-11-30 14:40:49 -05:00
Cole Robinson f7d428caac Fix connection duping for old libvirt versions 2010-11-29 18:00:35 -05:00
Cole Robinson 83ad083fb0 virt-manager: Fix CLI window launching options
Drop the thread event hack, use connection callbacks to accomplish
what we need more simply
2010-11-24 14:01:51 -05:00
Matthias Bolte c716633286 Make enter-key trigger the okay button in the auth dialog
If the dialog contains multiple entries then only hitting
the enter-key in the last entry triggers the okay button.
From all other entries the enter-key lets the focus jump
to the next entry.
2010-08-28 19:44:30 +02:00
Cole Robinson 12c1b07819 connection: Clean up connection startup error message
- Drop SSH askpass reference: latest libvirt should return SSH connection
  errors to us, which will make clear that ssh-askpass isn't available.
- Print error message up front, traceback afterwards, and clearly separate.
2010-08-24 14:55:00 -04:00
Cole Robinson 2ab8c6ce03 Support libvirt managed save/restore
If a VM has a saved image, we s/Run/Restore/g for all the Run UI so the user
is aware they will be restoring from a saved state.
2010-05-12 12:57:32 -04:00
Richard Laager 272a6e24ce Uppercase ESX and GSX (from the esx driver) 2010-04-18 00:13:33 -05:00
Cole Robinson 0813d11837 Don't list memory percentages over 100
This upsets widgets. Any attempt at expressing memory overcommit will need
a bit more thought anyways.
2010-04-07 16:36:59 -04:00
Cole Robinson 4d4f34e596 create: Break out storage helpers for use in addhw 2010-03-04 15:31:33 -05:00
Cole Robinson b377a740ca Factor out a common 'libvirt object' class.
Use simply now for some common XML routines.
2010-02-25 19:35:01 -05:00
Cole Robinson 25284b0833 connection: Remove redundant logging 2010-02-24 14:45:35 -05:00
Cole Robinson 19e87ded38 connection: Make SASL auth dialog a bit cleaner 2010-02-24 14:40:22 -05:00
Cole Robinson f3da3efce1 connection: Don't show harmless backtraces on conn disconnect 2010-02-11 15:25:41 -05:00