4 # This module holds topology configuration for SFA. It is implemnted as a
5 # list of site_id tuples
9 from sfa.util.sfalogging import logger
13 Parse the topology configuration file.
16 #def __init__(self, config_file = "/etc/sfa/topology"):
17 def __init__(self, config_file = "/tmp/topology"):
19 self.config_file = None
20 self.config_path = None
21 self.load(config_file)
23 def load(self, config_file):
26 self.config_file = config_file
27 # path to configuration data
28 self.config_path = os.path.dirname(config_file)
30 f = open(config_file, 'r')
32 ignore = line.find('#')
37 self.add((tup[0], tup[1]))
39 logger.log_exc("Could not find or load the configuration file: %s" % config_file)