Merge from branch.
[nodemanager.git] / sm.py
diff --git a/sm.py b/sm.py
index 881b05e..62e49d1 100644 (file)
--- a/sm.py
+++ b/sm.py
@@ -97,6 +97,9 @@ def GetSlivers(data, fullupdate=True):
         keys = rec.pop('keys')
         rec.setdefault('keys', '\n'.join([key_struct['key'] for key_struct in keys]))
 
+        ## 'Type' isn't returned by GetSlivers() for whatever reason.  We're overloading
+        ## instantiation here, but i suppose its the ssame thing when you think about it. -FA
+        # Handle nm controller here
         if rec['instantiation'].lower() == 'nm-controller': 
             rec.setdefault('type', attr_dict.get('type', 'controller.Controller'))
         else:
@@ -125,6 +128,11 @@ def GetSlivers(data, fullupdate=True):
             except (KeyError, ValueError): amt = default_amt
             rspec[resname] = amt
 
+        # add in sysctl attributes into the rspec
+        for key in attr_dict.keys():
+            if key.find("sysctl.") == 0:
+                rspec[key] = attr_dict[key]
+
         database.db.deliver_record(rec)
     if fullupdate: database.db.set_min_timestamp(data['timestamp'])
     # slivers are created here.