summaryrefslogtreecommitdiff
path: root/virtManager/createvol.py
Commit message (Collapse)AuthorAgeFilesLines
* Clean up FileChooser usage a bitCole Robinson2022-12-141-1/+1
| | | | | | | * Move browse_reason handling entirely into storagebrowser.py * Open code some of the browse_local logic at the few callers Signed-off-by: Cole Robinson <crobinso@redhat.com>
* createvol: Drop Allocation field in favor of checkboxCole Robinson2020-09-201-56/+20
| | | | | | | | | | | | | | | | | | | | | | | Inspired by some discussion from here: https://bugzilla.redhat.com/show_bug.cgi?id=1759454 Most libvirt storage volume creation doesn't actually do anything with allocation, besides interpreting cap == alloc and cap != alloc. The exceptions are zfs volumes, and raw file volumes. But it's unclear what the usecase is for the latter at all. This drops the allocation spinner and adds checkbox in its place 'Allocate entire volume now'. When enabled, it sets cap == alloc. We only show this for file volumes. For qcow2 it defaults to unselected (sparse), for all others it defaults to selected. If it's not showing, it defaults to selected. Bundled with this change is showing this field for qcow2, where we previously only allowed nonsparse here. Libvirt and qemu-img support non-sparse qcow2 these days. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* i18n: fix string puzzle in volume creation dialogPino Toscano2020-09-171-4/+5
| | | | | | | | Use a single label to show the single sentence describing the available space on the storage pool. This avoids the use of 3 different labels, partially translated separately, and whose content cannot be moved. Signed-off-by: Pino Toscano <ptoscano@redhat.com>
* objects: Erase the notion of connkeyCole Robinson2020-09-011-2/+3
| | | | | | | | | Make it explicit that all uses of this is actually the object name. We already leaked this abstraction in several places so better to make it explicit. This also communicates to users that this is a field that is not immutable so it shouldn't be used as a unique key Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: uitests: Add createvol.py coverageCole Robinson2020-08-261-15/+9
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtManager: Convert to CSS for most color usageCole Robinson2020-02-031-4/+0
| | | | | | | | * Add CSS data in config.py and install it * Strip out all hardcoded colors and use style class annotations * Fix colors to be more theme appropriate to fix dark theme look Signed-off-by: Cole Robinson <crobinso@redhat.com>
* storage: Replace volume supports_property with supports_formatCole Robinson2019-07-031-1/+1
| | | | Helps to make usage more explicit
* virtManager: Move a lot of misc files to lib/Cole Robinson2019-06-171-1/+1
|
* Switch to more traditional logging structureCole Robinson2019-06-171-9/+8
| | | | | | | | Init a shared log instance in virtinst/logger.py, and use that throughout the code base, so we aren't calling directly into 'logging'. This helps protect our logging output from being cluttered with other library output, as happens with some 'requests' usage
* createvol: add xmleditor UICole Robinson2019-06-131-19/+42
|
* storage: Handle guest collision checkingCole Robinson2019-06-111-0/+1
| | | | | This pattern is already used in two places. Formalize and centralize it
* createvol: Always generate a default nameCole Robinson2019-05-131-9/+8
| | | | | Let's users just quickly click through, gives more testing to the name_hint path
* createvol: Modernize code styleCole Robinson2019-05-131-173/+212
| | | | | | | * Have clear UI callbacks * Group functions * Privatize internal methods * Don't carry around _vol internally
* Fix a few issues reported by codespellErik Skultety2019-03-181-1/+1
| | | | | | | There were a few minor typos across the codebase which codespell pointed out. Signed-off-by: Erik Skultety <eskultet@redhat.com>
* createvol: Fix showing backing store UI on first run (bz 1670266)Cole Robinson2019-02-031-1/+1
| | | | | | | | Whether we check for a vol-format value shouldn't be dependent on whether the UI is on screen (is_visible), but whether the UI is requested to be shown (get_visible) https://bugzilla.redhat.com/show_bug.cgi?id=1670266
* createvol: Only show raw+qcow2 as file formatsCole Robinson2018-09-061-31/+7
| | | | | And turn the combo into a text entry, so users can enter their own if they want. raw and qcow2 covers the vast majority of usecases
* xmlbuilder: Rename get_xml_config -> get_xmlCole Robinson2018-08-311-1/+1
| | | | The config part is redundant. Should have done this a long time ago
* Fix copyright header to specify GPLv2 or later, not GPLv2 only.Daniel P. Berrangé2018-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | The copyright headers in every file were chjanged in this previous commit commit b6dcee8eb7ec4de999058c187162fe4aedef36b4 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>
* Use consistent and minimal license header for every fileCole Robinson2018-03-211-16/+2
|
* baseclass: Export GObject.SignalFlags.RUN_FIRSTCole Robinson2018-03-151-2/+1
| | | | Saves some typing and imports
* pycodestyle: fix all E203 warningsChen Hanxiao2017-08-111-10/+10
| | | | | | | Fix all E203 whitespace before ':' Also remove E203 ignore option of pycodestyle Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
* pycodestyle: Do not use bare 'except:'Radostin Stoyanov2017-08-021-2/+2
| | | | | | | | | | | A bare 'except:' catches all exceptions [1], including SystemExit, KeyboardInterrupt, and GeneratorExit (which is not an error and should not normally be caught by user code). In situations where you need to catch all “normal” errors, you can catch the base class for all normal exceptions, Exception [2]. [1] https://docs.python.org/2/howto/doanddont.html#except [2] https://docs.python.org/2/library/exceptions.html#Exception
* Switch to python3 style 'except X as Y' notationCole Robinson2017-05-051-2/+2
| | | | Which also works with python2.7
* baseclass: share wizard cursor setting codeCole Robinson2017-04-271-7/+2
|
* pylint: Fix some issues with F25 versionCole Robinson2016-12-131-2/+2
|
* createvol: Fix VM name hint settingCole Robinson2015-09-141-1/+1
|
* addhardware: Use same default storage size as create.py (20 GB)Cole Robinson2015-09-131-1/+1
| | | | createvol too
* createvol: Log parent pool XML when openingCole Robinson2015-08-101-1/+8
| | | | And chosen volume XML
* uiutil: streamline column vs rowidx parameter nameCole Robinson2015-05-191-1/+1
|
* createvol: Don't cap capacity to host space (bz 1118706)Cole Robinson2015-04-111-7/+12
| | | | Only cap allocation, since we can overcommit with sparse images.
* uiutil: Clarify a few ambiguous function namesCole Robinson2015-04-101-1/+1
|
* storagelist: Select newly created pool/volumesCole Robinson2015-04-101-3/+7
| | | | And clean up some of the internal APIs in this area
* Break out shared storage UI to storagelist.py (bz 1060433)Cole Robinson2015-04-091-2/+5
| | | | | | We were already sharing a chunk of this in a haphazard way. Now officially break it all out, similar to netlist.py. This mostly unifies the views of host->storage and storagebrowser.py
* storagebrowse: Standardize on set_finish_cbCole Robinson2014-12-091-1/+1
| | | | Instead of gobject signals
* virtManager: Switch to relative importsCole Robinson2014-09-121-4/+4
|
* createvol: remove redundant loggingCole Robinson2014-05-211-3/+0
|
* Clean up pylint integrationCole Robinson2014-04-021-2/+0
| | | | | - Drop no longer needed disable= bits - Use string names for all skipped pylint messages
* Use .qcow2 extension when creating qcow2 filesCole Robinson2014-02-041-4/+5
| | | | Seems the be the practice these days
* uiutil: Use list selection helpers everywhereCole Robinson2014-01-271-6/+1
|
* uiutil: Make more use of set_combo_text_columnCole Robinson2014-01-261-3/+1
|
* Split uihelpers into sharedui and uiutilCole Robinson2014-01-261-4/+4
| | | | | | 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)
* Rename hide_unsupported_rhel_options to stable_defaults and clean-up its usageMartin Kletzander2014-01-211-4/+4
| | | | | | | | | | | | There were multiple problems with the setting and usage of hide_unsupported_rhel_options. Due to the fact that the option has several diferent namings throughout the code, this patch is renaming it to stable_defaults, which basically says what the option does and makes it possible to use it without need for more than one negation (where the old code had up to 4 of them in some places), which also helps understanding it. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
* virt-manager: Default to qcow2 on kvmCole Robinson2013-10-021-1/+1
| | | | | | | | | qcow2 enables fancy features like snapshots and is generally more desktopy, which we purport to be. We only do this on not horribly old libvirt/qemu, and only on qemu connections. This may work for xen but I'm not going to turn it on until someone tests it.
* createvol: Bunch of misc improvementsCole Robinson2013-10-011-18/+40
| | | | | | - Hide backing store for formats that don't support it - Hide allocation for qcow2 since it doesn't do anything - Automatically select the storage format as specified in prefs
* storage: Drop unused static functionCole Robinson2013-09-301-3/+2
| | | | This allows us to simplify the parameters for find_free_name
* createvol: Add UI for specifying backing storeCole Robinson2013-09-291-16/+56
|
* createvol: Hide format UI if no formats supportedCole Robinson2013-09-271-4/+3
|
* createvol: Allow user to specify there own suffixCole Robinson2013-09-271-12/+8
| | | | Just imbed a . in the volname and we drop our default suffix
* createvol: Use blue header like other wizardsCole Robinson2013-09-271-14/+20
|
* Rename ui files to match source file namesCole Robinson2013-09-221-1/+1
|