Pull the remove_devobj_internal call outside of the async job,
otherwise we can have X11 threading issues
Signed-off-by: Cole Robinson <crobinso@redhat.com>
remove_devobj_internal function handles more things than vm.remove_device.
We should call it first before performing the storage deletion.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
So that the callback doesn't need to be passed into the init function,
and vmmDetails can call that function directly
Reviewed-by: Cole Robinson <crobinso@redhat.com>
We should try to hide all the self.vm vs self.disk differences into
individual functions to make the code easier to follow and to avoid
touch those values by accident in the future
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Do not join two parts of sentences together, because it is problematic
to translate. Instead, use a different sentence depending on the
condition.
Fixes commit d52c9d1ffa.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
we should let users decide whether they want to also delete the
storage files or just dev from UI when they click the Remove button
Reviewed-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
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>
There's lots of hacks stuffed into the domain device lists. Formalize
some of it, move some of the specific stuff to details.py, and drop
a lot of the needless API wrappers
Even if it's not marked readonly or shareable, floppy media is
very likely to be a shared resource and not something that belongs
to the VM that the user will want to delete by default.
Drop horizontal scrolling, since with gtk3 hidden scrollbars it might
mean users don't realize there's info that is scrolled off.
Adjust the default sizing to match that pattern
commit 5357b91402 changed the semantic of
conn.get_(vm|pool|interface|nodedev|net), to return None instead of
raising KeyError. Leave the exception handling code in case the
semantic is going to be reverted.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1219427
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
As of now, the only uses of nvram likely in the domain XML are with
libvirt configurations that also support the UNDEFINE_NVRAM flag, so
listing it here is kind of redundant. And in the common config of
non-root user connected to qemu:///system with template based nvram
in /var/lib, we won't be able to remove it anyways.
commit b2a7c396 introduce confirmation before deleting,
we should keep the comment consistent with it.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
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)