-try: from bwlimit import bwmin, bwmax
-except ImportError: bwmin, bwmax = 8, 1000*1000*1000
+try:
+ import sliver_lxc
+ implementation='lxc'
+ sliver_default_type='sliver.LXC'
+ sliver_class_to_register = sliver_lxc.Sliver_LXC
+ sliver_password_shell = sliver_lxc.Sliver_LXC.SHELL
+except:
+ try:
+ import sliver_vs
+ implementation='vs'
+ sliver_default_type='sliver.VServer'
+ sliver_class_to_register = sliver_vs.Sliver_VS
+ sliver_password_shell = sliver_vs.Sliver_VS.SHELL
+ except:
+ logger.log("Could not import either sliver_lxc or sliver_vs - bailing out")
+ exit(1)
+
+# just being safe
+try : from plnode.bwlimit import bwmin, bwmax
+except: bwmin, bwmax = 8, 1000*1000*1000