X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sliver_lxc.py;h=f2521a3311cb03f34448ff82393e9ab41393b89b;hb=d0c6effcab2aa1baed6016bd7edd1339639a1d13;hp=c2067a1cda31edb7be5e3e78b534f6e4c30c947a;hpb=89d56049912ffa1801da238d22e9e297cdcfba09;p=nodemanager.git diff --git a/sliver_lxc.py b/sliver_lxc.py index c2067a1..f2521a3 100644 --- a/sliver_lxc.py +++ b/sliver_lxc.py @@ -11,14 +11,14 @@ from string import Template import libvirt import logger -import bwlimitlxc as bwlimit +import plnode.bwlimit as bwlimit from initscript import Initscript from sliver_libvirt import Sliver_Libvirt class Sliver_LXC(Sliver_Libvirt, Initscript): """This class wraps LXC commands""" - SHELL = '/bin/sshsh' + SHELL = '/usr/sbin/vsh' TYPE = 'sliver.LXC' # Need to add a tag at myplc to actually use this account # type = 'sliver.LXC' @@ -146,10 +146,13 @@ class Sliver_LXC(Sliver_Libvirt, Initscript): else: logger.log("Cannot find XML template %s"%template_filename_sliceimage) return + + interfaces = Sliver_Libvirt.get_interfaces_xml(rec) + try: with open(template_filename) as f: template = Template(f.read()) - xml = template.substitute(name=name, xid=xid) + xml = template.substitute(name=name, interfaces=interfaces) except IOError: logger.log('Failed to parse or use XML template file %s'%template_filename) return