diff options
author | 2010-10-12 15:43:27 +0200 | |
---|---|---|
committer | 2010-10-12 19:26:09 +0200 | |
commit | bf1b76ffaafc6e581b5498a25b6cd9b53c99c9b9 (patch) | |
tree | 79978c12a70e7d8e3fe607079deb757717d3efb4 /python | |
parent | cpu: Remove redundant features (diff) | |
download | libvirt-bf1b76ffaafc6e581b5498a25b6cd9b53c99c9b9.tar.gz libvirt-bf1b76ffaafc6e581b5498a25b6cd9b53c99c9b9.tar.bz2 libvirt-bf1b76ffaafc6e581b5498a25b6cd9b53c99c9b9.zip |
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.
Diffstat (limited to 'python')
-rwxr-xr-x | python/generator.py | 2 | ||||
-rw-r--r-- | python/libvirt-override-api.xml | 12 | ||||
-rw-r--r-- | python/libvirt-override.c | 14 |
3 files changed, 28 insertions, 0 deletions
diff --git a/python/generator.py b/python/generator.py index d876df6ab..68009b947 100755 --- a/python/generator.py +++ b/python/generator.py @@ -306,6 +306,8 @@ skip_impl = ( 'virDomainGetSchedulerType', 'virDomainGetSchedulerParameters', 'virDomainSetSchedulerParameters', + 'virDomainSetMemoryParameters', + 'virDomainGetMemoryParameters', 'virDomainGetVcpus', 'virDomainPinVcpu', 'virSecretGetValue', diff --git a/python/libvirt-override-api.xml b/python/libvirt-override-api.xml index ca169939b..f2096080e 100644 --- a/python/libvirt-override-api.xml +++ b/python/libvirt-override-api.xml @@ -162,6 +162,18 @@ <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> <arg name='params' type='virSchedParameterPtr' info='pointer to scheduler parameter objects'/> </function> + <function name='virDomainSetMemoryParameters' file='python'> + <info>Change the memory tunables</info> + <return type='int' info='-1 in case of error, 0 in case of success.'/> + <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> + <arg name='params' type='virMemoryParameterPtr' info='pointer to memory tunable objects'/> + </function> + <function name='virDomainGetMemoryParameters' file='python'> + <info>Get the memory parameters, the @params array will be filled with the values.</info> + <return type='int' info='-1 in case of error, 0 in case of success.'/> + <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> + <arg name='params' type='virMemoryParameterPtr' info='pointer to memory tunable objects'/> + </function> <function name='virConnectListStoragePools' file='python'> <info>list the storage pools, stores the pointers to the names in @names</info> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> diff --git a/python/libvirt-override.c b/python/libvirt-override.c index 54a84c2f8..c43ab15f8 100644 --- a/python/libvirt-override.c +++ b/python/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) { |