geni v3 updates
[sfa.git] / sfa / managers / aggregate_manager.py
index 9960eec..cb8b2a6 100644 (file)
@@ -58,7 +58,6 @@ class AggregateManager:
             'geni_api_versions': {'3': 'http://%s:%s' % (socket.gethostname(), api.config.sfa_aggregate_port)},
             'geni_single_allocation': 0, # Accept operations that act on as subset of slivers in a given state.
             'geni_allocate': 'geni_many',# Multiple slivers can exist and be incrementally added, including those which connect or overlap in some way.
-            'geni_best_effort': 'true',
             'geni_credential_types': cred_types,
         }
         version.update(version_generic)
@@ -105,14 +104,14 @@ class AggregateManager:
         return self.driver.status (urns, options=options)
    
 
-    def Allocate(self, api, xrn, creds, rspec_string, options):
+    def Allocate(self, api, xrn, creds, rspec_string, expiration, options):
         """
         Allocate resources as described in a request RSpec argument 
         to a slice with the named URN.
         """
         call_id = options.get('call_id')
         if Callids().already_handled(call_id): return ""
-        return self.driver.allocate(xrn, rspec_string, options)
+        return self.driver.allocate(xrn, rspec_string, expiration, options)
  
     def Provision(self, api, xrns, creds, options):
         """
@@ -125,10 +124,11 @@ class AggregateManager:
         # make sure geni_rspec_version is specified in options
         if 'geni_rspec_version' not in options:
             msg = 'geni_rspec_version is required and must be set in options struct'
-            raise SfaInvalidArgument('geni_rspec_version', msg
+            raise SfaInvalidArgument(msg, 'geni_rspec_version')
         # make sure we support the requested rspec version
         version_manager = VersionManager()
-        if not version_manager.get(options['geni_rspec_version']):
+        rspec_version = version_manager.get_version(options['geni_rspec_version']) 
+        if not rspec_version:
             raise InvalidRSpecVersion(options['geni_rspec_version'])
                        
         return self.driver.provision(xrns, options)