settle on names for net_ slice attributes
[nodemanager.git] / sm.py
diff --git a/sm.py b/sm.py
index 519d2ef..cdb42ee 100644 (file)
--- a/sm.py
+++ b/sm.py
@@ -23,13 +23,13 @@ DEFAULT_ALLOCATION = {
     'cpu_min': 0, # ms/s
     'cpu_share': 32, # proportional share
     # bandwidth parameters
-    'net_min': bwmin, # bps
-    'net_max': bwmax, # bps
+    'net_min_rate': bwmin, # bps
+    'net_max_rate': bwmax, # bps
     'net_share': 1, # proportional share
     # bandwidth parameters over routes exempt from node bandwidth limits
-    'net2_min': bwmin, # bps
-    'net2_max': bwmax, # bps
-    'net2_share': 1, # proportional share
+    'net_i2_min_rate': bwmin, # bps
+    'net_i2_max_rate': bwmax, # bps
+    'net_i2_share': 1, # proportional share
     'disk_max': 5000000 # bytes
     }
 
@@ -50,7 +50,7 @@ def GetSlivers(data, fullupdate=True):
         finally: f.close()
     except: logger.log_exc()
 
-    if data['node_id'] != node_id: continue
+    if data.has_key('node_id') and data['node_id'] != node_id: return
     for sliver in data['slivers']:
         rec = sliver.copy()
         rec.setdefault('timestamp', data['timestamp'])
@@ -88,7 +88,7 @@ def GetSlivers(data, fullupdate=True):
             accounts.get(name).start(delay=cumulative_delay)
             cumulative_delay += 3
 
-def deliver_ticket(data): return GetSlivers_callback(data, fullupdate=False)
+def deliver_ticket(data): return GetSlivers(data, fullupdate=False)
 
 
 def start(options, config):