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