fester/backend/integrations/lxc.py

19 lines
300 B
Python

import subprocess
class LXCManager:
def execute(self, target, command):
container = target.name
return subprocess.call([
"lxc-attach",
"-n",
container,
"--",
"bash",
"-c",
command
])