fester/backend/integrations/libvirt.py

20 lines
347 B
Python

import subprocess
class LibvirtManager:
def execute(self, target, command):
domain = target.name
# simplistic execution via ssh inside VM
return subprocess.call([
"virsh",
"domexec",
domain,
"--",
"bash",
"-c",
command
])