Cole Robinson
e70eb82db1
virt-install: Remove redundant isActive check
2018-02-22 20:49:07 -05:00
Cole Robinson
6f578ffeff
xmlbuilder: Remove get_xml_config prep wrappers
...
The only user was Guest, and in fact it's not needed for the standard
get_xml_config, only for the custom _get_install_xml. So drop it
2018-02-22 20:49:07 -05:00
Cole Robinson
472a52b170
virtconv: Drop all the chdir hackery
...
This was just lazy stuff to avoid having to assumble abspaths. Plus
it confuses cprofile
2018-02-22 20:49:07 -05:00
Cole Robinson
6cad350649
storage: Use a threading event to signal progress thread
...
Much more reactive and saves us time in the test suite
2018-02-22 19:12:23 -05:00
Cole Robinson
8c3388697c
virt-xml: Remove redundant XML roundtripping
...
Based on how we do diff reporting it doesn't accomplish anything anyways
2018-02-22 18:48:31 -05:00
Cole Robinson
8371a681b1
tests: Remove some redundant clitests
...
- Consolidate tests if they don't add coverage
- Remove some categories that aren't really required
2018-02-22 18:26:50 -05:00
Marc-André Lureau
55fa6c4caa
tests: add xmlparse/change vmcoreinfo test
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-02-22 16:23:40 -05:00
Marc-André Lureau
84bc80a900
virtinst/support: add SUPPORT_CONN_VMCOREINFO check
...
It is supported since qemu 2.11 and libvirt 3.10.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-02-22 16:23:40 -05:00
Marc-André Lureau
0a62ae0b7a
virtinst: add <vmcoreinfo/> feature
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-02-22 16:23:40 -05:00
Marc-André Lureau
39721cbe1b
connection: support checking for a list of features
...
Make check_support() accept a list of features.
This will let tests have more complex conditions on the features they
require.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-02-22 16:23:40 -05: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
62fecb09d3
tests: Create a smaller testsuite.xml
...
Right now, most test cases will create a libvirt test driver using
tests/testdriver.xml. This is problematic for 2 reasons:
1) testdriver.xml is 3500 lines of XML, and it's parsed hundreds of
times. Opening it is responsible for about 25% of test suite time
2) Older libvirt chokes on testdriver.xml, meaning the test suite will
be useless there. This is a recurring problem as new features are
added to testdriver.xml
Most test cases don't actually need all the test state in testdriver.xml
though. So this creates a smaller testsuite.xml which has a lower
libvirt requirement and is much quicker to parse. New XML bits should
continue to go into testdriver.xml so we can keep testsuite.xml as
the more stripped down option.
2018-02-22 15:44:06 -05:00
Cole Robinson
47afa912b3
setup: tests: Add --testverbose option
...
Can't use --verbose because it conflicts with setuptools options
2018-02-22 15:18:47 -05:00
Cole Robinson
c05cd52772
setup: Use CLIState for setting --debug value
2018-02-22 15:18:47 -05:00
Cole Robinson
8ee2f62efe
tests: Simplify clonetest.py
2018-02-22 15:18:41 -05:00
Cole Robinson
cb1c020c13
tests: Simplify virtconvtest.py
2018-02-22 15:18:06 -05:00
Cole Robinson
0adae891a6
tests: Use testdefault more
2018-02-22 15:08:09 -05:00
Cole Robinson
4205272384
tests: Add explicit test_dist target
...
Things like po validation don't need to be done on every test run
2018-02-20 12:33:57 -05:00
Cole Robinson
98d880a179
tests: Differentiate conn cache based on actual open URI
...
Since what is actually passed to libvirt here is what actually matters,
not all our fakeuri trickery
2018-02-20 12:21:45 -05:00
Cole Robinson
059fb7d0ba
xmlbuilder: Order child props before serializing
...
We were implicitly depending on dict hash ordering here, which
was causing some different XML output in centos CI
2018-02-20 11:41:04 -05:00
Cole Robinson
a8fb49dbe0
xmlapi: Fix some pylint
2018-02-20 11:27:55 -05:00
Cole Robinson
dfa0fa34b4
tests: xmlparse: Add a roundtrip metadata test
...
To ensure the xml engine doesn't mangle unknown XML
2018-02-20 11:23:37 -05:00
Cole Robinson
bc94666778
tests: xmlparse: Add qemu xmlns tests
...
Since reproducing via manual clitest is hard since it requires
XML on stdin
2018-02-20 11:23:37 -05:00
Cole Robinson
2bea4ecbf6
xmlapi: Some libxml2 simplifications
2018-02-20 11:23:37 -05:00
Cole Robinson
f04b284f21
xmlbuilder: Abstract libxml2 API and cleanup
...
Moves the libxml2 bits to a separate xmlapi file and class, a bunch
of cleanups to xmlbuilder internals dealing with XML stuff.
The main point is to experiment with different XML library impls,
since libxml2 is unfun to deal with and we are having python3
issues like
https://bugzilla.gnome.org/show_bug.cgi?id=776815
2018-02-20 11:23:37 -05:00
Cole Robinson
1302156265
setup: Add explicit error if running with python2
2018-02-16 12:37:54 -05:00
Cole Robinson
a20230091b
xmlbuilder: Move xpath string ops to their own class
...
This streamlines the actual libxml2 interaction quite a bit
2018-02-14 14:49:35 -05:00
Cole Robinson
dce3484e95
xmlbuilder: Move all libxml2 interaction to a single class
...
Makes the boundaries clearer
2018-02-14 11:29:12 -05:00
Cole Robinson
a853387866
xmlbuilder: Remove more redundant xml state
...
We don't need to carry around a separate xml_node. Dropping it simplifies
a few things
2018-02-14 11:08:09 -05:00
Cole Robinson
d108bbe143
Convert docstrings to standard reStructuredText param format
2018-02-14 11:08:09 -05:00
Cole Robinson
7cf0b310cc
capabilities: Move machine canonicalizing to capsinfo
...
Rather than overright XML content on every parse
2018-02-14 11:08:09 -05:00
Cole Robinson
c4fdd1d56a
xmlbuilder: Remove unused code
2018-02-14 11:08:09 -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
Cole Robinson
ab884b620f
virtconv: ovf: convert to ElementTree
2018-02-14 09:57:39 -05:00
Cole Robinson
fe728f899d
tests: virtconvtest: Accumulate more errors before exiting
2018-02-14 09:57:39 -05:00
Chen Hanxiao
a9596c7492
pylint: fix logging-too-few-args issue
...
From: Chen Hanxiao <chenhanxiao@gmail.com>
pylint complain:
Not enough arguments for logging format string (logging-too-few-args)
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2018-02-13 16:42:29 +08:00
Cole Robinson
4c7c45908f
manager: Fix mem, disk, net stats graphs (bz 1543896)
...
python2/3 division compat messed this up
https://bugzilla.redhat.com/show_bug.cgi?id=1543896
2018-02-09 14:02:04 -05:00
Cole Robinson
1550e70a4e
uitests: Silence noisy harmless warnings
...
Could mean a code error but more likely is just slightly racy
UI bits disappearing that we weren't looking for anyways, so hide
it behind a debug statement
2018-02-08 14:23:11 -05:00
Cole Robinson
8e7b5ed2d8
Drop __future__ imports, no longer needed
2018-02-08 14:08:23 -05:00
Cole Robinson
dae8642bb1
xmlbuilder: centralize adding child new child prop instances
...
Currently the domain CPU class has a child property like:
siblings = XMLChildProperty(_CPUCellSibling)
If a user wants to add a new sibling, we add a convenience function:
def add_sibling(self):
obj = _CPUCellSibling(self.conn)
self.add_child(obj)
return obj
Rather than require every child property to define a similar matching
helper function, this adds infrastructure in xmlbuilder to do this
generically for every child property. Now callers can do
obj = guest.cpu.siblings.add_new()
2018-02-08 14:03:47 -05:00
Cole Robinson
8819176ad4
xmlbuilder: Drop unused node_top_xpath
2018-02-07 15:45:38 -05:00
Cole Robinson
598be36862
xmlbuilder: drop is_build monkey patching
...
It's not needed
2018-02-07 15:38:30 -05:00
Cole Robinson
48037fcf6f
spec: Remove obsolete icon/desktop cache commands
...
Handled in Fedora for a while now
2018-02-06 19:02:53 -05:00
Cole Robinson
3cb33d381c
Update docs to use new setup.py invocation
2018-02-06 19:02:53 -05:00
Cole Robinson
b42e37be1f
Fix last bits of python3 pylint
2018-02-06 19:02:53 -05:00
Cole Robinson
de791136c1
setup: Use pylint-3
2018-02-06 19:02:53 -05:00
Cole Robinson
03971cef11
spec: Update for python3
...
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2018-02-06 19:02:53 -05:00
Cole Robinson
ddba9c1702
Switch to python3 in script shebang
...
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2018-02-06 18:56:15 -05:00
Cole Robinson
e47b34c05a
Fix initrdinject and urltests with py3
...
A few random issues scattered about
2018-02-06 18:56:15 -05:00
Cole Robinson
b8e2952a9c
connect: Fix urllib usage on py3
2018-02-06 18:56:15 -05:00