summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@cardoe.com>2013-11-21 08:47:08 -0600
committerDoug Goldstein <cardoe@cardoe.com>2013-11-21 14:20:45 -0600
commit45ac117cf619bed49d30d6d330fdd6cc8a4bcdbb (patch)
tree22d23851af6d30a4944e27dcbee70744d46ac704
parent4b6944d3c0ff43683fc310da061fac6e05c57b66 (diff)
downloadlibvirt-python-v9-45ac117cf619bed49d30d6d330fdd6cc8a4bcdbb.zip
libvirt-python-v9-45ac117cf619bed49d30d6d330fdd6cc8a4bcdbb.tar.gz
libvirt-python-v9-45ac117cf619bed49d30d6d330fdd6cc8a4bcdbb.tar.xz
python: remove virConnectGetCPUModelNames from globals
Commit de51dc9c9aed0e615c8b301cccb89f4859324eb0 primarily added virConnectGetCPUModelNames as libvirt.getCPUModelNames(conn, arch) instead of libvirt.virConnect.getCPUModelNames(arch) so revert the code that does the former while leaving the code that does the later. This is the rest of the patch that was ACK'd by Dan but I committed only the partial patch in 6a8b8ae.
-rwxr-xr-xgenerator.py1
-rw-r--r--libvirt-override.c53
2 files changed, 1 insertions, 53 deletions
diff --git a/generator.py b/generator.py
index 0e86bed..20f5dff 100755
--- a/generator.py
+++ b/generator.py
@@ -449,6 +449,7 @@ skip_impl = (
'virNodeGetCPUMap',
'virDomainMigrate3',
'virDomainMigrateToURI3',
+ 'virConnectGetCPUModelNames',
)
lxc_skip_impl = (
diff --git a/libvirt-override.c b/libvirt-override.c
index 6546dd1..2f520c1 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -2276,58 +2276,6 @@ libvirt_virConnectGetVersion(PyObject *self ATTRIBUTE_UNUSED,
return PyInt_FromLong(hvVersion);
}
-PyObject *
-libvirt_virConnectGetCPUModelNames(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args)
-{
- int c_retval;
- virConnectPtr conn;
- PyObject *rv = NULL, *pyobj_conn;
- char **models = NULL;
- size_t i;
- int flags = 0;
- const char *arch = NULL;
-
- if (!PyArg_ParseTuple(args, (char *)"Osi:virConnectGetCPUModelNames",
- &pyobj_conn, &arch, &flags))
- return NULL;
- conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
-
- LIBVIRT_BEGIN_ALLOW_THREADS;
-
- c_retval = virConnectGetCPUModelNames(conn, arch, &models, flags);
-
- LIBVIRT_END_ALLOW_THREADS;
-
- if (c_retval == -1)
- return VIR_PY_INT_FAIL;
-
- if ((rv = PyList_New(c_retval)) == NULL)
- goto error;
-
- for (i = 0; i < c_retval; i++) {
- PyObject *str;
- if ((str = PyString_FromString(models[i])) == NULL)
- goto error;
-
- PyList_SET_ITEM(rv, i, str);
- }
-
-done:
- if (models) {
- for (i = 0; i < c_retval; i++)
- VIR_FREE(models[i]);
- VIR_FREE(models);
- }
-
- return rv;
-
-error:
- Py_XDECREF(rv);
- rv = VIR_PY_INT_FAIL;
- goto done;
-}
-
static PyObject *
libvirt_virConnectGetLibVersion(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
@@ -7228,7 +7176,6 @@ static PyMethodDef libvirtMethods[] = {
#include "libvirt-export.c"
{(char *) "virGetVersion", libvirt_virGetVersion, METH_VARARGS, NULL},
{(char *) "virConnectGetVersion", libvirt_virConnectGetVersion, METH_VARARGS, NULL},
- {(char *) "virConnectGetCPUModelNames", libvirt_virConnectGetCPUModelNames, METH_VARARGS, NULL},
{(char *) "virConnectGetLibVersion", libvirt_virConnectGetLibVersion, METH_VARARGS, NULL},
{(char *) "virConnectOpenAuth", libvirt_virConnectOpenAuth, METH_VARARGS, NULL},
{(char *) "virConnectListDomainsID", libvirt_virConnectListDomainsID, METH_VARARGS, NULL},