Lines Matching refs:self

262 LXC_arch_to_personality(PyObject *self, PyObject *arg)
291 LXC_attach_run_command(PyObject *self, PyObject *arg)
323 LXC_attach_run_shell(PyObject *self, PyObject *arg)
333 LXC_get_global_config_item(PyObject *self, PyObject *args, PyObject *kwds)
354 LXC_get_version(PyObject *self, PyObject *args)
367 LXC_list_containers(PyObject *self, PyObject *args, PyObject *kwds)
436 Container_dealloc(Container* self)
438 lxc_container_put(self->container);
439 Py_TYPE(self)->tp_free((PyObject*)self);
443 Container_init(Container *self, PyObject *args, PyObject *kwds)
460 self->container = lxc_container_new(name, config_path);
461 if (!self->container) {
476 Container *self;
478 self = (Container *)type->tp_alloc(type, 0);
480 return (PyObject *)self;
485 Container_config_file_name(Container *self, void *closure)
489 rv = self->container->config_file_name(self->container);
498 Container_controllable(Container *self, void *closure)
500 if (self->container->may_control(self->container)) {
508 Container_defined(Container *self, void *closure)
510 if (self->container->is_defined(self->container)) {
518 Container_init_pid(Container *self, void *closure)
520 return PyLong_FromLong(self->container->init_pid(self->container));
524 Container_name(Container *self, void *closure)
526 if (!self->container->name) {
530 return PyUnicode_FromString(self->container->name);
534 Container_running(Container *self, void *closure)
536 if (self->container->is_running(self->container)) {
544 Container_state(Container *self, void *closure)
548 rv = self->container->state(self->container);
559 Container_attach_interface(Container *self, PyObject *args, PyObject *kwds)
582 if (self->container->attach_interface(self->container, src_name, dst_name)) {
594 Container_detach_interface(Container *self, PyObject *args, PyObject *kwds)
609 if (self->container->detach_interface(self->container, ifname, NULL)) {
619 Container_add_device_node(Container *self, PyObject *args, PyObject *kwds)
642 if (self->container->add_device_node(self->container, src_path,
655 Container_attach_and_possibly_wait(Container *self, PyObject *args,
674 ret = self->container->attach(self->container, lxc_attach_python_exec,
696 Container_attach(Container *self, PyObject *args, PyObject *kwds)
698 return Container_attach_and_possibly_wait(self, args, kwds, 0);
702 Container_attach_wait(Container *self, PyObject *args, PyObject *kwds)
704 return Container_attach_and_possibly_wait(self, args, kwds, 1);
708 Container_clear_config(Container *self, PyObject *args, PyObject *kwds)
710 self->container->clear_config(self->container);
716 Container_clear_config_item(Container *self, PyObject *args, PyObject *kwds)
725 if (self->container->clear_config_item(self->container, key)) {
733 Container_clone(Container *self, PyObject *args, PyObject *kwds)
775 new_container = self->container->clone(self->container, newname,
797 Container_console(Container *self, PyObject *args, PyObject *kwds)
808 if (self->container->console(self->container, ttynum,
816 Container_console_getfd(Container *self, PyObject *args, PyObject *kwds)
824 if (self->container->console_getfd(self->container, &ttynum,
833 Container_create(Container *self, PyObject *args, PyObject *kwds)
860 if (self->container->create(self->container, template_name, bdevtype, NULL,
880 Container_destroy(Container *self, PyObject *args, PyObject *kwds)
882 if (self->container->destroy(self->container)) {
890 Container_freeze(Container *self, PyObject *args, PyObject *kwds)
892 if (self->container->freeze(self->container)) {
900 Container_get_cgroup_item(Container *self, PyObject *args, PyObject *kwds)
912 len = self->container->get_cgroup_item(self->container, key, NULL, 0);
923 if (self->container->get_cgroup_item(self->container,
936 Container_get_config_item(Container *self, PyObject *args, PyObject *kwds)
948 len = self->container->get_config_item(self->container, key, NULL, 0);
963 if (self->container->get_config_item(self->container,
976 Container_get_config_path(Container *self, PyObject *args, PyObject *kwds)
980 rv = self->container->get_config_path(self->container);
990 Container_get_keys(Container *self, PyObject *args, PyObject *kwds)
1002 len = self->container->get_keys(self->container, key, NULL, 0);
1013 if (self->container->get_keys(self->container,
1026 Container_get_interfaces(Container *self)
1034 interfaces = self->container->get_interfaces(self->container);
1077 Container_get_ips(Container *self, PyObject *args, PyObject *kwds)
1094 ips = self->container->get_ips(self->container, interface, family, scope);
1137 Container_get_running_config_item(Container *self, PyObject *args,
1149 value = self->container->get_running_config_item(self->container, key);
1161 Container_load_config(Container *self, PyObject *args, PyObject *kwds)
1176 if (self->container->load_config(self->container, path)) {
1186 Container_reboot(Container *self, PyObject *args, PyObject *kwds)
1188 if (self->container->reboot(self->container)) {
1196 Container_rename(Container *self, PyObject *args, PyObject *kwds)
1205 if (self->container->rename(self->container, new_name)) {
1213 Container_remove_device_node(Container *self, PyObject *args, PyObject *kwds)
1236 if (self->container->remove_device_node(self->container, src_path,
1249 Container_save_config(Container *self, PyObject *args, PyObject *kwds)
1264 if (self->container->save_config(self->container, path)) {
1274 Container_set_cgroup_item(Container *self, PyObject *args, PyObject *kwds)
1284 if (self->container->set_cgroup_item(self->container, key, value)) {
1292 Container_set_config_item(Container *self, PyObject *args, PyObject *kwds)
1302 if (self->container->set_config_item(self->container, key, value)) {
1310 Container_set_config_path(Container *self, PyObject *args, PyObject *kwds)
1319 if (self->container->set_config_path(self->container, path)) {
1327 Container_shutdown(Container *self, PyObject *args, PyObject *kwds)
1336 if (self->container->shutdown(self->container, timeout)) {
1344 Container_snapshot(Container *self, PyObject *args, PyObject *kwds)
1362 retval = self->container->snapshot(self->container, comment_path);
1379 Container_snapshot_destroy(Container *self, PyObject *args, PyObject *kwds)
1388 if (self->container->snapshot_destroy(self->container, name)) {
1396 Container_snapshot_list(Container *self, PyObject *args, PyObject *kwds)
1403 snap_count = self->container->snapshot_list(self->container, &snap);
1434 Container_snapshot_restore(Container *self, PyObject *args, PyObject *kwds)
1444 if (self->container->snapshot_restore(self->container, name, newname)) {
1452 Container_start(Container *self, PyObject *args, PyObject *kwds)
1483 self->container->want_close_all_fds(self->container, true);
1486 self->container->want_close_all_fds(self->container, false);
1490 self->container->want_daemonize(self->container, true);
1493 self->container->want_daemonize(self->container, false);
1496 if (self->container->start(self->container, init_useinit, init_args))
1515 Container_stop(Container *self, PyObject *args, PyObject *kwds)
1517 if (self->container->stop(self->container)) {
1525 Container_unfreeze(Container *self, PyObject *args, PyObject *kwds)
1527 if (self->container->unfreeze(self->container)) {
1535 Container_wait(Container *self, PyObject *args, PyObject *kwds)
1545 if (self->container->wait(self->container, state, timeout)) {