Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:Ardana:9:CentOS:7.5
python-libvirt-python
dbae2628-add-virDomainGetLaunchSecurityInfo.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dbae2628-add-virDomainGetLaunchSecurityInfo.patch of Package python-libvirt-python
commit dbae262811f49ebf9a1c94cea6ffd4c5d8798476 Author: Erik Skultety <eskultet@redhat.com> Date: Tue Jun 12 16:06:23 2018 +0200 Add support for virDomainGetLaunchSecurityInfo Libvirt recently introduced support for getting launch security parameters, most notably AMD SEV VM memory measurement. This API can't be generated as it's using typed parameters which we need to allocate. Signed-off-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Index: libvirt-python-4.0.0/generator.py =================================================================== --- libvirt-python-4.0.0.orig/generator.py +++ libvirt-python-4.0.0/generator.py @@ -488,6 +488,7 @@ skip_impl = ( 'virDomainGetPerfEvents', 'virDomainSetPerfEvents', 'virDomainGetGuestVcpus', + 'virDomainGetLaunchSecurityInfo', ) lxc_skip_impl = ( Index: libvirt-python-4.0.0/libvirt-override-api.xml =================================================================== --- libvirt-python-4.0.0.orig/libvirt-override-api.xml +++ libvirt-python-4.0.0/libvirt-override-api.xml @@ -717,5 +717,11 @@ <arg name='flags' type='unsigned int' info='extra flags; not used yet, so callers should always pass 0'/> <return type='int' info="dictionary of vcpu data returned by the guest agent"/> </function> + <function name='virDomainGetLaunchSecurityInfo' file='python'> + <info>Get launch security info for a domain</info> + <return type='char *' info='None in case of error, returns a dictionary of params'/> + <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> + <arg name='flags' type='int' info='unused, always pass 0'/> + </function> </symbols> </api> Index: libvirt-python-4.0.0/libvirt-override.c =================================================================== --- libvirt-python-4.0.0.orig/libvirt-override.c +++ libvirt-python-4.0.0/libvirt-override.c @@ -9640,6 +9640,42 @@ libvirt_virStreamRecvFlags(PyObject *sel #endif /* LIBVIR_CHECK_VERSION(3, 4, 0) */ +#if LIBVIR_CHECK_VERSION(4, 0, 0) +static PyObject * +libvirt_virDomainGetLaunchSecurityInfo(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) +{ + PyObject *pyobj_dom = NULL; + PyObject *ret = NULL; + + virDomainPtr dom = NULL; + virTypedParameterPtr params = NULL; + int nparams = 0; + unsigned int flags = 0; + int i_retval; + + if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetLaunchSecurityInfo", + &pyobj_dom, &flags)) + return NULL; + dom = (virDomainPtr) PyvirDomain_Get(pyobj_dom); + + LIBVIRT_BEGIN_ALLOW_THREADS; + i_retval = virDomainGetLaunchSecurityInfo(dom, ¶ms, &nparams, flags); + LIBVIRT_END_ALLOW_THREADS; + + if (i_retval < 0) { + ret = VIR_PY_NONE; + goto cleanup; + } + + ret = getPyVirTypedParameter(params, nparams); + cleanup: + virTypedParamsFree(params, nparams); + return ret; +} +#endif /* LIBVIR_CHECK_VERSION(4, 0, 0) */ + + /************************************************************************ * * * The registration stuff * @@ -9873,6 +9909,9 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virStreamSendHole", libvirt_virStreamSendHole, METH_VARARGS, NULL}, {(char *) "virStreamRecvFlags", libvirt_virStreamRecvFlags, METH_VARARGS, NULL}, #endif /* LIBVIR_CHECK_VERSION(3, 4, 0) */ +#if LIBVIR_CHECK_VERSION(4, 0, 0) + {(char *) "virDomainGetLaunchSecurityInfo", libvirt_virDomainGetLaunchSecurityInfo, METH_VARARGS, NULL}, +#endif /* LIBVIR_CHECK_VERSION(4, 0, 0) */ {NULL, NULL, 0, NULL} };
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor