Re: [PATCH python 1/2] Add support for secret event APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/09/2017 07:10 PM, Daniel P. Berrange wrote:
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  generator.py                   |   2 +
>  libvirt-override-virConnect.py |  43 +++++++++
>  libvirt-override.c             | 203 +++++++++++++++++++++++++++++++++++++++++
>  sanitytest.py                  |   3 +
>  4 files changed, 251 insertions(+)
> 
> diff --git a/generator.py b/generator.py
> index afb1d34..e9be8b1 100755
> --- a/generator.py
> +++ b/generator.py
> @@ -528,6 +528,8 @@ skip_function = (
>      'virConnectStoragePoolEventDeregisterAny', # overridden in virConnect.py
>      'virConnectNodeDeviceEventRegisterAny',   # overridden in virConnect.py
>      'virConnectNodeDeviceEventDeregisterAny', # overridden in virConnect.py
> +    'virConnectSecretEventRegisterAny',   # overridden in virConnect.py
> +    'virConnectSecretEventDeregisterAny', # overridden in virConnect.py
>      'virSaveLastError', # We have our own python error wrapper
>      'virFreeError', # Only needed if we use virSaveLastError
>      'virConnectListAllDomains', # overridden in virConnect.py
> diff --git a/libvirt-override-virConnect.py b/libvirt-override-virConnect.py
> index fb3d476..d26b480 100644
> --- a/libvirt-override-virConnect.py
> +++ b/libvirt-override-virConnect.py
> @@ -392,6 +392,49 @@
>          self.nodeDeviceEventCallbackID[ret] = opaque
>          return ret
>  
> +    def _dispatchSecretEventLifecycleCallback(self, net, event, detail, cbData):
> +        """Dispatches events to python user secret lifecycle event callbacks
> +        """
> +        cb = cbData["cb"]
> +        opaque = cbData["opaque"]
> +
> +        cb(self, virSecret(self, _obj=net), event, detail, opaque)
> +        return 0
> +
> +    def _dispatchSecretEventGEnericCallback(self, net, cbData):

s/GE/Ge/

And also probably just a leftover from copy-paste from network code, but
s/net/secret/g

> +        """Dispatches events to python user secret generic event callbacks
> +        """
> +        cb = cbData["cb"]
> +        opaque = cbData["opaque"]
> +
> +        cb(self, virSecret(self, _obj=net), opaque)
> +        return 0
> +

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux