X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmanagers%2Faggregate_manager.py;h=6893131b01767a834c0f09e88265abbe754ad42c;hb=ffcfb206d0f4ea9788c9f4dea7b2951e55ff513a;hp=c0a8b6564465f4b5aba3fef9d21f8c96670bba02;hpb=5ffad5c84390fc7de2ff1c088e3dbdb995a9d6e9;p=sfa.git diff --git a/sfa/managers/aggregate_manager.py b/sfa/managers/aggregate_manager.py index c0a8b656..6893131b 100644 --- a/sfa/managers/aggregate_manager.py +++ b/sfa/managers/aggregate_manager.py @@ -5,6 +5,7 @@ from sfa.util.xrn import Xrn from sfa.util.callids import Callids from sfa.util.sfalogging import logger from sfa.util.faults import SfaInvalidArgument, InvalidRSpecVersion +from sfa.server.api_versions import ApiVersions class AggregateManager: @@ -49,16 +50,17 @@ class AggregateManager: xrn=Xrn(api.hrn, type='authority') version = version_core() cred_types = [{'geni_type': 'geni_sfa', 'geni_version': str(i)} for i in range(4)[-2:]] + geni_api_versions = ApiVersions().get_versions() + geni_api_versions.append({'3': 'http://%s:%s' % (socket.gethostname(), api.config.sfa_aggregate_port)}) version_generic = { 'testbed': self.driver.testbed_name(), 'interface':'aggregate', 'hrn':xrn.get_hrn(), 'urn':xrn.get_urn(), 'geni_api': 3, - 'geni_api_versions': {'3': 'http://%s:%s' % (socket.gethostname(), api.config.sfa_aggregate_port)}, + 'geni_api_versions': geni_api_versions, '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 +107,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): """