Commit Graph

37 Commits

Author SHA1 Message Date
Cole Robinson 62feeb02a8 Switch to python3 style 'except X as Y' notation
Which also works with python2.7
2017-05-05 14:52:11 -04:00
Cole Robinson c0a3234633 baseclass: share wizard cursor setting code 2017-04-27 15:00:17 -04:00
Jim Fehlig 561f5cd3e6 virt-manager: drop 'xenmigr' scheme from Xen migration URI
For Xen, virt-manager uses a 'xenmigr' URI scheme, which is not
supported by the libvirt libxl driver. Attempting migration
fails with

libvirtError: invalid argument: unable to parse URI: xenmigr://myhost

The old xend-based libvirt driver supports this scheme, but also
supports an empty scheme. It's not clear what the 'xenmigr' scheme
is used for. 'xenmigr' is not referenced by any files in the Xen
code-base, including old branches with xend.

Drop setting scheme to 'xenmigr' when creating the Xen migration URI.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2016-09-08 11:47:52 -04:00
Pavel Hrdina 0fbe8e7a1f translation: fix wrong usage of _() function
All the strings have to be at first translated and then we can fill the
formated and translated string.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-06-05 16:33:51 -04:00
Cole Robinson fdad3efe24 uiutil: streamline column vs rowidx parameter name 2015-05-19 18:29:45 -04:00
Cole Robinson 18a6d8b444 migrate: Add 'temporary' option
This doesn't undefine the VM source, and leaves it temporary on the
destination. Basically the default migration action
2015-04-21 17:39:44 -04:00
Cole Robinson 62ad0e91ee migrate: Big reworking of the dialog
It's largely the same, but now

- The code is better organized
- The UI is much more streamlined, only showing relevant fields when
  required.
- We warn about the hostname/URI cases that we know libvirt will error on
- Drop some of the attempts at being smart, and just mimic what libvirt
  will do.
2015-04-21 17:15:58 -04:00
Cole Robinson be86785fdd migrate: Drop unused 'live' parameter. We always pass LIVE 2015-04-21 16:33:41 -04:00
Cole Robinson 2b877cf337 migrate: Remove 'max downtime' support
This is only needed when people have very specific downtime constraints
on public facing services. I don't think that covers many virt-manager
users. So suggest they just use the command line for this.
2015-04-21 16:33:41 -04:00
Cole Robinson 39dc0c7b94 migrate: Drop 'bandwidth' UI
A bit too enterprisy for my tastes. If people need this they should use
the command line.
2015-04-21 16:33:41 -04:00
Cole Robinson 4781ad6cd6 connection: Simplify manager row 'pretty name' handling
Unify all the callers, and use some UI ellipsizing to handle
crazy long hostnames.

This drops the conn name collision prevention stuff which can be
useful when you have lots of similar connection names. But upcoming
patches will make it mostly redundant.
2015-04-11 12:57:32 -04:00
Cole Robinson cff08223ba util: Move uri_split to its own URISplit class
Does what uri_split did, but wraps it all up in an object that makes
handling the data easier, and makes it easy to extend.
2014-12-09 08:43:19 -05:00
Cole Robinson 226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Cole Robinson bd5e57dbdc connection: Simplify state management 2014-09-12 16:28:37 -04:00
Cole Robinson 7fcdd61920 manager: Expand logic to avoid colliding connection descriptions
And drop some unused code
2014-07-04 18:20:54 -04:00
Cole Robinson 932e6e00bb details: Fix changing graphics type (bz 1083903)
And clean up the API usage to avoid these types of issues in the future.
2014-04-03 10:53:54 -04:00
Cole Robinson a398d245cb Clean up pylint integration
- Drop no longer needed disable= bits
- Use string names for all skipped pylint messages
2014-04-02 19:00:24 -04:00
Cole Robinson d3bd70daca migrate: Remove misleading 'offline' option (bz 881092)
We acted like it would migrate a shutoff VM, but it just toggled
the LIVE flag. We should support true 'offline' migration, but
the UI will be different.
2014-02-01 18:17:17 -05:00
Cole Robinson 889ec18031 uiutil: Use list selection helpers everywhere 2014-01-27 10:46:14 -05:00
Charles Arnold 1124043151 Allow unsafe migrations in virt-manager
Normally, setting cache=none is required in order to ensure a consistent view
of storage between the source and destination migration hosts. However, some
configurations have that quality without resorting to the use of an O_DIRECT
open (which is what cache=none does), and hence cache=none wouldn't be
necessary.

Unfortunately, libvirt is not able to determine on it's own all the
configurations which require cache=none for migration but in the interest of
safety enforces it when it isn't otherwise able to determine migration safety.

For this reason the libvirt api has an 'unsafe' option which allows the user
to override the safety migration checks.

This patch adds a checkbox to allow unsafe migration to the 'Advanced options'
portion of the migration dialog.

Signed-off-by: Charles Arnold <carnold@suse.com>
2013-12-14 12:23:37 -05:00
Cole Robinson 60b7365ae9 Use consistent widget names for create wizard headers
Makes copying code around simpler
2013-09-27 10:56:52 -04:00
Cole Robinson d338bce329 Rename ui files to match source file names 2013-09-22 16:10:16 -04:00
Cole Robinson 1683d56b8d ui: Set non-stock button images in glade, not explicitly in code 2013-09-22 12:33:02 -04:00
Cole Robinson 6869760732 asyncjob: Fix issues with multiple dialogs (bz 1003101)
Basically, drop usage of nested main loops. As has been documented in
other commit messages, we use nested main loops in ways they aren't
supposed to be used. They gave us async behavior that would block
callers, but had weird behavior in some edge cases.

Switch to having async dialogs be 100% async, requiring the user to
pass in a completion callback which is triggered after the async
action is complete.
2013-09-06 21:30:19 -04:00
Cole Robinson 7c55cfeb39 virtManager: Drop util, combine it with virtinst.util and uihelpers 2013-08-11 12:39:28 -04:00
Cole Robinson 5e9e444dec connection: Do non-VM polling on demand
The goal here is to reduce the amount of tick() polling that we do by default.
For things like pools, networks, and interfaces, the constant polling is
not very helpful and causes CPU churn and slowness for remote connections.

Switch to a more on demand style. Pages that want new information for
these objects now request a priority tick that only refreshes the info
we want.

This isn't perfect, but neither was the previous solution in the face of
things like XML updates behind our back. The real solution here is libvirt
event support across the board.
2013-07-07 12:17:54 -04:00
Cole Robinson 76887c9a32 engine: Switch tick threading model to use queues
And allow other parts of the API to request a priority tick that is
dispatched from the main tick thread.
2013-07-06 21:24:38 -04:00
Cole Robinson ec734191fc virtinst: connection: Absorb all scattered URI helpers 2013-07-06 12:40:24 -04:00
Cole Robinson be2d9ddcb4 Add base conn object and bump minimum libvirt version to 0.6.0
This base connection object will be used to simplify the API in various
places, reduce libvirt API calls, and better share code between virtinst
and virt-manager. For now it just centralizes connection opening.

This also exposed various places where our handling for older libvirt
was busted, so raise our minimum host version to 0.6.0, the first
version that supports threaded client requests.
2013-07-05 16:42:19 -04:00
Cole Robinson e2435b6d02 asyncjob: Simplify registering a cancel callback 2013-06-13 17:05:33 -04:00
Cole Robinson 07e0c92b4b Remove a bunch of outdates FIXME/XXX comments 2013-04-17 09:32:00 -04:00
Cole Robinson 0d243983d0 Revive pep8 and clean up the code
autopep8 is pretty cool :)
2013-04-13 15:22:43 -04:00
Cole Robinson ae471007fc Tons of misc pylint fixes 2013-04-13 13:40:29 -04:00
Cole Robinson 9515a8575d Disable pylint warnings about gi.repository
Since pylint still can't handle the dynamic nature of gobject
introspection.
2013-04-12 08:27:45 -04:00
Cole Robinson 927bcc11cd virtinst: util: Move URI helpers to their own file
Helps us avoid some relative imports, and makes things cleaner.
2013-04-11 12:15:38 -04:00
Eric Blake 4c10a627ab migrate: use correct grammar
According to http://grammar.quickanddirtytips.com/a-while-awhile.aspx,
you can tell whether to use 'awhile' or 'a while' by substituting
'quietly' or 'a year' and seeing if the resulting sentence still makes
sense.  During migration, we used an adverb, but want the noun form.

* src/virtManager/migrate.py (vmmMigrateDialog.finish): Use
correct grammar.

(crobinso: Add Eric to AUTHORS)
2013-04-03 20:44:04 -04:00
Cole Robinson 9d05583c26 Remove autotools, replace with distutils-extra
Despite being a known quantity, autotools is so overkill for our needs,
so let's drop it and replace it with a much simpler and easy to customize
system.
2013-04-03 18:20:51 -04:00