X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FGetVersion.py;h=01136ccfd19c39d251eefc5db10cd6f86621629a;hb=fd395e1944dcd49f10a4d5b27ce4983ad389fb96;hp=801b339284d98101782e41ca3d53c4c1b798479f;hpb=6cb4717ad2a1ff4a08d73c7cc0dea759f12ab6d5;p=sfa.git diff --git a/sfa/methods/GetVersion.py b/sfa/methods/GetVersion.py index 801b3392..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,10 +9,16 @@ class GetVersion(Method): Returns this GENI Aggregate Manager's Version Information @return version """ - interfaces = ['registry','aggregate', 'slicemgr', 'component'] - accepts = [Parameter(dict, "Options")] + interfaces = ['registry', 'aggregate', 'slicemgr', 'component'] + accepts = [ + Parameter(dict, "Options") + ] returns = Parameter(dict, "Version information") - def call(self, options={}): - self.api.logger.info("interface: %s\tmethod-name: %s" % (self.api.interface, self.name)) + # 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)