All of my changes from this point on will apply only to the max/vini aggregates.
authorSapan Bhatia <sapanb@cs.princeton.edu>
Sun, 12 Jul 2009 22:23:46 +0000 (22:23 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Sun, 12 Jul 2009 22:23:46 +0000 (22:23 +0000)
sfa/util/config.py

index a439906..1c0b9c9 100644 (file)
@@ -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 {