import struct
import threading
import xmlrpclib
+import sliver_lxc
try:
from PLC.Parameter import Parameter, Mixed
# A better approach will involve more extensive code splitting, I think.
try: import database
except: import logger as database
-try: import sliver_vs
-except: import logger as sliver_vs
+#try: import sliver_vs
+#except: import logger as sliver_vs
import ticket as ticket_module
import tools
@export_to_api(0)
def GetXIDs():
"""Return an dictionary mapping Slice names to XIDs"""
- return dict([(pwent[0], pwent[2]) for pwent in pwd.getpwall() if pwent[6] == sliver_vs.Sliver_VS.SHELL])
+ return dict([(pwent[0], pwent[2]) for pwent in pwd.getpwall() if pwent[6] == sliver_lxc.Sliver_LXC.SHELL])
@export_to_docbook(roles=['self'],
accepts=[],
# arch x86_64
vref = rec['vref']
if vref is None:
- logger.log('sliver_libvirt: %s: WARNING - no vref attached defaults to lxc-debian' % (name))
- vref = "lxc-squeeze-x86_64"
+ logger.log('sliver_libvirt: %s: WARNING - no vref attached defaults to lxc-f14' % (name))
+ vref = "lxc-f14-x86_64"
refImgDir = os.path.join(Sliver_LXC.REF_IMG_BASE_DIR, vref)
containerDir = os.path.join(Sliver_LXC.CON_BASE_DIR, name)
import database
import accounts
import controller
-import sliver_vs
import sliver_lxc
try: from bwlimit import bwmin, bwmax
if rec['instantiation'].lower() == 'nm-controller':
rec.setdefault('type', attributes.get('type', 'controller.Controller'))
else:
- rec.setdefault('type', attributes.get('type', 'sliver.VServer'))
+ rec.setdefault('type', attributes.get('type', 'sliver.LXC'))
# set the vserver reference. If none, set to default.
rec.setdefault('vref', attributes.get('vref', 'default'))
return GetSlivers(data, fullupdate=False)
def start():
- for resname, default_amount in sliver_vs.DEFAULT_ALLOCATION.iteritems():
- DEFAULT_ALLOCATION[resname]=default_amount
+ # No default allocation values for LXC yet, think if its necessary given
+ # that they are also default allocation values in this module
+ #for resname, default_amount in sliver_vs.DEFAULT_ALLOCATION.iteritems():
+ # DEFAULT_ALLOCATION[resname]=default_amount
- #accounts.register_class(sliver_vs.Sliver_VS)
- #accounts.register_class(sliver_libvirt.Sliver_LV)
accounts.register_class(sliver_lxc.Sliver_LXC)
accounts.register_class(controller.Controller)
database.start()