From 5e11899803a9e74f7772bd8464802fab8e1c05d2 Mon Sep 17 00:00:00 2001 From: "Nikunj A. Dadhania" Date: Tue, 12 Oct 2010 15:43:27 +0200 Subject: Adding structure and defines for virDomainSet/GetMemoryParameters This patch adds a structure virMemoryParameter, it contains the name of the parameter and the type of the parameter along with a union. dv: + rename enums to VIR_DOMAIN_MEMORY_PARAM_* + remove some extraneous tabs v4: + Add unsigned int flags to the public api for future extensions v3: + Protoype for virDomainGetMemoryParameters and dummy python binding. v2: + Includes dummy python bindings for the library to build cleanly. + Define string constants like "hard_limit", etc. + re-order this patch. --- generator.py | 2 ++ libvirt-override-api.xml | 12 ++++++++++++ libvirt-override.c | 14 ++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/generator.py b/generator.py index d876df6..68009b9 100755 --- a/generator.py +++ b/generator.py @@ -306,6 +306,8 @@ skip_impl = ( 'virDomainGetSchedulerType', 'virDomainGetSchedulerParameters', 'virDomainSetSchedulerParameters', + 'virDomainSetMemoryParameters', + 'virDomainGetMemoryParameters', 'virDomainGetVcpus', 'virDomainPinVcpu', 'virSecretGetValue', diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index ca16993..f209608 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -162,6 +162,18 @@ + + Change the memory tunables + + + + + + Get the memory parameters, the @params array will be filled with the values. + + + + list the storage pools, stores the pointers to the names in @names diff --git a/libvirt-override.c b/libvirt-override.c index 54a84c2..c43ab15 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -371,6 +371,20 @@ libvirt_virDomainSetSchedulerParameters(PyObject *self ATTRIBUTE_UNUSED, return VIR_PY_INT_SUCCESS; } +/* FIXME: This is a place holder for the implementation. */ +static PyObject * +libvirt_virDomainSetMemoryParameters(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) { + return VIR_PY_INT_FAIL; +} + +/* FIXME: This is a place holder for the implementation. */ +static PyObject * +libvirt_virDomainGetMemoryParameters(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) { + return VIR_PY_INT_FAIL; +} + static PyObject * libvirt_virDomainGetVcpus(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -- cgit