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
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
b6dcee8eb7
Use consistent and minimal license header for every file
2018-03-21 07:29:40 -04:00
Cole Robinson
6954c6774a
tests: Fix running testsuite on older libvirt
...
If we try to run the testsuite on anything older than libvirt 3.1,
it immediately throws an exception before processing any tests,
due to choking on parsing drm bits from testdriver.xml. This global
failure is only due to sloppy coding though.
Turn all test cases that use testdriver.xml into skips in this case,
so we can at least get some test coverage otherwise.
2018-02-22 16:01:24 -05:00
Cole Robinson
c05cd52772
setup: Use CLIState for setting --debug value
2018-02-22 15:18:47 -05:00
Cole Robinson
8917305a6e
Don't use count() for substring checking
...
Use the idiomatic 'X in Y'
2018-02-14 11:08:09 -05:00
Radostin Stoyanov
978fb25ac7
Wrap keys(), values() in a list
...
In Python 3 dict.values() [1] , dict.keys() [2] and dict.items() [3]
return a view [4] of the dictionary’s values, keys and items.
In Python 2 these functions return a list. [5] [6] [7]
To resolve this we can convert the result of these function to a list.
[1] https://docs.python.org/3/library/stdtypes.html#dict.values
[2] https://docs.python.org/3/library/stdtypes.html#dict.keys
[3] https://docs.python.org/3/library/stdtypes.html#dict.items
[4] https://docs.python.org/3/library/stdtypes.html#dict-views
[5] https://docs.python.org/2/library/stdtypes.html#dict.items
[6] https://docs.python.org/2/library/stdtypes.html#dict.keys
[7] https://docs.python.org/2/library/stdtypes.html#dict.values
2018-02-06 18:49:17 -05:00
Radostin Stoyanov
810ee09292
Replace ConfigParser with configparser
...
The ConfigParser module has been renamed to configparser in
Python 3. [1] Backport of this changes is also available for
Python 2. [2]
[1] https://docs.python.org/2/library/configparser.html
[2] https://pypi.python.org/pypi/configparser/3.2.0r3
2018-02-06 18:49:17 -05:00
Cole Robinson
5e70cee128
tests: urls: Fix pylint
2018-01-27 16:12:11 -05:00
Cole Robinson
1f23d60725
tests: urls: Tweak output and logging a bit
2018-01-27 15:28:12 -05:00
Cole Robinson
c9ca8ab7ce
tests: test_urls: Simplify adding in local tests
...
I'll use this to scoop up local ISOs for comprehensive testing
locally.
2018-01-06 14:04:34 -05:00
Cole Robinson
c7ed34de63
tests: test_urls: Big rework
...
Move all the test cases to an .ini file. Various cleanups and
minor improvements throughout
2018-01-06 14:04:34 -05:00
Cole Robinson
9b58ea4e51
tests: test_urls: Update URL list
2017-11-22 17:32:20 -05:00
Cole Robinson
2d27142c9c
tests: urls: check for latest ubuntu LTS
2017-09-19 19:55:57 -04:00
Pavel Hrdina
4b108a8c75
tests: fix pylint
...
Commit g785352ea removed unused variable and felt unused import.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:55:47 +02:00
Cole Robinson
170a169fcc
test_urls: Remove dead link
2017-09-08 16:58:45 -04:00
Cole Robinson
785352ea60
tests: Fix pylint
2017-09-08 16:55:49 -04:00
Cole Robinson
427592bc7b
tests: test_urls: Add debian s390x example
2017-08-29 11:57:45 -04:00
Cole Robinson
9cffcef66e
tests: test_urls: Update
...
And only have one ftp test, since ftp is sloooow
2017-08-29 11:57:14 -04:00
Cole Robinson
d71ef83942
tests: test_urls: Rework to better handle multiple archs
2017-08-29 11:57:14 -04:00
Radostin Stoyanov
b93cc3bbc9
pycodestyle: Do not use bare 'except:'
...
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
2017-08-02 13:57:43 -04:00
Cole Robinson
69f19ca614
tests: test_urls: Update
2017-05-16 17:16:59 -04:00
Cole Robinson
62feeb02a8
Switch to python3 style 'except X as Y' notation
...
Which also works with python2.7
2017-05-05 14:52:11 -04:00
Cole Robinson
e369580450
tests: test_urls: update data
2016-12-13 14:36:24 -05:00
Cole Robinson
64c286e68b
tests: Fix pep8 issue
2016-08-16 20:04:08 -04:00
Cole Robinson
cf1b820e19
tests: urls: Update fedora24 test
2016-08-16 19:05:54 -04:00
Cole Robinson
137a6c4600
tests: urls: Add centos ppc64le URL
2016-08-16 18:52:09 -04:00
Cole Robinson
51e8b9df11
tests: test_urls: Add opensuse tumbleweed test
2016-06-07 13:23:14 -04:00
Cole Robinson
2fbf8e9821
tests: test_urls: Update with latest libosinfo
2016-04-26 08:57:18 -04:00
Cole Robinson
f4dfb6de9d
Fix recent pylint/pep8 output
2016-04-18 16:42:12 -04:00
Cole Robinson
f4bf4ef349
urlfetcher: Don't set os_variant=linux
...
os_variant=linux is basically meaningless; it doesn't set any useful
defaults. better to be explicit that we didn't detect any meaningful
os_variant, to trigger the virt-install warning
2016-04-07 17:43:53 -04:00
Cole Robinson
9d886e1440
test_urls: Better error reporting for URL lookup failure
2016-04-07 17:13:17 -04:00
Cole Robinson
31f5fff9b8
test_urls: Add fedora dev tree tests
2016-04-07 16:46:37 -04:00
Cole Robinson
c92507baea
urlfetcher: Fix ftp URLs with ports in them
...
Reported-by: int-0 <tobias.deb@gmail.com>
2016-03-24 16:15:21 -04:00
Cole Robinson
f9297f3bc3
test_urls: Update with latest URLs
2016-03-24 16:04:06 -04:00
Cole Robinson
fdfddff6a4
test_urls: Improve error reporting
2016-03-24 15:57:34 -04:00
Cole Robinson
d1d202bb1f
test_urls: Update and improve an error message
2015-11-24 21:59:26 -05:00
Cole Robinson
3091b2134a
test_urls: Use ftp for debian URLs for better FTP testing
2015-09-14 10:35:51 -04:00
Cole Robinson
fd6b09ac63
tests: Update test_urls
2015-09-11 11:49:43 -04:00
Cole Robinson
697164f2e5
virtinst: Centralize urlgrabber meter lookup
...
We will eventually want to drop this dep since it's basically dead
upstream, this is a small step in that direction
2015-09-06 15:09:44 -04:00
Cole Robinson
832293f3fd
test_urls: Update latest distro detection
2015-06-05 16:30:53 -04:00
Lin Ma
9b99eff73d
test_urls: Add opensuse 13.x tests
...
Because the content file is changed little bit in 13.2, Both of
urls of 13.1 and 13.2 need to be tested.
From: Charles Arnold <carnold@suse.com>
Signed-off-by: Lin Ma <lma@suse.com>
2015-06-05 16:00:20 -04:00
Cole Robinson
393aed191e
urlfetcher: Detect centos URLs as centos, not rhel variants
2015-04-04 15:41:13 -04:00
Cole Robinson
82e9684fa6
urlfetcher: Make debian treearch checking more generic
...
Use regex parsing rather than a whitelist
2015-03-27 13:06:26 -04:00
Cole Robinson
ba95aa91e6
test_urls: Update fedora URLs
2015-03-26 19:28:53 -04:00
Chen Hanxiao
08007d56fe
test_urls: remove commented fedora21 alpha urls
...
Discoverd by pep8 '# ' style.
introduced by 92b443df
We forgot to delete it.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-12-12 10:10:17 +08:00
Cole Robinson
92b443df55
test_urls: Update
2014-12-10 13:39:18 -05:00
Cole Robinson
2e7d477156
urlfetcher: Bunch of distro detection fixes
...
And update test_urls to ensure it's passing
2014-09-06 16:42:09 -04:00