1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

python-lvm: Add method to retrieve lv attr.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
This commit is contained in:
Tony Asleson 2013-04-10 14:38:18 -04:00
parent 952605a8ea
commit 9e0260c2e3

View File

@ -1193,6 +1193,13 @@ liblvm_pv_dealloc(pvobject *self)
} \
} while (0)
static PyObject *
liblvm_lvm_lv_get_attr(lvobject *self)
{
LV_VALID(self);
return Py_BuildValue("s", lvm_lv_get_attr(self->lv));
}
static PyObject *
liblvm_lvm_lv_get_name(lvobject *self)
@ -1749,6 +1756,7 @@ static PyMethodDef liblvm_vg_methods[] = {
static PyMethodDef liblvm_lv_methods[] = {
/* lv methods */
{ "getAttr", (PyCFunction)liblvm_lvm_lv_get_attr, METH_NOARGS },
{ "getName", (PyCFunction)liblvm_lvm_lv_get_name, METH_NOARGS },
{ "getUuid", (PyCFunction)liblvm_lvm_lv_get_uuid, METH_NOARGS },
{ "activate", (PyCFunction)liblvm_lvm_lv_activate, METH_NOARGS },