src/lxc/legacy/lxc-ls
src/python-lxc/build/
-src/python-lxc/lxc/__init__.py
src/python-lxc/lxc/__pycache__/
src/tests/lxc-test-containertests
return 0;
}
+static PyObject *
+get_default_config_path(Container *self, PyObject *args, PyObject *kwds)
+{
+ return PyUnicode_FromString(lxc_get_default_config_path());
+}
+
// Container properties
static PyObject *
Container_config_file_name(Container *self, PyObject *args, PyObject *kwds)
Container_new, /* tp_new */
};
+static PyMethodDef LXC_methods[] = {
+ {"get_default_config_path", (PyCFunction)get_default_config_path, METH_NOARGS,
+ "Returns the current LXC config path"},
+ {NULL, NULL, 0, NULL}
+};
+
static PyModuleDef _lxcmodule = {
PyModuleDef_HEAD_INIT,
"_lxc",
"Binding for liblxc in python",
-1,
- NULL, NULL, NULL, NULL, NULL
+ LXC_methods
};
PyMODINIT_FUNC
import os
import subprocess
import stat
-import tempfile
import time
import warnings
warnings.warn("The python-lxc API isn't yet stable "
"and may change at any point in the future.", Warning, 2)
-default_config_path = "@LXCPATH@"
+default_config_path = _lxc.get_default_config_path()
class ContainerNetwork():