- add net and proper to manifest
[nodemanager.git] / sm.py
diff --git a/sm.py b/sm.py
index fecfbf6..1203e64 100644 (file)
--- a/sm.py
+++ b/sm.py
@@ -37,8 +37,11 @@ start_requested = False  # set to True in order to request that all slivers be s
 
 
 @database.synchronized
-def GetSlivers_callback(data, fullupdate=True):
-    """This function has two purposes.  One, convert GetSlivers() data into a more convenient format.  Two, even if no updates are coming in, use the GetSlivers() heartbeat as a cue to scan for expired slivers."""
+def GetSlivers(data, fullupdate=True):
+    """This function has two purposes.  One, convert GetSlivers() data
+    into a more convenient format.  Two, even if no updates are coming
+    in, use the GetSlivers() heartbeat as a cue to scan for expired
+    slivers."""
 
     node_id = None
     try:
@@ -61,7 +64,7 @@ def GetSlivers_callback(data, fullupdate=True):
             keys = rec.pop('keys')
             rec.setdefault('keys', '\n'.join([key_struct['key'] for key_struct in keys]))
 
-            rec.setdefault('type', attr_dict.get('type', 'vserver'))
+            rec.setdefault('type', attr_dict.get('type', 'sliver.VServer'))
             rec.setdefault('vref', attr_dict.get('vref', 'default'))
             rec.setdefault('initscript', attr_dict.get('initscript', ''))
             rec.setdefault('delegations', [])  # XXX - delegation not yet supported
@@ -89,7 +92,7 @@ def GetSlivers_callback(data, fullupdate=True):
 def deliver_ticket(data): return GetSlivers_callback(data, fullupdate=False)
 
 
-def start(options):
+def start(options, config):
     accounts.register_class(sliver_vs.Sliver_VS)
     accounts.register_class(delegate.Delegate)
     global start_requested