class Slices(SimpleStorage):
- def __init__(self, api, ttl = .5):
+ def __init__(self, api, ttl = .5, caller_cred=None):
self.api = api
self.ttl = ttl
self.threshold = None
SimpleStorage.__init__(self, self.slices_file)
self.policy = Policy(self.api)
self.load()
+ self.caller_cred=caller_cred
def get_peer(self, hrn):
aggregates = Aggregates(self.api)
for aggregate in aggregates:
try:
- aggregates[aggregate].delete_slice(credential, hrn)
+ aggregates[aggregate].delete_slice(credential, hrn, caller_cred=self.caller_cred)
except:
print >> log, "Error calling list nodes at aggregate %s" % aggregate
traceback.print_exc(log)
try:
# send the whloe rspec to the local aggregate
if aggregate in [self.api.hrn]:
- aggregates[aggregate].create_slice(credential, hrn, rspec)
+ aggregates[aggregate].create_slice(credential, hrn, rspec, caller_cred=self.caller_cred)
else:
- aggregates[aggregate].create_slice(credential, hrn, rspecs[aggregate])
+ aggregates[aggregate].create_slice(credential, hrn, rspecs[aggregate], caller_cred=self.caller_cred)
except:
print >> log, "Error creating slice %(hrn)s at aggregate %(aggregate)s" % locals()
traceback.print_exc()