assert(not container.running)
assert(container.state == "STOPPED")
+## Snapshotting the container
+print("Snapshotting the container")
+assert(not container.snapshot_list())
+assert(container.snapshot() == "snap0")
+assert(len(container.snapshot_list()) == 1)
+assert(container.snapshot_restore("snap0") is True)
+assert(container.snapshot_destroy("snap0") is True)
+
## Cloning the container
print("Cloning the container as '%s'" % CLONE_NAME)
clone = container.clone(CLONE_NAME)
PyObject *stdout_obj = NULL;
PyObject *stderr_obj = NULL;
PyObject *initial_cwd_obj = NULL;
- PyObject *dummy;
+ PyObject *dummy = NULL;
bool parse_result;
lxc_attach_options_t default_options = LXC_ATTACH_OPTIONS_DEFAULT;
LXC_arch_to_personality(PyObject *self, PyObject *arg)
{
long rv = -1;
- PyObject *pystr;
+ PyObject *pystr = NULL;
char *str;
if (!PyUnicode_Check(arg)) {
char* template_name = NULL;
int flags = 0;
char** create_args = {NULL};
- PyObject *retval = NULL, *vargs = NULL;
+ PyObject *retval = NULL;
+ PyObject *vargs = NULL;
int i = 0;
static char *kwlist[] = {"template", "flags", "args", NULL};
int retval = 0;
int ret = 0;
char newname[20];
- PyObject *py_comment_path;
+ PyObject *py_comment_path = NULL;
if (! PyArg_ParseTupleAndKeywords(args, kwds, "|O&", kwlist,
PyUnicode_FSConverter, &py_comment_path))