From 4f315b3c5e6d1e7a083bed0f72010a51cd79cae7 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Sun, 12 Jul 2009 22:23:46 +0000 Subject: [PATCH] All of my changes from this point on will apply only to the max/vini aggregates. --- sfa/util/config.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sfa/util/config.py b/sfa/util/config.py index a439906f..1c0b9c96 100644 --- a/sfa/util/config.py +++ b/sfa/util/config.py @@ -41,6 +41,20 @@ class Config: except IOError, e: raise IOError, "Could not find the configuration file: %s" % config_file + ## + # + # Very hacky - to change after July 21. + # + # The generation/parsing of RSpecs is based on the value returned by this function. vini and max + # use some new code, while pl uses old code. As long as you don't set SFA_AGGREGATE_RSPEC_TYPE in your + # config file, the new code will not apply to your deployment. + # + + def get_aggregate_rspec_type(self): + if (hasattr(self,'SFA_AGGREGATE_RSPEC_TYPE')): + return self.SFA_AGGREGATE_RSPEC_TYPE + else: + return "pl" def get_plc_dbinfo(self): return { -- 2.43.0