From: Sapan Bhatia Date: Sun, 12 Jul 2009 22:23:46 +0000 (+0000) Subject: All of my changes from this point on will apply only to the max/vini aggregates. X-Git-Tag: sfa-0.9-0@14641~73 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=4f315b3c5e6d1e7a083bed0f72010a51cd79cae7 All of my changes from this point on will apply only to the max/vini aggregates. --- 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 {