-
- def ListSlices(self, api, creds, options):
- call_id = options.get('call_id')
- if Callids().already_handled(call_id): return []
-
- # look in cache first
- if self.driver.cache:
- slices = self.driver.cache.get('slices')
- if slices:
- logger.debug("%s.list_slices returns from cache" % (self.driver.__module__))
- return slices
-
- # call driver
- slices = self.driver.list_slices(creds, options)
-
- # cache the result
- if self.driver.cache:
- logger.debug ("%s.list_slices stores value in cache" % (self.driver.__module__))
- self.driver.cache.add('slices', instance_urns)
-
- return self.driver.list_slices (creds, options)