Commit Graph

5711 Commits

Author SHA1 Message Date
Cole Robinson
a9ad2426b0 test_urls: Improve error output 2018-04-24 11:33:12 -04:00
Eduardo Kienetz
ef8398268b Fix URI parsing when username contains @ sign
On a domain-joined host the URI wasn't getting properly parsed due to the username containing an @ sign.

Before:
DEBUG (sshtunnels:263) ['ssh', 'ssh', '-l', 'eduardok', 'ad.mydomain.com@kvmhost1', 'sh -c', '\'nc -q 2>&1 | grep "requires an argument" >/dev/null;if [ $? -eq 0 ] ; then   CMD="nc -q 0 127.0.0.1 5900";else   CMD="nc 127.0.0.1 5900";fi;eval "$CMD";\'']

After:
DEBUG (sshtunnels:263) ['ssh', 'ssh', '-l', 'eduardok@ad.mydomain.com', 'kvmhost1', 'sh -c', '\'nc -q 2>&1 | grep "requires an argument" >/dev/null;if [ $? -eq 0 ] ; then   CMD="nc -q 0 127.0.0.1 5900";else   CMD="nc 127.0.0.1 5900";fi;eval "$CMD";\'']
2018-04-17 15:14:44 -04:00
Cole Robinson
105a6d20be tests: urls: Fix custom ini file usage 2018-04-16 11:36:39 -04:00
Luca Weiss
e9ba30a255 setup: Install files in new virtinst folders
In commits fe9ed23 and 3909c10 several files were moved to subfolder of
virtinst, but they are not covered by the existing glob in the setup.py
file. Fix that by adding those subfolders explicitely.
2018-04-12 10:15:51 +02:00
David H. Gutteridge
ec2c62f110 man: virt-xml: Note --update implies --define 2018-04-06 11:12:52 -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
Daniel P. Berrangé
24a8b66b35 avoid referencing ConnectError if it is None
Currently it throws an exception at startup which is hidden unless you
run with --no-fork

  $ python3 ./virt-manager --no-fork
  Traceback (most recent call last):
    File "/home/berrange/src/virt/virt-manager/virtManager/baseclass.py", line 225, in wrap_func
      return func(*wrapargs)
    File "/home/berrange/src/virt/virt-manager/virtManager/engine.py", line 206, in conn_open_completed
      ConnectError.details)
  AttributeError: 'NoneType' object has no attribute 'details'

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-04 16:51:37 -04:00
Charles Arnold
0f2e0a49f9 virtinst: Trivial spelling fix
Trivial spelling fix.

Signed-off-by: Charles Arnold <carnold@suse.com>
2018-04-04 16:49:23 -04:00
Cole Robinson
96645fe3ed urldetect: Remove some unused SUSE bits
Charles confirmed for me that SUMMARY and arch fallback handling
doesn't have any still relevant uses, so we can drop them
2018-04-04 16:46:29 -04:00
Cole Robinson
a6c776f1f8 baseclass: Catch another cursor failure instance 2018-04-03 16:12:18 -04:00
Cole Robinson
83a1c43490 tests: test_urls: Look for manual.ini in ~/.config/virt-manager
Rather than deal with ignoring it in the source tree
2018-04-03 15:29:03 -04:00
Cole Robinson
e80ebe56f5 Bump devel version to 1.6.0 2018-04-03 15:26:55 -04:00
Cole Robinson
118d21e076 spec: Move regular deps before big comment strings 2018-04-03 15:25:25 -04:00
Cole Robinson
37eb7e9f3f spec: Fix build on fedora 28 2018-04-03 15:25:17 -04:00
Cole Robinson
9a87a8d5ea baseclass: Catch cursor error if icon missing (bz 1516588)
Debian users who installed virt-manager on a bare system found
that a missing cursor icon theme caused addhardware wizard to fail

https://bugzilla.redhat.com/show_bug.cgi?id=1516588
2018-04-03 13:10:11 -04:00
Cole Robinson
b17c7565e2 tests: clitest: test virt-xml --update on inactive VM 2018-04-03 12:43:14 -04:00
David H. Gutteridge
4a58a689db virt-xml: Warn when --update is inapplicable 2018-04-03 12:34:55 -04:00
Cole Robinson
45c7a0657f urlfetcher: Simplify urllib import 2018-04-03 11:38:37 -04:00
Cole Robinson
12996dd458 domcapabilities: Document class layout a bit
It's a bit weird due to the repetitive nature of domainCapabilities
XML layout
2018-04-03 11:07:18 -04:00
Cole Robinson
07489a900e tests: Remove __main__ handling, not needed 2018-04-03 10:59:00 -04:00
Charles Arnold
fd6a815440 virtinst: compare host and domain cpu models
Lookup the domain capabilities CPU model and compare with
the host capabilities CPU model and if they are not equal
set the guest's CPU model to None.

(crobinso: compare against 'custom' list not 'host-model', move
 to separate function)
2018-04-03 10:57:49 -04:00
Charles Arnold
d15b78ab0d virtinst: read CPU model from domain capabilities
Add functionality to acquire the CPU model from the
libvirt domain capabilities. This is used to compare
with the host CPU model.

(crobinso: add test coverage, rework domcaps layout a bit)
2018-04-03 10:57:15 -04:00
Cole Robinson
76c40d6f97 urldetect: Track SUSE regexs in their Distro classes 2018-04-02 18:46:24 -04:00
Cole Robinson
467425fad1 urldetect: Move SUSE content file handling into its own class
Try to untangle the interdependencies and not recalculate everything
for every suse distro
2018-04-02 18:33:07 -04:00
Cole Robinson
fb1b26c081 urldetect: Drop RedHatDistro baseclass
Just fold the minimal logic into GenericTreeinfo, since only
RH distros use treeinfo so it's basically the same thing
2018-04-02 17:18:17 -04:00
Cole Robinson
eafdaf8b48 tests: test_urls: Add urldetect kernel arg validation 2018-04-02 17:15:05 -04:00
Cole Robinson
fb9b82e02d urldetect: Clean up Fedora version checking a bit 2018-04-02 16:47:21 -04:00
Cole Robinson
1269b549c4 tests: test_urls: Enable f28 development test 2018-03-29 19:45:33 -04:00
Cole Robinson
a712549b2b tests: test_urls: Use https for debian-daily
It converts to http to https but that takes time, so fix it
2018-03-29 19:45:33 -04:00
Cole Robinson
ad13c57dc5 urlfetch: Formalize the failed hostname check
This heuristic is only valid for http connections, everything
else will fail way earlier in the process
2018-03-29 19:45:33 -04:00
Cole Robinson
70820790ec urlfetcher: Use persistent HTTP session
This shaves 20 seconds off the URL test suite, so probably helps
regular users too :)
2018-03-29 19:45:33 -04:00
Cole Robinson
5055d7bd19 urlfetcher: Clean up RHEL version parsing/handling
Drop SLDistro entirely because it adds nothing, just make it an
alias of Centos. Drop some old RHEL version logic. Tweak test cases
2018-03-29 19:45:33 -04:00
Cole Robinson
9dccd5d52d urlfetch: Add caching layer
Add an external caching layer that handles tracking all data we
need as part of distro URL detection that is also needed during
distro __init__. This way we can make is_valid() static and quick,
and move all the variant hackery cleary into __init__ routines.
This makes the code logic much easier to follow
2018-03-29 19:45:33 -04:00
Cole Robinson
b9e72b8609 urldetect: Move treeinfo media checking into Treeinfo class
Rather than in the base Distro class. Simplifies things a bit
2018-03-29 16:23:57 -04:00
Cole Robinson
7dacc8502e urldetect: Move distro checking out of isValidStore
We have a big mix of Distro state checking across __init__,
extrnal treeinfo/content scraping, and isValidStore(). This removes
the latter category
2018-03-29 16:23:57 -04:00
Cole Robinson
54066e1315 urldetect: Drop ubuntu _is_tree_iso
It's not wired up to anything which looks like it got dropped in
an older refactoring. I can't find from the mailing list what
media case this was required for, and my local test suite doesn't
need it, so it might not even be required anymore.
2018-03-29 16:23:57 -04:00
Cole Robinson
1f8b712508 urldetect: Remove the _xen_kernel_paths distinction
Just have one kernel path list, and if type=="xen" and we think
xen might have its own kernel path, prepend that to the list of
pairs to check.

Nowadays xen kernel == hvm kernel for new distros, so we shouldn't
force having a specific xen whitelist
2018-03-29 16:23:57 -04:00
Cole Robinson
fddb1de0f4 urldetect: s/name/PRETTY_NAME/g
And use class name in logging instead of the pretty name
2018-03-29 16:23:57 -04:00
Cole Robinson
5aedc0aff7 urldetect: Drop GenericDistro, non-treeinfo redhat bits
non-treeinfo redhat only applies to pre RHEL5.4 and very old
Fedora. It's not worth it anymore to slow down all URL lookups
and maintain code complexity to handle such long out of date
distros.

GenericDistro doesn't actually apply to any public trees that I
can find, except for some with TreeInfo. So turn it into
GenericTreeinfoDistro. If random URL trees want to work with
virt-install, add a treeinfo file
2018-03-29 16:23:57 -04:00
Cole Robinson
a8522032eb virtinst: Split out urldetect.py from urlfetcher.py
urldetect.py has all the distro metadata and parsing logic,
urlfetcher.py has the http/ftp/iso/etc. fetching logic
2018-03-28 18:46:07 -04:00
Cole Robinson
6e2e18ccf8 urlfetcher: Split up SUSE content parsing a bit
Add comments for what each parsed line actually looks like
2018-03-28 17:58:11 -04:00
Cole Robinson
35df66c1ed tests: test_urls: Make fedora distro checking a bit smarter
Rather than constantly require updating distro values for latest
Fedora when osinfo-db catches up, build some smarts into the
test suite
2018-03-28 14:56:52 -04:00
Cole Robinson
74f2fb73fd tests: test_urls: Rename distroobj->testdata
Makes it much more clear what it is
2018-03-28 14:40:41 -04:00
Cole Robinson
01b665a6c3 urlfetcher: Throw error if iso _grabber file doesn't exist
isoinfo won't error here at least for me on Fedora 28, so
use hasFile to confirm
2018-03-28 14:02:23 -04:00
Cole Robinson
46ec093a28 virt-xml: Make it more clear when changes take effect
shutdown could be interpreted as a soft reboot, which won't
apply the changes
2018-03-25 19:22:28 -04:00
Cole Robinson
bd891eb380 virtcli: Add python3 version check
Assume 3.4 is needed, we may support earlier but I doubt anyone
is going to get all the deps in place on a distro that old
2018-03-21 18:00:38 -04:00
Cole Robinson
d692b6d51e spec: Document the explicit dconf dep 2018-03-21 17:10:30 -04:00
Cole Robinson
60888fb7f5 spec: Drop dbus-x11 dep
This came from: https://bugzilla.redhat.com/show_bug.cgi?id=1039803

Seems dconf and gconf before it would use dbus-libs which would
in turn try to use dbus-launch from dbus-x11. They didn't have
a dep on dbus-x11 for *reasons*

Nowadays dconf and virt-manager both use gdbus which is a native
dbus implementation and does not use dbus-launch or have any hard
dependency on x11 AFAICT, so this dep is not required.
2018-03-21 17:02:06 -04:00
Cole Robinson
8bca2526ab spec: Drop gnome-icon-theme dep
We don't build for rhel7 anymore, and modern gnome stack has
proper deps on adwaita-icon-theme nowadays
2018-03-21 16:49:00 -04:00
Cole Robinson
b238718347 tests: uitests: Omit /usr for coverage
like we do for regular test suite coverage
2018-03-21 16:25:07 -04:00