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>
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
It simply makes vmdk disk images not selectable. I don't even know
if that's relevant for RHEL7+ anymore, but if it is, maintaining
code for disabling this in the UI doesn't make the situation any
better IMO
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>
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
And clean up the API mess while we are at it. Treat the key as an opaque
value that users shouldn't depend on.
Besides the improved code clarity and API layout, this will help diagnose
'key error' issues, since we'll see an object name instead of UUID which
is hard to trace back.
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)
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>
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>
When a new volume is created for a storage, automatically select it;
most likely it is what the user will choose to use.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(crobinso: util is gone now, replace with uihelpers)
Set the connection used by vmmCreateVolume everytime the window is made
visible. This fixes a case where volumes could be added to the wrong
pool if the same vmmCreateVolume window was already used on a different
connection.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
The commit b044dd renamed vmmStoragePool.uuid to vmmStoragePool._uuid,
causing this error:
Traceback (most recent call last):
File "virtManager/storagebrowse.py", line 280, in refresh_current_pool
self.refresh_storage_pool(None, cp.get_uuid())
File "virtManager/storagebrowse.py", line 243, in refresh_storage_pool
if curpool.uuid != uuid:
AttributeError: 'vmmStoragePool' object has no attribute 'uuid'
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
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.
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.