- if Callids().already_handled(call_id): return ""
- return self.driver.provision(xrns, creds, options)
-
+ if Callids().already_handled(call_id):
+ return ""
+
+ # 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(msg, 'geni_rspec_version')
+ # make sure we support the requested rspec version
+ version_manager = VersionManager()
+ rspec_version = version_manager.get_version(
+ options['geni_rspec_version'])
+ if not rspec_version:
+ raise InvalidRSpecVersion(options['geni_rspec_version'])
+
+ return api.driver.provision(xrns, options)
+