5.0
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 3 Jun 2008 08:12:35 +0000 (08:12 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 3 Jun 2008 08:12:35 +0000 (08:12 +0000)
Makefile
codemux.py
proper.py
sm.py
vsys.py

index 2492116..eeab636 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -35,3 +35,5 @@ clean:
 tags:
        find . '(' -name '*.py' -o -name '*.c' -o -name '*.spec' ')' | xargs etags 
 
+.PHONY: tags
+
index 7b11350..ce69e4a 100644 (file)
@@ -16,7 +16,10 @@ def start(options, config):
 
 
 def GetSlivers(data):
-    """For each sliver with the codemux attribute, parse out "host,port" and make entry in conf.  Restart service after."""
+    """
+    For each sliver with the codemux attribute, parse out "host,port" 
+    and make entry in conf.  Restart service after.
+    """
     logger.log("codemux:  Starting.", 2)
     # slices already in conf
     slicesinconf = parseConf()
@@ -30,7 +33,7 @@ def GetSlivers(data):
     # Parse attributes and update dict of scripts
     for sliver in data['slivers']:
         for attribute in sliver['attributes']:
-            if attribute['name'] == 'codemux':
+            if attribute['tagname'] == 'codemux':
                 # add to conf.  Attribute is [host, port]
                 params = {'host': attribute['value'].split(",")[0], 
                           'port': attribute['value'].split(",")[1]}
index aad468e..dea0db9 100644 (file)
--- a/proper.py
+++ b/proper.py
@@ -19,7 +19,7 @@ def GetSlivers(data):
 
     for sliver in data['slivers']:
         for attribute in sliver['attributes']:
-            if attribute['name'] == 'proper_op':
+            if attribute['tagname'] == 'proper_op':
                 buf += "%s: %s\n" % (sliver['name'], attribute['value'])
 
     try: os.makedirs("/etc/proper")
diff --git a/sm.py b/sm.py
index 8fab86e..9ba2c38 100644 (file)
--- a/sm.py
+++ b/sm.py
@@ -91,7 +91,7 @@ def GetSlivers(data, fullupdate=True):
 
         # convert attributes field to a proper dict
         attr_dict = {}
-        for attr in rec.pop('attributes'): attr_dict[attr['name']] = attr['value']
+        for attr in rec.pop('attributes'): attr_dict[attr['tagname']] = attr['value']
 
         # squash keys
         keys = rec.pop('keys')
diff --git a/vsys.py b/vsys.py
index 17b3b59..a1558bd 100644 (file)
--- a/vsys.py
+++ b/vsys.py
@@ -24,7 +24,7 @@ def GetSlivers(data):
     # Parse attributes and update dict of scripts
     for sliver in data['slivers']:
         for attribute in sliver['attributes']:
-            if attribute['name'] == 'vsys':
+            if attribute['tagname'] == 'vsys':
                 if sliver['name'] not in slices:
                     # add to conf
                     slices.append(sliver['name'])