huge cleanup for removing mutables used as default
[sfa.git] / sfa / methods / GetVersion.py
index 801b339..f043992 100644 (file)
@@ -1,5 +1,6 @@
 from sfa.util.method import Method
-from sfa.util.parameter import Parameter
+
+from sfa.storage.parameter import Parameter
 
 
 class GetVersion(Method):
@@ -8,9 +9,13 @@ class GetVersion(Method):
     @return version
     """
     interfaces = ['registry','aggregate', 'slicemgr', 'component']
-    accepts = [Parameter(dict, "Options")]
+    accepts = [
+        Parameter(dict, "Options")
+        ]
     returns = Parameter(dict, "Version information")
 
-    def call(self, options={}):
+    # API v2 specifies options is optional, so..
+    def call(self, options=None):
+        if options is None: options={}
         self.api.logger.info("interface: %s\tmethod-name: %s" % (self.api.interface, self.name))
         return self.api.manager.GetVersion(self.api, options)