Bare minimum to get NodeManager not throw exceptions
[nodemanager.git] / sliver_lxc.py
1 #
2
3 """LXC slivers"""
4
5 import accounts
6 import logger
7
8 class Sliver_LXC(accounts.Account):
9     """This class wraps LXC commands"""
10
11     SHELL = '/bin/bash'
12     TYPE = 'sliver.LXC'
13     # Need to add a tag at myplc to actually use this account
14     # type = 'sliver.LXC'
15
16     def __init__(self, rec):
17         print "TODO WIP __init__"
18         name=rec['name']
19         logger.verbose ('sliver_lxc: %s init'%name)
20     
21     @staticmethod
22     def create(name, rec = None):
23         print "TODO create"
24         
25     @staticmethod
26     def destroy(name):
27         print "TODO destroy"
28
29     def configure(self, rec):
30         ''' Called by accounts.ensure_created -> start -> _acct.configure '''
31         print "TODO configure" 
32         name=rec['name']
33
34     def start(self, delay=0):
35         print "TODO start"
36     
37     def stop(self):
38         print "TODO stop"
39     
40     def is_running(self):
41         print "TODO is_running"
42         return True
43
44