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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Update to test against very latest release. Since we dropped two
python versions, we can afford to add new libvirt version without
dropping a previous one.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The trusty gnutls version is too old to support modern libvirt
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The lxml package that we download with pip no longer supports either
of these versions of python.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The %{extra_release} field was previously populated by data from the old
autobuild.sh file but is no longer used.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Similar to libvirt_virDomainBlockCopy (and migration API's). Create
the code for the new API.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
If PyDict_Check fails, we should force an error rather than
blindly continuing on.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Need to free params like similar API's such as libvirt_virDomainMigrate3
and libvirt_virDomainMigrateToURI3.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
VIR_DOMAIN_EVENT_ID_IO_ERROR and VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
callbacks receive the same 'action' parameter, so also translate that
numeric action to a descriptive text for the first callback.
Signed-off-by: Philipp Hahn <hahn@univention.de>
ERROR_EVENTS translates the numeric 'action' argument to a description,
not the 'reason' argument which already contains a descriptive string
like 'enospc'.
> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/libvirt.py", line 4661, in _dispatchDomainEventIOErrorReasonCallback
> reason, opaque)
> File "libvirt-python/examples/event-test.py", line 536, in myDomainEventIOErrorReasonCallback
> dom.name(), dom.ID(), srcpath, devalias, action, ERROR_EVENTS[reason]))
> File "libvirt-python/examples/event-test.py", line 474, in __getitem__
> data = self.args[item]
> TypeError: tuple indices must be integers, not str
Fixes: f5928c6711
Signed-off-by: Philipp Hahn <hahn@univention.de>
Registering the same function twice using the old domainEventRegister()
interface would not work, as the function reference is used for
un-registering.
But it is not a problem with the new interface domainEventRegisterAny(),
as that returns a unique ID.
While at it also demonstrate the 'opaque' mechanism.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
If libvirtd terminates while event-test.py has an open connection to it,
it will crash with the following traceback:
> myConnectionCloseCallback: qemu:///session: Error
> Exception in thread libvirtEventLoop:
> Traceback (most recent call last):
> File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
> self.run()
> File "/usr/lib/python2.7/threading.py", line 754, in run
> self.__target(*self.__args, **self.__kwargs)
> File "examples/event-test.py", line 424, in virEventLoopPollRun
> eventLoop.run_loop()
> File "examples/event-test.py", line 242, in run_loop
> self.run_once()
> File "examples/event-test.py", line 187, in run_once
> libvirt.virEventInvokeFreeCallback(opaque)
> AttributeError: 'module' object has no attribute 'virEventInvokeFreeCallback'
>
> libvirt: XML-RPC error : internal error: client socket is closed
> Traceback (most recent call last):
> File "examples/event-test.py", line 872, in <module>
> main()
> File "examples/event-test.py", line 854, in main
> vc.secretEventDeregisterAny(id)
> File "/usr/lib/python2.7/dist-packages/libvirt.py", line 4987, in secretEventDeregisterAny
> if ret == -1: raise libvirtError ('virConnectSecretEventDeregisterAny() failed', conn=self)
> libvirt.libvirtError: internal error: client socket is closed
> Closing qemu:///session
Skip unregistering the event callbacks and closing the connection if the
connection is already broken / closed.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Add new events to prevent crash:
> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/libvirt.py", line 4601, in _dispatchDomainEventCallbacks
> cb(self, virDomain(self, _obj=dom), event, detail, opaque)
> File "libvirt-python/examples/event-test.py", line 505, in myDomainEventCallback1
> domDetailToString(event, detail)))
> File "libvirt-python/examples/event-test.py", line 484, in domDetailToString
> return domEventStrings[event][detail]
> IndexError: tuple index out of range
Signed-off-by: Philipp Hahn <hahn@univention.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
The gcc RPM is no longer part of the default build root.
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The use of non-versioned python2 macro names is deprecated in Fedora
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
While we correctly disable all public API bindings that rely on
virNWFilterBindingPtr, the generator is still creating a helper function
that needs it - libvirt_virNWFilterBinding_pointer. Making this helper
conditional is a little hairy, so just provide a trivial typedef to keep
it happy.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
We did not correctly mangle the API names in two cases, and we also
forgot to specialize the lookup method name in the sanity test.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>