| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
|
|
|
| |
This will help us in upcoming patches add xpath subarguments to
cli device options
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
If you call get_xml() on a device that's part of a Guest class,
the last element has correct indent but not the first element.
Steal the indent from the last element and prepend it to the returned
XML
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The --xml option allows users to request raw XML edits to virt-install
or virt-xml generated XML. This gives users a bit of a workaround
incase we don't have proper support for some XML property. The --xml
option can gain more features in the future if it makes sense, like
setting XML namespaces for example.
Basic usage is like: virt-install --xml ./@foo=bar ...
Which will change the generated <domain> XML to have
<domain foo='bar' ...
virt-xml works similarly. It can only be combined with --edit currently.
This only works with xpaths rooted against the entire document.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
|
|
|
| |
Raise them directly instead of adding the hard to read conditional
into the function
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
|
|
|
| |
So in the code we can prefix comments with 'translators:' before
translated strings to have them show up in .pot file output
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
| |
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
|
| |
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.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 only functions left in there are largely for xml handling, so
make it explicit
|
| |
|
| |
|
|
|
|
| |
This will be used for UI XML editing of devices
|
|
|
|
| |
Ensure that for example a DeviceDisk is actually passed <disk> XML
|
|
|
|
|
| |
If libvirt changes XML handling in the future, we shouldn't restrict
what we return to the user with the is_yesno/is_onoff convertors
|
| |
|
|
|
|
|
|
|
| |
Similar to what was done in libvirt. See these commits:
https://github.com/libvirt/libvirt/commit/600462834f4ec1955a9a48a1b6b4a390b9c31553
https://github.com/libvirt/libvirt/commit/c99e954973ea330e32e392c71ed17db5b359381b
|
|
|
|
|
|
|
| |
This is important for the virtio-win case: --cdrom media should
always be ordered first, so it's the boot preference.
https://www.redhat.com/archives/virt-tools-list/2018-September/msg00048.html
|
| |
|
|
|
|
| |
So we don't need to update xmlapi.py to account for additions
|
|
|
|
|
| |
Unfold most of them into manual property() wrappers. It's a bit
noisier but the logic is easier to follow.
|
|
|
|
| |
Fold the interface bits into the existing validate() function
|
|
|
|
|
|
| |
It was always very hard to follow the logic chain with default_*
settings, having it explicit in set_defaults() function calls is
much easier to follow and more flexible for the future
|
|
|
|
|
|
|
|
| |
And move all the Guest logic there.
We need to add an xmlbuilder helper _prop_is_unset to be able to
determine if a bool property is unset, in our quest to remove
default_* xmlbuilder bits
|
|
|
|
| |
The config part is redundant. Should have done this a long time ago
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The copyright headers in every file were chjanged in this previous commit
commit b6dcee8eb7ec4de999058c187162fe4aedef36b4
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
|
|
|
|
|
| |
Add a few more mappings to simplify certain lookups, and add
some more validation to prevent programming errors
|
|
|
|
| |
No reason for it to be privatized, could be useful in some cases
|
|
|
|
|
| |
This only has one user in interface.py. That case is indeed weird
but we can implement it there, rather than in generic code
|
|
|
|
| |
Let's us drop proporder
|
|
|
|
|
|
| |
propertys already give us ways to access the backing class, and
switching to this method lets us drop some infrastructure in
xmlbuilder
|
|
|
|
|
| |
The only user was Guest._devices hackery, which has been dropped,
so clean up all this stuff
|
| |
|
|
|
|
|
| |
Previous state was inconsistenty and needlessly wordy. Fix up
a few other class namings that have redundant Virtual in the name
|
| |
|
|
|
|
| |
And tighten up the xmlbuilder xmlns hackery
|
|
|
|
| |
Otherwise libxml2 whines
|
|
|
|
|
| |
This data never gets to the user and largely is just duplicating
libvirt docs. It's redundant
|
|
|
|
|
| |
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
|
|
|
|
|
| |
We were implicitly depending on dict hash ordering here, which
was causing some different XML output in centos CI
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This streamlines the actual libxml2 interaction quite a bit
|
|
|
|
| |
Makes the boundaries clearer
|
|
|
|
|
| |
We don't need to carry around a separate xml_node. Dropping it simplifies
a few things
|
| |
|
| |
|
|
|
|
| |
Use the idiomatic 'X in Y'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|