a little nicer wrt pep8
[sfa.git] / sfa / methods / GetVersion.py
1 from sfa.util.method import Method
2 from sfa.util.sfalogging import logger
3
4 from sfa.storage.parameter import Parameter
5
6
7 class GetVersion(Method):
8     """
9     Returns this GENI Aggregate Manager's Version Information
10     @return version
11     """
12     interfaces = ['registry', 'aggregate']
13     accepts = [
14         Parameter(dict, "Options")
15     ]
16     returns = Parameter(dict, "Version information")
17
18     # API v2 specifies options is optional, so..
19     def call(self, options=None):
20         if options is None:
21             options = {}
22         logger.info("interface: %s\tmethod-name: %s" %
23                     (self.api.interface, self.name))
24         return self.api.manager.GetVersion(self.api, options)