Christian Ehrhardt
92c610e782
connection: avoid failing on NoneType in _hostinfo
...
There is a potential race of a backend to be opened and being true on
self._backend.is_open but self._hostinfo not being set yet.
Avoid spurial bugs due to that by also checking against None before
accessing subelements ot self._hostinfo
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2018-10-01 13:58:52 -04:00
Cole Robinson
ff3d6c65d8
Fix some pep8 warnings
2018-10-01 11:37:28 -04:00
Cole Robinson
b19f94299b
details: Add OS name view/edit, + oslist rework
...
This is just a big nasty commit.
Turn the OS inspection page into an always available page that
shows the libosinfo name from the domain metadata XML. Use oslist.py
and have it absorb more of the common behavior needed by create.py
and details.py. Add UI tests for it all
2018-09-30 20:55:32 -04:00
Cole Robinson
75c64151b1
engine: Exit app if if --show-X bits fail
...
We were missing some cases. Simplify the code while we are at it
and add some extra ui test cases
2018-09-30 20:55:18 -04:00
Cole Robinson
627bfabc32
pylint: Silence output on Fedora 29
2018-09-29 14:27:34 -04:00
Cole Robinson
a741f595ea
guest: Drop update_defaults
...
Fold its one purpose into the UEFI setting bits, fix it and test it
2018-09-13 15:59:27 -04:00
Cole Robinson
6063538750
guest: Replace os_variant with set_os_name
...
And have callers directly access osinfo.name if they need it
2018-09-12 17:24:28 -04:00
Cole Robinson
d60229825f
create: update caps state when machine type changes
...
And drop old dtb virtio stuff which we don't care about anymore
2018-09-12 15:35:49 -04:00
Cole Robinson
bc248b3eb5
create: Drop arm kernel warning
...
This case should be uncommon, and is wrong with UEFI, so drop it
and let qemu error
2018-09-12 14:06:13 -04:00
Cole Robinson
4e30161f44
guest: Absorb UEFI default setup
...
Rather than force callers to deal with it
2018-09-12 14:02:23 -04:00
Cole Robinson
ec69ae44b6
capabilities: Drop build_virtinst_guest
...
Same as lookup_virtinst_guest
2018-09-06 20:54:59 -04:00
Cole Robinson
5f22f41da4
guest: Absorb capabilities defaults setup
...
Rather than forcing API users to go through the capabilities APIs.
This lets us simplify things in virt-install quite a bit, and is
needed for smarter machine type defaults
2018-09-06 20:12:49 -04:00
Cole Robinson
12a7a18be0
cli: Fix traceback detection
2018-09-06 18:39:14 -04:00
Cole Robinson
a754718889
devices: disk: Use uppercase naming for mode lists
2018-09-06 16:51:14 -04:00
Cole Robinson
63287c83fb
addhardware: Move disk bus listing to virtinst
...
Drop the stable_default stuff as domcaps usage should make
it obsolete for any cases we care about
2018-09-06 16:40:49 -04:00
Cole Robinson
a09a46289a
addhardware: Move controller list logic to virtinst
...
And tweak the UI defaults a bit, preferring virtio-scsi and
usb3
2018-09-06 16:05:12 -04:00
Cole Robinson
7994dc90c8
addhardware: Move video model list to virtinst
...
And make it smart about the hypervisor
2018-09-06 14:45:05 -04:00
Cole Robinson
7baa296aed
details: Update IP addr UI after refresh_ip call
2018-09-06 14:04:00 -04:00
Lin Ma
838822b242
Fix error while refreshing ip if the virtual nic only has ipv6
...
Signed-off-by: Lin Ma <lma@suse.com>
2018-09-06 13:49:12 -04:00
Lin Ma
be8dfc25f7
Fix error while refreshing ip if the virtual nic doesn't have any ip
...
Signed-off-by: Lin Ma <lma@suse.com>
2018-09-06 13:48:58 -04:00
Lin Ma
b99731397b
addhardware: Add support for disk io mode option
...
Signed-off-by: Lin Ma <lma@suse.com>
2018-09-06 13:28:21 -04:00
Lin Ma
f2679df719
addhardware: Use consistent combo init for disk io mode option
...
Signed-off-by: Lin Ma <lma@suse.com>
2018-09-06 13:28:21 -04:00
Cole Robinson
b3865d7b0d
addhardware: Drop tcp/udp/dev char support
...
I know openstack uses tcp consoles but for end users I've never
really heard about it. RHEL compiles out udp as well. I'm fine telling
users to go to the cli and use virt-xml for this use case.
Use this opportunity to drop a lot of code that only simplified the
case when there are tons of char options we need to consider
2018-09-06 13:28:21 -04:00
Cole Robinson
954d2687d0
domain: Drop stable_defaults wrapper
...
Have callers invoke it directly on Guest
2018-09-06 13:28:21 -04:00
Cole Robinson
cd07d6af34
sound: Track recommended models in virtinst
...
Change addhardware to show an editable model entry, like the
details wizard
2018-09-06 13:28:21 -04:00
Cole Robinson
84a68d56de
addhardware: Don't disable filesystem on rhel
...
It might be compiled out, but just let qemu reporting fail. The
proper way to fix this expose it in domain capabilities or similar
2018-09-06 13:28:21 -04:00
Cole Robinson
da00a52159
storagebrowser: Remove stable_defaults handling
...
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
2018-09-06 13:28:21 -04:00
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
c5033c02d5
fsdetails: Use combo entry for format list
...
And stop listing all the crazy qemu formats
2018-09-06 13:28:21 -04:00
Cole Robinson
f13d10590d
createvol: Only show raw+qcow2 as file formats
...
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
2018-09-06 13:28:21 -04:00
Cole Robinson
f499bc9638
details: Use browse mode for hw-list
...
Meaning a row can never be unselected. Drop some redundant code
afterwards
2018-09-05 19:37:55 -04:00
Cole Robinson
a4d0d49d88
details: Centralize device row lookup
2018-09-05 19:20:23 -04:00
Cole Robinson
b4b7c7b520
details: IP address fixes/improvements
...
* Tweak the UI
* Add accelerator for the refresh button
* Make the IP labels selectable
* Drop the IP prefix from the UI, it's not the important bit
* Call DHCPLeases on the network instead to support this for more
drivers, like LXC
* Cache the IP results in the domain/network object wrappers
* Catch and log errors
* Poll for IP address when first visiting the interface page
2018-09-05 14:58:32 -04:00
Lin Ma
3bd582331e
details: Show ipv4 and ipv6 address in details page of interface
...
If the interface's type is 'network', then code uses lease as one of
parameters of interface_addresses to get ipv4 and ipv6 address.
If the result is negative, then uses agent to try again, If the result
is still negative, uses arp for final try.
Signed-off-by: Lin Ma <lma@suse.com>
2018-09-05 12:33:11 -04:00
Lin Ma
a500191b60
domain: Add function interface_addresses to return ipv4 and ipv6
...
It returns a dict that consisting of ipv4 and ipv6 which only match the
given mac, it returns None in exception.
Signed-off-by: Lin Ma <lma@suse.com>
2018-09-05 12:33:11 -04:00
Lin Ma
e96e52bc28
addhardware: Add support for disk detect zeroes option
...
Complete this part of feature for commit e6c7e46a
Signed-off-by: Lin Ma <lma@suse.com>
2018-09-05 10:26:32 -04:00
Lin Ma
a919a1ae4e
addhardware: Add support for disk discard option
...
Complete this part of feature for commit d13b793b
.
Signed-off-by: Lin Ma <lma@suse.com>
2018-09-05 10:26:12 -04:00
Cole Robinson
4394eff9fa
xmlbuilder: Drop last usages of set_converter
...
Unfold most of them into manual property() wrappers. It's a bit
noisier but the logic is easier to follow.
2018-09-04 14:55:04 -04:00
Cole Robinson
bd35f4711c
devices: disk: Rename setup() to build_storage()
...
It's more explicit. Plus drop the supposedly generic setup()
entry point, storage is handled specially everywhere so it's
not a generic interface
2018-09-04 14:55:04 -04:00
Cole Robinson
ebd6091cc8
devices: interface: Simplify is_conflict_net calls
...
We don't return a non-fatal error these days, so adjust all callers
to only handle failure
2018-09-04 14:55:04 -04:00
Cole Robinson
c27cdc67de
devices: interface: Convert setup() to validate()
...
That's all it's doing. Fold in mac validation while we are here
2018-09-04 14:55:04 -04:00
Cole Robinson
8aa01dab78
details: Remove UI display fields for egd RNG
...
In practice no one is using this, so it's not worth maintaining
specific UI to show its details
2018-09-04 14:55:04 -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
2ac54ac001
guest: Drop self.installer and start_install wrapper
...
This changes all the callers to invoke start_install directly on the
Installer object. We still stash the installer instance inside the
guest object in create.py, just for simplicity
2018-09-04 14:55:04 -04:00
Cole Robinson
c154bbacd4
guest: Fold add_default_devices into set_defaults
...
It doesn't have any need anymore to be separate
2018-09-04 14:55:04 -04:00
Cole Robinson
f1bbc5f67a
guest: move set_install_defaults to installer class
...
It's only called explicitly in one place, so update the caller
2018-09-04 14:55:04 -04:00
Cole Robinson
068c8aedd2
installer: Remove ContainerInstaller and ImportInstaller
...
Fold their non-logic into the base Installer class
2018-09-04 14:55:04 -04:00
Cole Robinson
1e76496fa8
storage: remove default_cb usage
2018-09-04 14:55:04 -04:00
Cole Robinson
d5bff2c987
guest: Remove default_cb usage
...
This lets us simplify things in create.py a bit, since we don't
need to manually encode a UUID
2018-09-04 14:55:04 -04:00
Cole Robinson
6215f790f5
devices: filesystem: Add set_defaults
...
Requires a bit of rework in virt-manager handling, which had lots
of explicit "default" handling
2018-09-04 14:55:04 -04:00