IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The bindings generator can't generate proper bindings for FD passing so
the bindings need to be implemented manually both the python wrapper and
the C backend.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
None should be compared with "is None" instead of "== None", as the
later would invoke a "__cmp__()" method.
Signed-off-by: Philipp Hahn <hahn@univention.de>
The fields have been deprecated in C with
git:f60dc0bc09f09c6817d6706a9edb1579a3e2b2b8
They are only passed to the libvirtError constructor, but not stored for
later or used anywhere else.
sed -ri '/raise libvirtError/s/, \w+=self(\._dom)?//' *.py
Signed-off-by: Philipp Hahn <hahn@univention.de>
Copies heavily from existing virDomainSnapshot handling, regarding
what special cases the generator has to be taught and what overrides
need to be written.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
The virDomainGetTime returns either a dict or None, but the python
glue layer for checking for '-1'. Thus it failed to raise an
exception on error.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
When pass None or a empty dictionary to time, it will report
error. This commit allows a one-element dictionary which contains
just 'seconds' field, which results in the same as passing 0 for
'nseconds' field. Moreover, dict is checked for unknown fields.
Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
While the setter can be generated automatically, the getter is not.
However, it would be a lot easier if they both share the same logic:
a python dictionary to represent the time: dict['seconds'] to
represent seconds, and dict['nseconds'] to represent nanoseconds.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Add binding for the new virDomainFSFreeze and virDomainFSThaw functions
added in libvirt 1.2.5. These require override since these take a list
of mountpoints path string. The methods are named 'fsFreeze' and
'fsThaw'.
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
With container based virt, it is useful to be able to pass
pre-opened file descriptors to the container init process.
This allows for containers to be auto-activated from incoming
socket connections, passing the active socket into the container.
To do this, introduce a pair of new APIs, virDomainCreateXMLWithFiles
and virDomainCreateWithFiles, which accept an array of file
descriptors. For the LXC driver, UNIX file descriptor passing
will be used to send them to libvirtd, which will them pass
them down to libvirt_lxc, which will then pass them to the container
init process.
This will only be implemented for LXC right now, but the design
is generic enough it could work with other hypervisors, hence
I suggest adding this to libvirt.so, rather than libvirt-lxc.so
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
The following four functions have not changed because default arguments
have to come after positional arguments. Changing them will break the
the binding APIs.
migrate(self, dconn, flags, dname, uri, bandwidth):
migrate2(self, dconn, dxml, flags, dname, uri, bandwidth):
migrateToURI(self, duri, flags, dname, bandwidth):
migrateToURI2(self, dconnuri, miguri, dxml, flags, dname, bandwidth):
This adds support for the new virDomainListAllSnapshots (a domain
function) and virDomainSnapshotListAllChildren (a snapshot function)
to the libvirt-python bindings. The implementation is done manually
as the generator does not support wrapping lists of C pointers into
python objects.
* python/libvirt-override.c (libvirt_virDomainListAllSnapshots)
(libvirt_virDomainSnapshotListAllChildren): New functions.
* python/libvirt-override-api.xml: Document them.
* python/libvirt-override-virDomain.py (listAllSnapshots): New
file.
* python/libvirt-override-virDomainSnapshot.py (listAllChildren):
Likewise.
* python/Makefile.am (CLASSES_EXTRA): Ship them.