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

[libvirt] [PATCH 2/7] Revert "Enable virDomainBlockPull in the python API."



This reverts commit d74b86f5d6ecae3d18a391f90a918fcac75914db.

Conflicts:

	python/generator.py
---
 python/generator.py             |    5 ++-
 python/libvirt-override-api.xml |   14 ----------
 python/libvirt-override.c       |   53 ---------------------------------------
 3 files changed, 3 insertions(+), 69 deletions(-)

diff --git a/python/generator.py b/python/generator.py
index a3ebcf9..81eaadf 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -184,6 +184,8 @@ def enum(type, name, value):
 functions_failed = []
 functions_skipped = [
     "virConnectListDomains",
+    'virDomainBlockPull',
+    'virDomainGetBlockPullInfo',
 ]

 skipped_modules = {
@@ -200,6 +202,7 @@ skipped_types = {
      'virStreamEventCallback': "No function types in python",
      'virEventHandleCallback': "No function types in python",
      'virEventTimeoutCallback': "No function types in python",
+     'virDomainBlockPullInfoPtr': "Not implemented yet",
 }

 #######################################################################
@@ -366,8 +369,6 @@ skip_impl = (
     'virDomainSendKey',
     'virNodeGetCPUStats',
     'virNodeGetMemoryStats',
-    'virDomainBlockPull',
-    'virDomainGetBlockPullInfo',
 )


diff --git a/python/libvirt-override-api.xml b/python/libvirt-override-api.xml
index b800941..01207d6 100644
--- a/python/libvirt-override-api.xml
+++ b/python/libvirt-override-api.xml
@@ -320,19 +320,5 @@
       <arg name='flags' type='unsigned int' info='flags, curently unused'/>
       <return type='int' info="0 on success, -1 on error"/>
     </function>
-    <function name='virDomainBlockPull' file='python'>
-      <info>Initiate an incremental BlockPull for the given disk</info>
-      <arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
-      <arg name='path' type='const char *' info='Fully-qualified filename of disk'/>
-      <arg name='flags' type='unsigned int' info='fine-tuning flags, currently unused, pass 0.'/>
-      <return type='virDomainBlockPullInfo' info='A dictionary containing progress information.' />
-    </function>
-    <function name='virDomainGetBlockPullInfo' file='python'>
-      <info>Get progress information for a background BlockPull operation</info>
-      <arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
-      <arg name='path' type='const char *' info='Fully-qualified filename of disk'/>
-      <arg name='flags' type='unsigned int' info='fine-tuning flags, currently unused, pass 0.'/>
-      <return type='virDomainBlockPullInfo' info='A dictionary containing progress information.' />
-    </function>
   </symbols>
 </api>
diff --git a/python/libvirt-override.c b/python/libvirt-override.c
index 837c9a6..8be9af7 100644
--- a/python/libvirt-override.c
+++ b/python/libvirt-override.c
@@ -2415,57 +2415,6 @@ libvirt_virDomainGetJobInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
     return(py_retval);
 }

-static PyObject *
-libvirt_virDomainBlockPullImpl(PyObject *self ATTRIBUTE_UNUSED,
-                               PyObject *args, int infoOnly) {
-    virDomainPtr domain;
-    PyObject *pyobj_domain;
-    const char *path;
-    unsigned int flags;
-    virDomainBlockPullInfo info;
-    int c_ret;
-    PyObject *ret;
-
-    if (!PyArg_ParseTuple(args, (char *)"Ozi:virDomainStreamDiskInfo",
-                          &pyobj_domain, &path, &flags))
-        return(NULL);
-    domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
-
-LIBVIRT_BEGIN_ALLOW_THREADS;
-    if (infoOnly)
-        c_ret = virDomainGetBlockPullInfo(domain, path, &info, flags);
-    else
-        c_ret = virDomainBlockPull(domain, path, &info, flags);
-LIBVIRT_END_ALLOW_THREADS;
-
-    if (c_ret == -1)
-        return VIR_PY_NONE;
-
-    if ((ret = PyDict_New()) == NULL)
-        return VIR_PY_NONE;
-
-    PyDict_SetItem(ret, libvirt_constcharPtrWrap("cur"),
-                   libvirt_ulonglongWrap(info.cur));
-    PyDict_SetItem(ret, libvirt_constcharPtrWrap("end"),
-                   libvirt_ulonglongWrap(info.end));
-
-    return ret;
-}
-
-static PyObject *
-libvirt_virDomainBlockPull(PyObject *self ATTRIBUTE_UNUSED,
-                           PyObject *args)
-{
-    return libvirt_virDomainBlockPullImpl(self, args, 0);
-}
-
-static PyObject *
-libvirt_virDomainGetBlockPullInfo(PyObject *self ATTRIBUTE_UNUSED,
-                                  PyObject *args)
-{
-    return libvirt_virDomainBlockPullImpl(self, args, 1);
-}
-

 /*******************************************
  * Helper functions to avoid importing modules
@@ -3925,8 +3874,6 @@ static PyMethodDef libvirtMethods[] = {
     {(char *) "virDomainGetJobInfo", libvirt_virDomainGetJobInfo, METH_VARARGS, NULL},
     {(char *) "virDomainSnapshotListNames", libvirt_virDomainSnapshotListNames, METH_VARARGS, NULL},
     {(char *) "virDomainRevertToSnapshot", libvirt_virDomainRevertToSnapshot, METH_VARARGS, NULL},
-    {(char *) "virDomainBlockPull", libvirt_virDomainBlockPull, METH_VARARGS, NULL},
-    {(char *) "virDomainGetBlockPullInfo", libvirt_virDomainGetBlockPullInfo, METH_VARARGS, NULL},
     {NULL, NULL, 0, NULL}
 };

-- 
1.7.4.4


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