activate cache_utils only when enabled.
[plcapi.git] / PLC / Methods / GetSlivers.py
index 745b0fc..18b5fbf 100644 (file)
@@ -205,6 +205,10 @@ class GetSlivers(Method):
     }
 
     def call(self, auth, node_id_or_hostname = None):
+        return self.raw_call(auth, node_id_or_hostname)
+
+
+    def raw_call(self, auth, node_id_or_hostname):
         timestamp = int(time.time())
 
         # Get node
@@ -343,7 +347,7 @@ class GetSlivers(Method):
                                                    }) ]
         granularity=self.api.config.PLC_RESERVATION_GRANULARITY
 
-        return {
+        raw_data = {
             'timestamp': timestamp,
             'node_id': node['node_id'],
             'hostname': node['hostname'],
@@ -358,4 +362,8 @@ class GetSlivers(Method):
             'reservation_policy': reservation_policy,
             'leases':leases,
             'lease_granularity': granularity,
-            }
+        }
+
+        sanitized_data = sanitize_for_pickle (raw_data)
+        return sanitized_data
+