From 3e76f94f506fbafc77f7d9b79db302c5c723cdec Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 30 Nov 2011 13:35:19 -0500 Subject: [PATCH] ensure 'rspec_version' option is specified --- sfa/methods/ListResources.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sfa/methods/ListResources.py b/sfa/methods/ListResources.py index 65fd819f..c13baa73 100644 --- a/sfa/methods/ListResources.py +++ b/sfa/methods/ListResources.py @@ -3,7 +3,7 @@ import zlib from sfa.util.xrn import urn_to_hrn from sfa.util.method import Method from sfa.util.sfatablesRuntime import run_sfatables - +from sfa.util.faults import InvalidRSpecVersion from sfa.trust.credential import Credential from sfa.storage.parameter import Parameter, Mixed @@ -25,7 +25,11 @@ class ListResources(Method): def call(self, creds, options={}): self.api.logger.info("interface: %s\tmethod-name: %s" % (self.api.interface, self.name)) - + + # client must specify a version + if not options.get('rspec_version'): + raise InvalidRSpecVersion('Must specify an rspec version option. rspec_version cannot be null') + # get slice's hrn from options xrn = options.get('geni_slice_urn', '') (hrn, _) = urn_to_hrn(xrn) -- 2.47.0