fix content_type in fedrica rspec versions. Remove redundant rspec versions
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 18 Dec 2012 15:46:35 +0000 (10:46 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 18 Dec 2012 15:46:35 +0000 (10:46 -0500)
sfa/rspecs/version_manager.py
sfa/rspecs/versions/federica.py

index 4e60bac..bcbc106 100644 (file)
@@ -22,6 +22,7 @@ class VersionManager:
             for attr_name in dir(module):
                 attr = getattr(module, attr_name)
                 if hasattr(attr, 'version') and hasattr(attr, 'enabled') and attr.enabled == True:
+                    print filename, module, attr 
                     self.versions.append(attr())
 
     def _get_version(self, type, version_num=None, content_type=None):
index 798fc7d..8ff9f5e 100644 (file)
@@ -1,17 +1,23 @@
-from sfa.rspecs.versions.pgv2 import PGv2Ad, PGv2Request, PGv2Manifest
+from sfa.rspecs.versions.pgv2 import PGv2
 
-class FedericaAd (PGv2Ad):
+class FedericaAd (PGv2):
     enabled = True
+    type = 'Fedrica'
+    content_type = 'ad'
     schema = 'http://sorch.netmode.ntua.gr/ws/RSpec/ad.xsd'
     namespace = 'http://sorch.netmode.ntua.gr/ws/RSpec'
 
-class FedericaRequest (PGv2Request):
+class FedericaRequest (PGv2):
     enabled = True
+    type = 'Fedrica'
+    content_type = 'request'
     schema = 'http://sorch.netmode.ntua.gr/ws/RSpec/request.xsd'
     namespace = 'http://sorch.netmode.ntua.gr/ws/RSpec'
 
-class FedericaManifest (PGv2Manifest):
+class FedericaManifest (PGv2):
     enabled = True
+    type = 'Fedrica'
+    content_type = 'manifest'
     schema = 'http://sorch.netmode.ntua.gr/ws/RSpec/manifest.xsd'
     namespace = 'http://sorch.netmode.ntua.gr/ws/RSpec'