use AMs in aggregates.xml by default, stack sfamesh to get SMs
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 25 Mar 2011 15:59:19 +0000 (16:59 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 25 Mar 2011 15:59:19 +0000 (16:59 +0100)
system/TestPlc.py
system/config_default.py
system/config_sfamesh.py [new file with mode: 0644]

index 903ddaf..616afe7 100644 (file)
@@ -1206,8 +1206,9 @@ class TestPlc:
         return True
 
     def aggregate_xml_line(self):
-        return '<aggregate addr="%s" hrn="%s" port="12347"/>' % \
-            (self.vserverip,self.plc_spec['sfa']['SFA_REGISTRY_ROOT_AUTH'])
+        port=self.plc_spec['sfa']['neighbours-port']
+        return '<aggregate addr="%s" hrn="%s" port="%r"/>' % \
+            (self.vserverip,self.plc_spec['sfa']['SFA_REGISTRY_ROOT_AUTH'],port)
 
     def registry_xml_line(self):
         return '<registry addr="%s" hrn="%s" port="12345"/>' % \
index 47b0308..d58fdb9 100644 (file)
@@ -317,6 +317,9 @@ def sfa (options,index) :
         'regularuser':regularuser,
         'slicename' : slicename,
         'domain':domain,
+        # the default is to use AMs in the various aggregates.xml
+        # stack config_sfamesh to point to SMs instead
+        'neighbours-port':12346,
     }
 
 def sfa_slice_specs (options,index,slicename,regularuser):
diff --git a/system/config_sfamesh.py b/system/config_sfamesh.py
new file mode 100644 (file)
index 0000000..563932b
--- /dev/null
@@ -0,0 +1,5 @@
+# tweak the config so that aggregates.xml point to slice managers instead of AMs
+def config (plc_specs, options):
+    for plc_spec in plc_specs:
+        plc_spec['sfa']['neighbours-port']=12347
+    return plc_specs