X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FGetVersion.py;h=01136ccfd19c39d251eefc5db10cd6f86621629a;hb=fd395e1944dcd49f10a4d5b27ce4983ad389fb96;hp=72fe8061201c16a3024213ce2a9302af62649422;hpb=e39e728991b762ae0b52b52b06655f0c7f1b7421;p=sfa.git diff --git a/sfa/methods/GetVersion.py b/sfa/methods/GetVersion.py index 72fe8061..01136ccf 100644 --- a/sfa/methods/GetVersion.py +++ b/sfa/methods/GetVersion.py @@ -1,5 +1,7 @@ from sfa.util.method import Method -from sfa.util.parameter import Parameter +from sfa.util.sfalogging import logger + +from sfa.storage.parameter import Parameter class GetVersion(Method): @@ -7,11 +9,16 @@ class GetVersion(Method): Returns this GENI Aggregate Manager's Version Information @return version """ - interfaces = ['registry','aggregate', 'slicemgr', 'component'] - accepts = [] + interfaces = ['registry', 'aggregate', 'slicemgr', 'component'] + accepts = [ + Parameter(dict, "Options") + ] returns = Parameter(dict, "Version information") - def call(self): - self.api.logger.info("interface: %s\tmethod-name: %s" % (self.api.interface, self.name)) - manager = self.api.get_interface_manager() - return manager.GetVersion(self.api) + # API v2 specifies options is optional, so.. + def call(self, options=None): + if options is None: + options = {} + logger.info("interface: %s\tmethod-name: %s" % + (self.api.interface, self.name)) + return self.api.manager.GetVersion(self.api, options)