From dc977138ef79f621b2ec89bc2ffa789981448503 Mon Sep 17 00:00:00 2001 From: rread Date: Sat, 7 Jun 2003 00:07:44 +0000 Subject: [PATCH] beginning of multinet in lconf - 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 | 2 +- lustre/utils/Lustre/lustredb.py | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lustre/utils/Lustre/__init__.py b/lustre/utils/Lustre/__init__.py index 2063948..c1b93e6 100644 --- a/lustre/utils/Lustre/__init__.py +++ b/lustre/utils/Lustre/__init__.py @@ -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" diff --git a/lustre/utils/Lustre/lustredb.py b/lustre/utils/Lustre/lustredb.py index 784a63e..35bca56 100644 --- a/lustre/utils/Lustre/lustredb.py +++ b/lustre/utils/Lustre/lustredb.py @@ -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): -- 1.8.3.1