Whamcloud - gitweb
beginning of multinet in lconf
authorrread <rread>
Sat, 7 Jun 2003 00:07:44 +0000 (00:07 +0000)
committerrread <rread>
Sat, 7 Jun 2003 00:07:44 +0000 (00:07 +0000)
 - start the acceptor on gateways
 - use mynid for all network types
 - many routing code cleanups
 - experimental support for cluster id

lustre/utils/Lustre/__init__.py
lustre/utils/Lustre/lustredb.py

index 2063948..c1b93e6 100644 (file)
@@ -4,4 +4,4 @@ from lustredb import LustreDB, LustreDB_XML, LustreDB_LDAP
 from error import LconfError, OptionError
 from cmdline import Options
 
-CONFIG_VERSION="2003051401"
+CONFIG_VERSION="2003060501"
index 784a63e..35bca56 100644 (file)
@@ -232,7 +232,10 @@ class LustreDB_XML(LustreDB):
     def getUUID(self):
         return self.xml_get_uuid(self.dom_node)
 
-    def get_routes(self, type, gw):
+    # Convert routes from the router to a route that will be used
+    # on the local system.  The network type and gw are changed to the
+    # interface on the router the local system will connect to.
+    def get_local_routes(self, type, gw):
         """ Return the routes as a list of tuples of the form:
         [(type, gw, lo, hi),]"""
         res = []
@@ -244,7 +247,8 @@ class LustreDB_XML(LustreDB):
                 if type != net_type:
                     lo = self.xmlattr(r, 'lo')
                     hi = self.xmlattr(r, 'hi')
-                    res.append((type, gw, lo, hi))
+                    tgt_cluster_id = self.xmlattr(r, 'tgtclusterid')
+                    res.append((type, gw, tgt_cluster_id, lo, hi))
         return res
 
     def get_route_tbl(self):
@@ -252,9 +256,11 @@ class LustreDB_XML(LustreDB):
         for r in self.dom_node.getElementsByTagName('route'):
             net_type = self.xmlattr(r, 'type')
             gw = self.xmlattr(r, 'gw')
+            gw_cluster_id = self.xmlattr(r, 'gwclusterid')
+            tgt_cluster_id = self.xmlattr(r, 'tgtclusterid')
             lo = self.xmlattr(r, 'lo')
             hi = self.xmlattr(r, 'hi')
-            ret.append((net_type, gw, lo, hi))
+            ret.append((net_type, gw, gw_cluster_id, tgt_cluster_id, lo, hi))
         return ret
 
     def _update_active(self, tgt, new):