return PyUnicode_FromString(lxc_get_default_config_path());
}
+static PyObject *
+get_version(Container *self, PyObject *args, PyObject *kwds)
+{
+ return PyUnicode_FromString(lxc_get_version());
+}
+
// Container properties
static PyObject *
Container_config_file_name(Container *self, PyObject *args, PyObject *kwds)
static PyMethodDef LXC_methods[] = {
{"get_default_config_path", (PyCFunction)get_default_config_path, METH_NOARGS,
"Returns the current LXC config path"},
+ {"get_version", (PyCFunction)get_version, METH_NOARGS,
+ "Returns the current LXC library version"},
{NULL, NULL, 0, NULL}
};
"and may change at any point in the future.", Warning, 2)
default_config_path = _lxc.get_default_config_path()
+version = _lxc.get_version()
class ContainerNetwork():