Commit Graph

52 Commits

Author SHA1 Message Date
Cole Robinson 2b7043cd85 createpool: Fix showing formats
But shrink the format list to 'auto' only, but also add a text entry
so users can type their own
2018-09-06 13:28:21 -04:00
Cole Robinson 852d7b564d virtinst: Remove name field validate_cb usage
Either openly do this at callers, or wrap it in a validate() call.
Doing this at set time has always had issues, like the self.replace hack
2018-09-04 14:55:04 -04:00
Cole Robinson 1e76496fa8 storage: remove default_cb usage 2018-09-04 14:55:04 -04:00
Daniel P. Berrangé 48e32b429d Fix copyright header to specify GPLv2 or later, not GPLv2 only.
The copyright headers in every file were chjanged in this previous commit

  commit b6dcee8eb7
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Tue Mar 20 15:00:02 2018 -0400

    Use consistent and minimal license header for every file

Where before this they said "

  "either version 2 of the License, or (at your option) any later version."

Now they just say

  "GNU GPLv2"

This fixes it to say "GNU GPLv2 or later" again.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-04 16:51:37 -04:00
Cole Robinson b6dcee8eb7 Use consistent and minimal license header for every file 2018-03-21 07:29:40 -04:00
Cole Robinson 20d5c1887a baseclass: Export GObject.SignalFlags.RUN_FIRST
Saves some typing and imports
2018-03-15 21:24:48 -04:00
Cole Robinson dae8642bb1 xmlbuilder: centralize adding child new child prop instances
Currently the domain CPU class has a child property like:

  siblings = XMLChildProperty(_CPUCellSibling)

If a user wants to add a new sibling, we add a convenience function:

    def add_sibling(self):
        obj = _CPUCellSibling(self.conn)
        self.add_child(obj)
        return obj

Rather than require every child property to define a similar matching
helper function, this adds infrastructure in xmlbuilder to do this
generically for every child property. Now callers can do

    obj = guest.cpu.siblings.add_new()
2018-02-08 14:03:47 -05:00
Chen Hanxiao c92aade081 pycodestyle: fix all E203 warnings
Fix all E203 whitespace before ':'
   Also remove E203 ignore option of pycodestyle

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-08-11 00:01:38 +08:00
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
Cole Robinson 435de2d40c pylint: Fix some issues with F25 version 2016-12-13 12:36:49 -05:00
Pavel Hrdina b327191a20 maint: fix pylint warnings wrong-import-order
standard import "import logging" comes before "from gi.repository import GLib"

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 17:37:06 +02:00
Cole Robinson 34db1af7b6 createpool: Fix adding iscsi pools (bz 1231558) 2015-06-21 15:47:31 -04:00
Cole Robinson fdad3efe24 uiutil: streamline column vs rowidx parameter name 2015-05-19 18:29:45 -04:00
Cole Robinson 252c216fb9 createpool: Don't unconditionally use /var/lib/libvirt
Doesn't make sense for session URIs
2015-05-02 19:54:14 -04:00
Cole Robinson 6071ab0ea4 uiutil: Clarify a few ambiguous function names 2015-04-10 15:00:34 -04:00
Cole Robinson 2d25c920ea connection: Use consistent nodedev function names 2015-04-10 15:00:34 -04:00
Cole Robinson fb7a921ec4 storagelist: Select newly created pool/volumes
And clean up some of the internal APIs in this area
2015-04-10 15:00:33 -04:00
Cole Robinson c66bc2a87f connection: Have get_nodedevs return vmmNodeDevice
To make it consistent with similar vmmConnection functionas
2015-04-07 14:12:00 -04:00
Cole Robinson 0492dbc1b1 createpool: Remove some pylint 2015-04-03 15:26:33 -04:00
Charles Arnold 20fe287341 virt-manager: Don't allow an empty string for a network name
When starting the 'Create virtual network' wizard, you are allowed to proceed
without specifying a Network Name.  An error only occurs after all else is
completed with the wizard. This patch stops the user from proceeding if a
network name has not been specified.

The check for an empty string is done in util.py which also effects storage
pool names and guest names neither of which should have empty strings.

Signed-off-by: Charles Arnold <carnold@suse.com>

Message-Id: <551D664702000091000F42E8@prv-mh.provo.novell.com>
2015-04-03 10:49:42 -04:00
Cole Robinson e61311fc8a storage: More support for network pools
Including parsing multiple hosts, filling reasonably defaults, making
sure the createpool wizard does the correct thing, etc.
2014-12-09 16:12:47 -05:00
Cole Robinson 226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Cole Robinson 93dde44cf0 createpool: Raise validation error if no name specified 2014-09-06 15:03:58 -04:00
Giuseppe Scrivano 5c2459e6e4 createpool.py: fix creation of gluster pools
It fixes this exception:

Traceback (most recent call last):
  File "virt-manager/virtManager/createpool.py", line 454, in page_changed
    self.set_page(page_number)
  File "virt-manager/virtManager/createpool.py", line 451, in set_page
    self.show_options_by_pool()
  File "virt-manager/virtManager/createpool.py", line 292, in show_options_by_pool
    self.widget("pool-source-name").get_child().set_text(
AttributeError: 'Entry' object has no attribute 'get_child'

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-06-16 08:20:58 +02:00
Giuseppe Scrivano 3118ec5f51 createpool.py: fix comment typo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-06-12 10:03:32 +02:00
Cole Robinson 8fa2aad1d3 createpool: Clarify iscsi IQN fields (bz 1084011) 2014-04-03 11:19:03 -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
Giuseppe Scrivano cbec4b10ab ui: add support for gluster fs
Add a new field "pool-source-name" in the createpool UI that is used
only with gluster fs pools.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:26 +01:00
Giuseppe Scrivano dd0af85d5a storage: make "target_path" optional
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:25 +01:00
Cole Robinson 889ec18031 uiutil: Use list selection helpers everywhere 2014-01-27 10:46:14 -05:00
Cole Robinson 2771511946 uiutil: Make more use of set_combo_text_column 2014-01-26 21:35:42 -05:00
Cole Robinson 708a2737cf Split uihelpers into sharedui and uiutil
Reserve uiutil for the little gtk helper functions, rest goes into shared
UI (which all should probably be factored into their own files but thats
a task for another day)
2014-01-26 18:15:50 -05:00
Cole Robinson 2a34b353da uihelpers: Move browse_local to error.py
It doesn't fit any better, but now it's accessible to all UI classes
more easily.
2014-01-26 18:01:10 -05:00
Giuseppe Scrivano 7f3c4cf2f9 virt-manager: correctly initialize the create pool wizard page number
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1034933

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-12-02 10:45:12 +01:00
Giuseppe Scrivano 0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.

The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:26 +01:00
Cole Robinson 33f15f58f0 createpool: Use blue header like other wizards, cleanup UI
Drop the docs reporting since it's inconsistent and not all that
useful. Few other misc cleanups
2013-09-27 12:13:01 -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 aff0ddb259 Use XMLBuilder for Storage object handling
Simplify the API a bunch while we are at it, add tests, etc.
2013-09-20 10:00:08 -04:00
Cole Robinson 36c669d45a Replace get_property("sensitive") with get_sensitive 2013-09-09 11:02:34 -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 9d87b0d342 Replace set_property("visible") with modern set_visible 2013-09-01 20:18:14 -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 57e86259d8 Make conn required for all virtinst objects
This was the way the API had been heading, this just formalizes it.
2013-07-05 20:28:21 -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 0d243983d0 Revive pep8 and clean up the code
autopep8 is pretty cool :)
2013-04-13 15:22:43 -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