/usr/lib/python3/dist-packages/libvirt_lxc.py is in python3-libvirt 4.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #
# WARNING WARNING WARNING WARNING
#
# This file is automatically written by generator.py. Any changes
# made here will be lost.
#
# To change the manually written methods edit libvirt-lxc-override.py
# To change the automatically written methods edit generator.py
#
# WARNING WARNING WARNING WARNING
#
#
# WARNING WARNING WARNING WARNING
#
# Automatically written part of python bindings for libvirt
#
# WARNING WARNING WARNING WARNING
try:
import libvirtmod_lxc
except ImportError:
lib_e = sys.exc_info()[1]
try:
import cygvirtmod_lxc as libvirtmod_lxc
except ImportError:
cyg_e = sys.exc_info()[1]
if str(cyg_e).count("No module named"):
raise lib_e
import libvirt
#
# Functions from module libvirt-lxc
#
def lxcEnterCGroup(domain, flags):
"""This API is LXC specific, so it will only work with hypervisor
connections to the LXC driver.
Attaches the process to the control cgroups associated
with the container @domain. """
ret = libvirtmod_lxc.virDomainLxcEnterCGroup(domain._o, flags)
if ret is None: raise libvirt.libvirtError('virDomainLxcEnterCGroup() failed')
return ret
def lxcOpenNamespace(domain, flags):
"""This API is LXC specific, so it will only work with hypervisor
connections to the LXC driver.
Open the namespaces associated with the container @domain
and return a list of file descriptors associated with the
container.
The returned file descriptors are intended to be used with
the setns() system call. """
ret = libvirtmod_lxc.virDomainLxcOpenNamespace(domain._o, flags)
if ret is None: raise libvirt.libvirtError('virDomainLxcOpenNamespace() failed')
return ret
|