From 07f6cd9b68e5cab4e4e01a3132dc493a39907db9 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 6 Apr 2011 17:53:46 +0200 Subject: [PATCH] honor SFA_AGGREGATE_ENABLED --- sfa/server/aggregate.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sfa/server/aggregate.py b/sfa/server/aggregate.py index dc1a61cf..1a96e157 100644 --- a/sfa/server/aggregate.py +++ b/sfa/server/aggregate.py @@ -25,16 +25,16 @@ class Aggregates(Interfaces): def __init__(self, api, conf_file = "/etc/sfa/aggregates.xml"): Interfaces.__init__(self, api, conf_file) # set up a connection to the local aggregate - # xxx fixme ? - should not we do this only when SFA_AGGREGATE_ENABLED ? - address = self.api.config.SFA_AGGREGATE_HOST - port = self.api.config.SFA_AGGREGATE_PORT - url = 'http://%(address)s:%(port)s' % locals() - local_aggregate = {'hrn': self.api.hrn, - 'urn': hrn_to_urn(self.api.hrn, 'authority'), - 'addr': address, - 'port': port, - 'url': url} - self.interfaces[self.api.hrn] = local_aggregate + if self.api.config.SFA_AGGREGATE_ENABLED: + address = self.api.config.SFA_AGGREGATE_HOST + port = self.api.config.SFA_AGGREGATE_PORT + url = 'http://%(address)s:%(port)s' % locals() + local_aggregate = {'hrn': self.api.hrn, + 'urn': hrn_to_urn(self.api.hrn, 'authority'), + 'addr': address, + 'port': port, + 'url': url} + self.interfaces[self.api.hrn] = local_aggregate # get connections self.update(self.get_connections()) -- 2.43.0